Serverless-application-model: Allow arbitrary named hook functions for Pre and Post Hook feature of Safe Deployments.

Created on 9 Jan 2018  路  3Comments  路  Source: aws/serverless-application-model

If you need to use the Pre or Post Hook feature of the Safe Deployments, you need to name the hook function with a prefix (CodeDeployHook_). This is not super clear and breaks the mental model customers have on naming CloudFormation resources.

Option 1:
To make this feature more flexible and allow customers to follow the naming schema's they wish, I am proposing to add a Policy Template. This would be mostly the same IAM Role CodeDeploy needs that takes the hook functions in as a parameter.

Option 2:
SAM could create the CodeDeploy IAM Role and inject the Lambda Function arns into the policy. In the DeploymentPreference block, customers are already defining the functions for the pre and post hook.

Thoughts?

arepolicy-templates aresafe-deployments stagneeds-feedback stagpm-review typdesign typfeature

Most helpful comment

Just lost some time to this, pretty infuriating and doesn't even follow published AWS best practices.

Any chance we will see action on this before another year passes?

Thanks!

All 3 comments

Is there any update on this issue? On my account I don't have permissions to name functions CodeDeployHook_ and this make the preTraffic impossible.

Stumbled upon this limitation today. I vigorously vote for option 2.

I love SAM because it's laser focused on simplicity that covers most use cases instead of trying to be a general tool like CloudFormation already is.

Just lost some time to this, pretty infuriating and doesn't even follow published AWS best practices.

Any chance we will see action on this before another year passes?

Thanks!

Was this page helpful?
0 / 5 - 0 ratings