forked from angstwad/ecs-lifecycle-hook
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstack.yaml
50 lines (41 loc) · 1.06 KB
/
stack.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
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Parameters:
FunctionName:
Description: Name of Lambda function
Type: String
LambdaCodeBucket:
Type: String
LambdaCodeKey:
Type: String
Default: "ops/ecs/lifecycle-hook/ecs_lifecycle_hook-latest.zip"
LambdaSnsTopicArn:
Description: Topic ARN to subscribe to
Type: String
LambdaExecutionRole:
Description: Lambda function execution role
Type: String
Resources:
LambdaFunction:
Type: "AWS::Serverless::Function"
Properties:
Handler: "handler.lambda_handler"
Runtime: python3.6
CodeUri:
Bucket: !Ref LambdaCodeBucket
Key: !Ref LambdaCodeKey
FunctionName: !Ref FunctionName
Description: Deployed with SAM
MemorySize: 128
Timeout: 10
Role: !Ref LambdaExecutionRole
Tags:
team: apollo
Events:
LifecycleHookSns:
Type: SNS
Properties:
Topic: !Ref LambdaSnsTopicArn
Outputs:
LambdaFunction:
Value: !Ref LambdaFunction