exam questions

Exam AWS Certified Developer Associate All Questions

View all questions & answers for the AWS Certified Developer Associate exam

Exam AWS Certified Developer Associate topic 1 question 12 discussion

Exam question from Amazon's AWS Certified Developer Associate
Question #: 12
Topic #: 1
[All AWS Certified Developer Associate Questions]

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?

  • A. Create a Dockerfile. Configure Elastic Beanstalk to build the application as a Docker image.
  • B. Create a docker-compose.yml file. Use the Elastic Beanstalk CLI to deploy the application.
  • C. Create a .zip file that contains the Docker image. Upload the .zip file to Elastic Beanstalk.
  • D. Create a Dockerfile. Run the Elastic Beanstalk CLI eb local run command in the same directory.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Vinafec
Highly Voted 2 years, 7 months ago
Selected Answer: B
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/docker.html#single-container-docker.deploy-remote Deploy a remote Docker image to Elastic Beanstalk After testing your container locally, deploy it to an Elastic Beanstalk environment. Elastic Beanstalk uses the docker-compose.yml file to pull and run your image if you are using Docker Compose. Otherwise, Elastic Beanstalk uses the Dockerrun.aws.json instead. Use the EB CLI to create an environment and deploy your image. ~/remote-docker$ eb create environment-name
upvoted 23 times
Krok
2 years, 1 month ago
Ok, answer B is possible. But why answer A is incorrect?
upvoted 1 times
Yahya_Badawy
1 year ago
Cuz the question mentions that the CI/CD process already builds and pushes the docker image to public registry, but answer(A) states "Create a Dockerfile" which is unnecessary since image is already built and pushed. All you need is to run with compose.
upvoted 1 times
...
...
...
sumanshu
Most Recent 4 months, 1 week ago
Selected Answer: B
A) Eliminated - This option is not efficient because the Docker image is already pre-built and available in a public registry. Elastic Beanstalk does not need to rebuild the image; it can pull the image directly.
upvoted 2 times
sumanshu
4 months, 1 week ago
B) Correct - the most efficient way is to use a docker-compose.yml file. This allows Elastic Beanstalk to fetch the pre-built Docker image from the registry and deploy it to the Elastic Beanstalk environment.
upvoted 2 times
sumanshu
4 months, 1 week ago
C) Eliminated - Elastic Beanstalk does not accept Docker images inside a .zip file. Instead, it expects either a Dockerfile or a docker-compose.yml to instruct how to pull or build the image
upvoted 1 times
sumanshu
4 months, 1 week ago
D) Eliminated - The eb local run command is for testing the application locally. It does not deploy the application to Elastic Beanstalk. Additionally, since the Docker image is already built and stored in a public registry, creating a Dockerfile again is unnecessary.
upvoted 1 times
sumanshu
4 months, 1 week ago
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb3-local.html
upvoted 1 times
...
...
...
...
...
thucta96dn
5 months, 4 weeks ago
Selected Answer: C
This case we need to zip image and upload it to aws beanstalk
upvoted 1 times
...
gilleep_17
1 year, 3 months ago
answer B.Docker environment with Docker Compose This section describes how to prepare your Docker image and container for deployment to Elastic Beanstalk. Any web application that you deploy to Elastic Beanstalk in a Docker environment must include a docker-compose.yml file if you also use the Docker Compose tool. You can deploy your web application as a containerized service to Elastic Beanstalk by doing one of the following actions: Create a docker-compose.yml file to deploy a Docker image from a hosted repository to Elastic Beanstalk.
upvoted 1 times
...
AsmaZoheb
1 year, 3 months ago
I think option A is correct.My reason - .yml is added for confusion. Because in cicd the prosses follows - CodeCommit then code build and then code deploy by elasticbeanstalk.Elastic Beanstalk supports the deployment of web applications from Docker containers
upvoted 1 times
...
AsmaZoheb
1 year, 3 months ago
Selected Answer: A
Elastic Beanstalk supports deploying Docker containers directly. You should create a Dockerfile that defines the application's container, and then Elastic Beanstalk will use this Dockerfile to build the Docker image and deploy it to the environment. Option B mentions using docker-compose.yml, but Elastic Beanstalk typically deploys single Docker containers, so docker-compose is not necessary in this context.
upvoted 2 times
...
AsmaZoheb
1 year, 3 months ago
I think so A ,Elastic Beanstalk supports deploying Docker containers directly. You should create a Dockerfile that defines the application's container, and then Elastic Beanstalk will use this Dockerfile to build the Docker image and deploy it to the environment. Option B mentions using docker-compose.yml, but Elastic Beanstalk typically deploys single Docker containers, so docker-compose is not necessary in this context.
upvoted 1 times
...
hulongdou
1 year, 6 months ago
B, chatGTP 4 said it is B. and it says that docker-compose.yml can be used to define and run multi-container Docker applications, but it can also be used for single-container applications.
upvoted 1 times
...
cdm2009
1 year, 6 months ago
Selected Answer: B
The question explicitly states that the Docker image is already built before you get your hands on it. You only need to configure EB to load and deploy the existing image.
upvoted 1 times
...
sara_exam_topics
1 year, 7 months ago
Selected Answer: B
As the question clearly states, though CI/CD build is completed and image is pushed to artifactory. SO if image already available, then we can just refer the image in docker-compose.yaml and deploy via EB CLI.
upvoted 1 times
...
Yasser001
1 year, 10 months ago
Selected Answer: A
ChatGPT says its A
upvoted 2 times
RaidenKurosaki
1 year, 8 months ago
ChapGPT isn't a reliable source. Its still be B.
upvoted 4 times
...
...
rcaliandro
1 year, 10 months ago
I have a doubt but I would say B (I didn't put the voting comment because I am not sure about that)
upvoted 1 times
...
MrTee
2 years ago
Selected Answer: A
A. Create a Dockerfile. Configure Elastic Beanstalk to build the application as a Docker image. Option B is incorrect because using docker-compose.yml file is not recommended for Elastic Beanstalk deployments. Elastic Beanstalk supports Dockerfiles to define the application's dependencies and configuration.
upvoted 1 times
Jeremy11
1 year, 8 months ago
"using docker-compose.yml file is not recommended for Elastic Beanstalk deployments" - this is false: After testing your container locally, deploy it to an Elastic Beanstalk environment. Elastic Beanstalk uses the docker-compose.yml file to pull and run your image if you are using Docker Compose. Otherwise, Elastic Beanstalk uses the Dockerrun.aws.json instead. https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/docker.html#single-container-docker.deploy-remote
upvoted 3 times
...
...
RuTech
2 years ago
Selected Answer: B
AWS Elastic Beanstalk can launch Docker environments by building an image described in a Dockerfile or pulling a remote Docker image. If you're deploying a remote Docker image, you don't need to include a Dockerfile. Instead, if you are also using Docker Compose, use a docker-compose.yml file, which specifies an image to use and additional configuration options. If you are not using Docker Compose with your Docker environments, use a Dockerrun.aws.json file instead.
upvoted 2 times
...
Cock
2 years ago
Selected Answer: B
The question did not specify whether Docker Compose is being used, so both A and B could be correct depending on whether Docker Compose is being used or not. If Docker Compose is used, then answer option B is the correct approach for deploying a single Docker image to Elastic Beanstalk.
upvoted 1 times
...
qiaoli
2 years, 1 month ago
Selected Answer: B
I vote for B from this document, https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/GettingStarted.DeployApp.html " If you're deploying a remote Docker image, you don't need to include a Dockerfile. Instead, if you are also using Docker Compose, use a docker-compose.yml file, which specifies an image to use and additional configuration options. If you are not using Docker Compose with your Docker environments, use a Dockerrun.aws.json file instead. " The image is on the remote registry, does not make sense to build again locally using dockerfile.
upvoted 1 times
...
Krok
2 years, 1 month ago
Selected Answer: A
It's A Stephane Maarek lectures: Elastic Beanstalk – Single Docker • Run your application as a single docker container • Either provide: • Dockerfile: Elastic Beanstalk will build and run the Docker container • Dockerrun.aws.json (v1): Describe where *already built* Docker image is • Image • Ports • Volumes • Logging • Etc... • Beanstalk in Single Docker Container does not use ECS
upvoted 3 times
shasankperiwal
1 year, 10 months ago
Where is this in Stephane's lecture? I didn't find this.
upvoted 2 times
...
SJ_002
1 year, 10 months ago
It was in an older version of his lecture. His latest lecture does not contain this information. I think answer is B as per the AWS documentation: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/single-container-docker-configuration.html
upvoted 2 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago