SOA-C02 Question 152
Single answerYour organization frequently provisions EC2 instances with specific configurations, installs custom software, and applies security hardening measures. The process is currently manual and time-consuming. You have been tasked with automating this process to improve efficiency and accuracy. Which solution would best achieve this goal?
- A
Use AWS CloudFormation to create a template for provisioning and configuring the EC2 instances with the required settings and software.
- B
Manually create an EC2 instance, configure it as needed, and use the AWS Management Console to replicate the configuration for future instances.
- C
Write a script using the AWS SDK to launch EC2 instances and configure them programmatically.
- D
Create an AMI from a pre-configured EC2 instance and use it for provisioning new instances with identical configurations.
Show answer and explanation
Correct answer: A
Explanation
AWS CloudFormation is the ideal solution for automating repeatable processes like provisioning and configuring EC2 instances. By defining infrastructure as code, it ensures consistency, reduces manual effort, and allows easy updates or scaling. While other options may partially address the problem, they lack the full automation, reusability, and scalability provided by CloudFormation.
- A. Correct.
AWS CloudFormation allows you to define infrastructure as code, enabling you to automate the provisioning and configuration of EC2 instances while ensuring consistency and repeatability. This is the best solution for automating the described process.
- B. Incorrect.
Manually replicating configurations is not automated and does not address the need for efficiency and accuracy. This is not a recommended approach.
- C. Incorrect.
While using the AWS SDK can automate some parts of the process, it does not provide the same level of infrastructure as code or reusability benefits as AWS CloudFormation.
- D. Incorrect.
Creating an AMI is helpful for deploying identical configurations, but it does not fully automate the provisioning process (e.g., automatically applying updates or handling software dependencies dynamically).