Home › Forums › AWS › AWS Certified DevOps Engineer Professional › Lambda Lifecycle Hook
-
Lambda Lifecycle Hook
Jon-Bonso updated 4 years, 5 months ago 2 Members · 2 Posts -
Hi ,
I think that there is an error in one of the answer provided for the devops pro tests.
AfterAllowTestTraffic is no a hook that is present for Lambda but just for ECS Hence this answer should be wrong. Any idea?
The question is this one
-
Hi Marco,
The scenario says:
You have created a mobile app that allows users to rate and review hotels they have stayed on. The app is hosted on Docker containers deployed on Amazon ECS. You need to run validation scripts for new deployments to determine if the application is working as expected before allowing production traffic to flow to the new app version. You also want to configure automatic rollback if the validation is not successful.
Which of the following options will you do to implement this validation?
The correct answer is:
Create your validation scripts in AWS Lambda and define them on the AfterAllowTestTraffic lifecycle hook of the AppSpec.yaml file. The functions can validate the deployment using the test traffic and rollback if the tests fail.
It is true that Lambda doesn’t have an AfterAllowTestTraffic lifecycle hook. However, take note that this scenario is an ECS deployment, not a Lambda deployment.
The Lambda function here is only used as a validation script for the AfterAllowTestTraffic lifecycle hook. and not as a For more information about this, please visit:
https://docs.aws.amazon.com/codedeploy/latest/userguide/tutorial-ecs-deployment-with-hooks.html
Let us know if you need further assistance. The Tutorials Dojo team is dedicated to help you pass your AWS exam on your first try!
Regards,
Jon Bonso @ Tutorials Dojo
Log in to reply.