You are authoring AWS CloudFormation templates to deploy an application on Amazon ECS using AWS CodeDeploy. You want to roll out a new application version to only a percentage of users before making it available to everyone (a phased/blue-green style deployment). How should you implement this within CloudFormation?
Choose an answer
Tap an option to check your answer.
Correct answer: Add a Transform section to the CloudFormation template and include the AWS::CodeDeploy::BlueGreen hook..
Why this is the answer
The correct approach is to add a Transform section to your CloudFormation template and include the AWS::CodeDeploy::BlueGreen hook. This hook enables CloudFormation to integrate directly with AWS CodeDeploy for blue/green deployments, allowing you to specify traffic shifting and rollback configurations within your template. CloudFormation then orchestrates the deployment through CodeDeploy, managing the phased rollout to a percentage of users. Deploying a new version in a separate stack and manually updating DNS is a manual process that doesn't leverage CloudFormation's built-in blue/green capabilities. Updating the existing stack without a blue/green strategy would result in a direct in-place update, causing downtime or immediate full-scale exposure to the new version, which is not a phased rollout. Creating a nested stack for the new version is unnecessary; the AWS::CodeDeploy::BlueGreen hook is applied at the top-level stack that defines the ECS service.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed