1.3 Build and manage artifacts.
1.A company's security policy mandates that all EC2 instances must be launched from a pre-approved, hardened 'golden AMI'. This AMI must contain the latest OS security patches and specific corporate monitoring and logging agents. The process for creating and validating this AMI needs to be fully automated, repeatable, and version-controlled. Which two AWS services are best suited to build an automated pipeline for this purpose?(Select 2)
- A.EC2 Image Builder
- B.AWS CodeDeploy
- C.AWS Systems Manager Automation
- D.AWS CloudFormation with a cfn-init script
- E.AWS DataSync
Show answer & explanation
Correct answers: A, C — EC2 Image Builder; AWS Systems Manager Automation
- A. Correct. EC2 Image Builder is a purpose-built AWS service designed specifically to automate the creation, maintenance, validation, testing, and distribution of secure, up-to-date 'golden AMIs'. It provides a complete, managed pipeline that integrates versioning and can be triggered on a schedule or by events, making it an ideal solution for this requirement.
- B. Incorrect. AWS CodeDeploy is an application deployment service used to automate the installation of application revisions onto existing compute services like EC2, Lambda, or ECS. It operates after an instance is running and is not used for creating the underlying machine images (AMIs).
- C. Correct. AWS Systems Manager Automation allows you to author custom runbooks to automate common operational tasks. It can be used to create a golden AMI pipeline by orchestrating steps such as launching a base AMI, applying patches and software using Systems Manager Run Command, running validation tests, and finally creating a new, hardened AMI from the instance. This provides a highly customizable and repeatable automation solution.
- D. Incorrect. AWS CloudFormation and its `cfn-init` helper script are used for provisioning infrastructure and configuring EC2 instances at launch time. This process occurs after an instance is launched from an AMI; it is not a tool for automating the creation, versioning, or validation of the AMI artifact itself.
- E. Incorrect. AWS DataSync is a data transfer service designed to move large amounts of data between on-premises storage systems and AWS storage services. It has no capabilities related to creating or managing EC2 AMIs.