File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
examples/2016-10-31/lambda_safe_deployments Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ resource:
93
93
Type : AWS::Serverless::Function
94
94
Properties :
95
95
Handler : index.handler
96
- Runtime : nodejs6 .10
96
+ Runtime : nodejs8 .10
97
97
AutoPublishAlias : live
98
98
DeploymentPreference :
99
99
Type : Linear10PercentEvery10Minutes
@@ -162,8 +162,8 @@ resource:
162
162
- Effect : " Allow"
163
163
Action :
164
164
- " lambda:InvokeFunction"
165
- Resource : !Ref MyLambdaFunction.Version
166
- Runtime : nodejs6 .10
165
+ Resource : !GetAtt MyLambdaFunction.Arn
166
+ Runtime : nodejs8 .10
167
167
FunctionName : ' CodeDeployHook_preTrafficHook'
168
168
DeploymentPreference :
169
169
Enabled : false
@@ -286,7 +286,7 @@ Hooks are extremely powerful because:
286
286
- Effect : " Allow"
287
287
Action :
288
288
- " lambda:InvokeFunction"
289
- Resource : !Ref MyLambdaFunction.Version
289
+ Resource : !GetAtt MyLambdaFunction.Arn
290
290
291
291
Checkout the lambda_safe_deployments _ folder for an example for how to create SAM template that contains a hook function.
292
292
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ Resources:
34
34
- Effect : " Allow"
35
35
Action :
36
36
- " lambda:InvokeFunction"
37
- Resource : !Ref safeTest.Version
37
+ Resource : !GetAtt safeTest.Arn
38
38
Runtime : nodejs8.10
39
39
FunctionName : ' CodeDeployHook_preTrafficHook'
40
40
DeploymentPreference :
You can’t perform that action at this time.
0 commit comments