AWS Certified Developer – Associate — Question 368

A developer needs to deploy an application to AWS Elastic Beanstalk for a company. The application consists of a single Docker image. The company's automated continuous integration and continuous delivery (CI/CD) process builds the Docker image and pushes the image to a public Docker registry.
How should the developer deploy the application to Elastic Beanstalk?

Answer options

Correct answer: B

Explanation

Since the Docker image is already built and hosted in a public registry, the developer can use a docker-compose.yml file to reference this pre-built image and deploy it using the Elastic Beanstalk CLI. Option A is incorrect because Elastic Beanstalk does not need to build the image since it is already built by the CI/CD process. Options C and D are incorrect because uploading a raw image zip file is unsupported for pre-built deployments, and eb local run only executes the container locally rather than deploying it to the AWS cloud.