AWS Certified Developer – Associate (DVA-C02) — Question 102
A company has a front-end application that runs on four Amazon EC2 instances behind an Elastic Load Balancer (ELB) in a production environment that is provisioned by AWS Elastic Beanstalk. A developer needs to deploy and test new application code while updating the Elastic Beanstalk platform from the current version to a newer version of Node.js. The solution must result in zero downtime for the application.
Which solution meets these requirements?
Answer options
- A. Clone the production environment to a different platform version. Deploy the new application code, and test it. Swap the environment URLs upon verification.
- B. Deploy the new application code in an all-at-once deployment to the existing EC2 instances. Test the code. Redeploy the previous code if verification fails.
- C. Perform an immutable update to deploy the new application code to new EC2 instances. Serve traffic to the new instances after they pass health checks.
- D. Use a rolling deployment for the new application code. Apply the code to a subset of EC2 instances until the tests pass. Redeploy the previous code if the tests fail.
Correct answer: C
Explanation
The correct answer is C, as an immutable update allows for new EC2 instances to be created with the updated application code without affecting the existing instances, ensuring zero downtime. Options A and D could lead to temporary unavailability during the deployment process, and option B would cause downtime since it updates all instances at once without a rollback plan until after testing.