Ends in
00
days
00
hrs
00
mins
00
secs
SHOP NOW

PRE-BLACK FRIDAY SALE - GET 20% OFF ALL REVIEWERS

Find answers, ask questions, and connect with our
community around the world.

Home Forums AWS AWS Certified DevOps Engineer Professional Lambda Lifecycle Hook Reply To: Lambda Lifecycle Hook

  • Jon-Bonso

    Administrator
    April 13, 2020 at 11:12 am

    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