forked from tylergaw/noaa-lambda-connector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.yaml
68 lines (62 loc) · 2.08 KB
/
template.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: NOAA Fetch function
Globals:
Function:
Timeout: 300
MemorySize: 128
LoggingConfig:
LogFormat: JSON
Resources:
NOAADataFetchFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: noaa/
Handler: noaa_data.lambda_handler
Runtime: python3.11
FunctionName: noaa-data-fetch
Architectures:
- x86_64
Environment:
Variables:
# Note: These secrets need to be created in the AWS Secrets manager
NOAA_API_KEY: '{{resolve:secretsmanager:NOAACreds:SecretString:NOAA_API_KEY}}'
NOAAStationsFetchFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: noaa/
Handler: noaa_stations.lambda_handler
Runtime: python3.11
FunctionName: noaa-stations-fetch
Architectures:
- x86_64
Environment:
Variables:
# Note: These secrets need to be created in the AWS Secrets manager
NOAA_API_KEY: '{{resolve:secretsmanager:NOAACreds:SecretString:NOAA_API_KEY}}'
ApplicationResourceGroup:
Type: AWS::ResourceGroups::Group
Properties:
Name:
Fn::Sub: ApplicationInsights-SAM-${AWS::StackName}
ResourceQuery:
Type: CLOUDFORMATION_STACK_1_0
ApplicationInsightsMonitoring:
Type: AWS::ApplicationInsights::Application
Properties:
ResourceGroupName:
Ref: ApplicationResourceGroup
AutoConfigurationEnabled: 'true'
Outputs:
NOAADataFetchFunction:
Description: NOAA Data Fetch Lambda Function ARN
Value: !GetAtt NOAADataFetchFunction.Arn
NOAADataFetchFunctionIamRole:
Description: Implicit IAM Role created for NOAA Data Fetch function
Value: !GetAtt NOAADataFetchFunction.Arn
NOAAStationsFetchFunction:
Description: NOAA Stations Fetch Lambda Function ARN
Value: !GetAtt NOAAStationsFetchFunction.Arn
NOAAStationsFetchFunctionIamRole:
Description: Implicit IAM Role created for NOAA Stations Fetch function
Value: !GetAtt NOAAStationsFetchFunction.Arn