Question 829 of 247
SOA-C02 Deployment, Provisioning, and Automation Practice Question
A SysOps administrator uses AWS CloudFormation to deploy infrastructure. The admin has a template that creates an EC2 instance with a custom software stack. The software stack must be installed and configured using PowerShell scripts. The admin wants to minimize operational overhead by automating the creation of an AMI that includes the software stack, and the AMI should be rebuilt on a weekly basis to include the latest security patches. Which combination of AWS services should be used?
⚠ Common exam trap
The trap here is that candidates may overcomplicate the solution by choosing a multi-service orchestration (like CodePipeline + CodeBuild) when a single, purpose-built service (EC2 Image Builder) is designed exactly for this use case, leading to unnecessary complexity and operational overhead.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Use EC2 Image Builder to define a component with the PowerShell scripts, create a recipe, and schedule a pipeline to run weekly.
EC2 Image Builder is purpose-built for automating the creation, patching, and testing of custom AMIs. By defining a component that encapsulates the PowerShell scripts, creating a recipe that references that component, and scheduling a pipeline to run weekly, the administrator achieves fully automated, repeatable AMI builds with minimal operational overhead. This directly meets the requirement for weekly rebuilds with the latest security patches.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Use EC2 Image Builder to define a component with the PowerShell scripts, create a recipe, and schedule a pipeline to run weekly.
Why this is correct
EC2 Image Builder is the purpose-built AWS service for producing golden AMIs. A component encapsulates the PowerShell script logic, a recipe bundles that component with a base image and OS settings, and a pipeline can be scheduled to run weekly to automatically build, validate, and register the AMI. It also supports post-build testing and cross-account/region distribution, giving a fully managed, auditable image lifecycle with minimal operational overhead.
- ✗
Use AWS Systems Manager Automation to run a PowerShell script on an existing EC2 instance, then manually create an AMI each week.
Why it's wrong here
Systems Manager Automation can certainly run PowerShell scripts via an SSM runbook, but the described workflow still inserts a manual step to create the AMI from the instance. While you could build a custom automation runbook to create an AMI, this solution neither natively orchestrates the full image build/test/distribute cycle nor offers a managed schedule without extra configuration. The manual touch weekly raises the risk of human error, configuration drift, and missed maintenance — problems Image Builder is designed to eliminate.
- ✗
Use AWS CodePipeline with CodeBuild to run the PowerShell scripts and create an AMI using the AWS CLI, triggered by a weekly CloudWatch Events schedule.
Why it's wrong here
CodeBuild is primarily designed for compiling code and building software artefacts in a containerised environment, not for provisioning and configuring an EC2 instance to create an AMI. While it can run AWS CLI commands, it lacks the native, managed workflow for instance-based software installation and AMI creation, which would increase operational overhead. CodePipeline with CodeBuild is excellent for CI/CD, such as building Docker images or deploying applications, and would be suitable if the goal was to build a software package for deployment rather than an immutable AMI.
- ✗
Use Amazon EC2 Auto Scaling with a lifecycle hook to run the PowerShell script on instance launch, and schedule a weekly instance refresh.
Why it's wrong here
Auto Scaling lifecycle hooks only let you run code during instance launch or termination; they do not generate a reusable AMI. Every scale-out event would reinstall software at boot, which increases launch time and makes instances mutable rather than using a pre-baked golden image. A weekly instance refresh can replace instances, but it is a deployment mechanism for already-built AMIs, not an image factory — it adds operational friction without ever producing an artifact you can reuse in other environments or accounts.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Last reviewed: Jun 11, 2026
This SOA-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SOA-C02 exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.