A developer must use a reusable template to automate deployment of an application onto Amazon EC2 instances. The solution must support repeated deployments, installation and updates of application resources, produce identical environments, and allow rollbacks to previous versions. Which solution satisfies these requirements?
Choose an answer
Tap an option to check your answer.
Correct answer: Use AWS CloudFormation to author an infrastructure template (JSON or YAML) that deploys the EC2 instances. Use CloudFormation helper scripts to install required software and start the application, and invoke those scripts from the template..
Why this is the answer
AWS CloudFormation is the correct choice because it allows you to define your infrastructure as code using templates (JSON or YAML). This enables repeatable deployments, ensures identical environments, and supports version control for easy rollbacks. CloudFormation helper scripts (like cfn-init) can be used within the template to install software and configure applications on EC2 instances during deployment. AWS Amplify is primarily for front-end web and mobile applications and doesn't directly manage EC2 instance deployments in this manner. AWS CodeBuild is a continuous integration service for compiling code, running tests, and producing deployable artifacts, but it's not a deployment orchestration tool for infrastructure itself. AWS AppSync is a managed GraphQL service and is not used for deploying applications onto EC2 instances.
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