Last active
April 22, 2016 21:54
-
-
Save kevinkarwaski/7f9472efe9f58f9f0a530406e7363a63 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"myLifecycleHookTopic" : { | |
"Type" : "AWS::SNS::Topic", | |
"Properties" : { | |
"Subscription" : [ | |
{ "Endpoint" : { "Fn::GetAtt" : [ "MyLambdaLifecycleFunction", "Arn" ] }, "Protocol" : "lambda" } | |
] | |
} | |
} | |
"myLifecycleHook": { | |
"Type": "AWS::AutoScaling::LifecycleHook", | |
"Properties": { | |
"AutoScalingGroupName": { "Ref": "myAutoScalingGroup" }, | |
"HeartbeatTimeout": 300, | |
"LifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", | |
"NotificationMetadata": { "Ref": "StackName" }, | |
"NotificationTargetARN": { "Ref": "myLifecycleHookTopic" }, | |
"RoleARN": { "Fn::GetAtt": [ "lifecycleHookRole", "Arn" ] } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment