Q97 — AWS DOP-C02 Ch.2

Question 97 of 100 | ← Chapter 2

A DevOps engineer wants to automate the creation of Linux AMIs. Newly created AMIs must be tagged, and the build pipeline must programmatically access the location of the newly tagged AMI. What is the most cost-effective method to perform this operation?

Correct Answer: B. Create an AWS Systems Manager Automation runbook containing instructions for creating the image. Build a pipeline in AWS CodePipeline to execute the runbook to create the AMI. Store the AMI identifier output as a Systems Manager Parameter Store parameter.

Explanation

Option B is the most cost-effective method. AWS Systems Manager Automation runbooks efficiently encapsulate image creation logic, and invoking them via CodePipeline is simple and direct. Storing the AMI identifier in Systems Manager Parameter Store enables easy, programmatic access by downstream pipelines without requiring additional infrastructure or complex integrations. In contrast, Option A involves cumbersome OVF handling and conversion; Option C introduces unnecessary Lambda and DynamoDB costs and complexity; Option D requires managing EC2 instances, installing Packer, and maintaining Jenkins—adding operational overhead and expense. Thus, Option B is optimal.