-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate.yaml
More file actions
28 lines (25 loc) · 753 Bytes
/
template.yaml
File metadata and controls
28 lines (25 loc) · 753 Bytes
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
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Description: >
A template for deploying a Docker-based Go Lambda function with API Gateway.
Resources:
GoFunction:
Type: 'AWS::Serverless::Function'
Properties:
PackageType: Image
ImageUri: <account-id>.dkr.ecr.<region>.amazonaws.com/lambda-go-rest:latest
Events:
ApiEvent:
Type: Api
Properties:
Path: /{proxy+}
Method: ANY
RestApiId: !Ref ApiGateway
ApiGateway:
Type: 'AWS::Serverless::Api'
Properties:
StageName: Prod
Outputs:
ApiUrl:
Description: "URL for the API"
Value: !Sub "https://${ApiGateway}.execute-api.${AWS::Region}.amazonaws.com/Prod/"