Free AWS Certified Developer - Associate practice — 6 questions on Deployment, with explanations. No sign-up.
Full 12-question mixed test →
Question 1 of 6 · Deployment
A developer deploys an update to a Lambda function using AWS CodeDeploy with an AppSpec file that defines a BeforeAllowTraffic hook. The hook function runs integration tests against the new Lambda version's alias before traffic shifts. The hook function returns a failure status. What happens to the deployment?
Lifecycle hook failures (BeforeAllowTraffic, AfterAllowTraffic) cause CodeDeploy to fail the deployment and roll back, so traffic is never shifted to the new version — this is how validation gates protect production traffic.
Question 2 of 6 · Deployment
A CloudFormation stack named NetworkStack exports a subnet ID value using the Export field in its Outputs section. Another stack, AppStack, imports this value with Fn::ImportValue. A developer attempts to update NetworkStack to change the exported subnet ID value. What is the result?
CloudFormation prevents you from modifying or deleting an exported output value while any other stack has an active Fn::ImportValue reference to it — the update call fails until the dependent import is removed.
Question 3 of 6 · Deployment
A team wants AWS CodeDeploy to manage blue/green deployments for an Amazon ECS service, shifting traffic between task sets behind an Application Load Balancer. Which ECS service configuration setting is required to enable this?
ECS services support three deployment controller types: ECS (rolling), CODE_DEPLOY (blue/green), and EXTERNAL. To let CodeDeploy manage traffic shifting via an AppSpec file and a load balancer, the service must explicitly use the CODE_DEPLOY controller type.
Question 4 of 6 · Deployment
A company wants to standardize on AWS CodeArtifact as the single package source for its build systems, while still allowing developers to pull public npm packages through that same CodeArtifact repository without manually re-uploading each dependency. Which configuration meets this requirement?
CodeArtifact repositories support 'external connections' to public package repositories such as npmjs, PyPI, Maven Central, and NuGet Gallery. Once configured, requests for packages not already cached are automatically fetched from the public source and cached in CodeArtifact.
Question 5 of 6 · Deployment
A SAM template defines AutoPublishAlias: live along with a DeploymentPreference of Type: Canary10Percent5Minutes and an Alarms list pointing to a CloudWatch alarm on function errors. During deployment, 10% of traffic is shifted to the new version. At minute 3 of the 5-minute canary window, the CloudWatch alarm enters ALARM state. What happens next?
When a CloudWatch alarm referenced in the DeploymentPreference's Alarms list enters ALARM state during a canary or linear deployment, CodeDeploy automatically triggers a rollback, repointing the alias back to the previous stable version.
Question 6 of 6 · Deployment
An Elastic Beanstalk environment needs a deployment policy that launches an entirely new, fully-sized set of instances in a temporary Auto Scaling group, runs health checks against them, shifts all traffic to the new instances only after they pass, and automatically terminates the old instances afterward — minimizing any risk of degrading current production capacity during the deployment. Which Elastic Beanstalk deployment policy satisfies this?
The Immutable deployment policy launches a full set of new instances in a separate temporary Auto Scaling group alongside the existing fleet, verifies their health, then shifts traffic and terminates the old instances — providing the safest rollback and zero impact on existing capacity during validation.
Ready for the real thing?
The full course: two full-length practice tests, video lessons for every exam domain, hands-on labs and detailed explanations.
$109.99$34.99 with code FREETEST33 — valid through September 19.