-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.yaml
49 lines (45 loc) · 1.42 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
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: goreleaser-aws-lambda-example
# More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst
Globals:
Function:
Timeout: 15
MemorySize: 128
Parameters:
AppVersion:
Type: String
Default: latest
AppName:
Type: String
Default: app-name
AppReleaseS3Bucket:
Type: String
Default: goreleaser-s3-bucket
AppReleaseS3Key:
Type: String
Default: example.zip
Resources:
GoReleaserExampleFunction:
Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction
Properties:
CodeUri:
Bucket: !Ref AppReleaseS3Bucket
Key: !Ref AppReleaseS3Key
Handler: !Ref AppName
Runtime: go1.x
Architectures:
- x86_64
Environment:
Variables:
APP_VERSION: !Ref AppVersion
APP_NAME: !Ref AppName
APP_S3_BUCKET: !Ref AppReleaseS3Bucket
APP_S3_KEY: !Ref AppReleaseS3Key
Outputs:
GoReleaserExampleFunction:
Description: "First Lambda Function ARN"
Value: !GetAtt GoReleaserExampleFunction.Arn
GoReleaserExampleFunctionIamRole:
Description: "Implicit IAM Role created for GoReleaserExampleFunction"
Value: !GetAtt GoReleaserExampleFunctionRole.Arn