Courseiva
Question 1,083 of 247
Deployment, Provisioning, and AutomationhardMultiple SelectObjective-mapped

Elastic Beanstalk Custom AMI Configuration: Steps and Best Practices

A company uses AWS Elastic Beanstalk to deploy a web application. The application requires a custom Amazon Linux 2 AMI with specific security agents installed. The company wants to ensure that all environment instances use this custom AMI. Which combination of steps should be taken? (Choose two.)

Quick Answer

The correct combination is to create a custom AMI from the base Elastic Beanstalk platform and then configure the .ebextensions folder to set that AMI ID for the Auto Scaling launch configuration. This works because Elastic Beanstalk uses a launch template or launch configuration to provision EC2 instances, and the aws:autoscaling:launchconfiguration namespace in the .ebextensions folder allows you to override the default platform AMI with your custom one, ensuring all environment instances run the hardened image with required security agents. On the AWS Certified SysOps Administrator Associate SOA-C02 exam, this scenario tests your understanding of environment customization and the distinction between platform-managed and custom configurations. A common trap is thinking Packer is mandatory or that the AMI ID belongs in a CloudFormation template, but the key is that the custom AMI must be derived from the Elastic Beanstalk base to maintain compatibility. Memory tip: “Ebextensions for AMI, not CloudFormation or Packer.”

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

Create a custom AMI using the Elastic Beanstalk platform as the base.

To ensure all environment instances use a custom AMI with specific security agents, you must create the custom AMI from the Elastic Beanstalk platform (C) to maintain compatibility. Then configure the .ebextensions folder to set the AMI ID in the Auto Scaling launch configuration using the aws:autoscaling:launchconfiguration namespace (D). Option A is incorrect because the AMI ID is set in the environment configuration, not a CloudFormation template. Option B is incorrect because CodeDeploy deploys application code, not the AMI itself. Option E is incorrect because while Packer can be used to create AMIs, it is not required; the custom AMI must be based on the Elastic Beanstalk platform, not any base image.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Set the AMI ID in a CloudFormation template and associate it with the environment.

    Why it's wrong here

    Elastic Beanstalk does not use CloudFormation templates for AMI selection.

  • Use AWS CodeDeploy to deploy the application to the custom AMI.

    Why it's wrong here

    CodeDeploy is for application deployment, not for creating custom AMIs.

  • Create a custom AMI using the Elastic Beanstalk platform as the base.

    Why this is correct

    This ensures compatibility with the platform.

  • Configure the .ebextensions folder to set the AMI ID for the Auto Scaling launch configuration.

    Why this is correct

    This allows specifying the custom AMI in the environment.

  • Use Packer to create the custom AMI from any base image.

    Why it's wrong here

    Must use the Elastic Beanstalk platform as base to avoid issues.

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 →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

2 more ways this is tested on SOA-C02

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. A company is using AWS Elastic Beanstalk to deploy a web application. The application requires a custom Amazon Machine Image (AMI) that includes specific software. The administrator creates a custom AMI and configures the Elastic Beanstalk environment to use it. However, new instances launched during scaling use the default platform AMI instead. What is the MOST likely cause?

hard
  • A.The custom AMI ID is specified in the environment properties instead of the launch configuration.
  • B.The custom AMI is encrypted, and the instance profile does not have permissions to decrypt it.
  • C.The Elastic Beanstalk platform version is incompatible with the custom AMI.
  • D.The custom AMI is configured in the environment's launch configuration, but the environment has not been updated to replace existing instances.

Why D: When you update the launch configuration in an Elastic Beanstalk environment to use a custom AMI, existing instances are not automatically replaced. The new AMI only applies to instances launched during scaling or environment updates that trigger instance replacement. Since the administrator did not perform an environment update that replaces existing instances, the running instances continue to use the default platform AMI.

Variation 2. A company wants to use AWS Elastic Beanstalk to deploy a web application. The application requires a custom Amazon Linux 2 AMI with specific security agents installed. The company wants to ensure that all environment instances use this custom AMI. Which combination of steps should be taken? (Choose three.)

medium
  • A.Configure the Elastic Beanstalk environment to use the custom AMI by specifying the AMI ID in the .ebextensions configuration.
  • B.Create a CloudFormation template to deploy the environment with the custom AMI.
  • C.Create a custom AMI using the Elastic Beanstalk platform image as the base.
  • D.Create a custom AMI using AWS Image Builder.
  • E.Use a configuration file in the .ebextensions folder to set the AMI ID for the Auto Scaling launch configuration.

Why A: To use a custom AMI with Elastic Beanstalk, you must first create the AMI from the Elastic Beanstalk platform image (option C) to ensure compatibility. Then, you must configure the environment to use this AMI, which can be done by specifying the AMI ID in the .ebextensions configuration (option A) and by using a configuration file in the .ebextensions folder to set the AMI ID for the Auto Scaling launch configuration (option E). Option B is incorrect because a CloudFormation template is not required; Elastic Beanstalk natively supports custom AMIs. Option D is incorrect because while AWS Image Builder can create AMIs, the custom AMI must be based on the Elastic Beanstalk platform image, not built from scratch. Therefore, the correct combination is A, C, and E.

Last reviewed: Jun 20, 2026

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.

Loading comments…

Sign in to join the discussion.

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.