-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsam_template.yaml
44 lines (41 loc) · 1.31 KB
/
sam_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
---
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: SAM Template for budget-tracker-api
Globals:
Function:
Timeout: 10
Resources:
GetCategoryTotals:
Type: AWS::Serverless::Function
Properties:
PackageType: Image
Architectures:
- x86_64
Events:
HelloWorld:
Type: Api
Properties:
Path: /hello
Method: get
Policies:
- arn:aws:iam::621544995223:policy/ECR-read
- arn:aws:iam::aws:policy/service-role/AWSCodeDeployRoleForCloudFormation
- arn:aws:iam::aws:policy/SecretsManagerReadWrite
- arn:aws:iam::aws:policy/CloudWatchFullAccess
AutoPublishAlias: live
DeploymentPreference:
Type: LambdaCanary10Percent1Minute
Metadata:
Dockerfile: Dockerfile
DockerContext: ./
Outputs:
GetCategoryTotalsApi:
Description: "API Gateway endpoint URL for the GetCategoryTotals function"
Value: !Sub "https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/hello/"
GetCategoryTotals:
Description: "GetCategoryTotals Lambda Function ARN"
Value: "GetCategoryTotals.Arn"
GetCategoryTotalsIamRole:
Description: "Implicit IAM Role created for GetCategoryTotals function"
Value: !GetAtt GetCategoryTotalsRole.Arn