AWS Certified Developer Associate · Free Practice Question Medium
Question 31
A .NET developer team works with many ASP.NET web applications that use EC2 instances to host them on IIS. The deployment process needs to be configured so that multiple versions of the application can run in AWS Elastic Beanstalk. One version would be used for development, testing, and another version for load testing.
Which of the following methods do you recommend?
-
A
Define a dev environment with a single instance and a 'load test' environment that has settings close to production environment
-
B
You cannot have multiple development environments in Elastic Beanstalk, just one development and one production environment
-
C
Create an Application Load Balancer to route based on hostname so you can pass on parameters to the development Elastic Beanstalk environment. Create a file in .ebextensions/ to know how to handle the traffic coming from the ALB
-
D
Use only one Beanstalk environment and perform configuration changes using an Ansible script
Reveal correct answer
Correct answer: A
Explanation
Correct option:
Define a dev environment with a single instance and a 'load test' environment that has settings close to production environment
AWS Elastic Beanstalk makes it easy to create new environments for your application. You can create and manage separate environments for development, testing, and production use, and you can deploy any version of your application to any environment. Environments can be long-running or temporary. When you terminate an environment, you can save its configuration to recreate it later.
It is common practice to have many environments for the same application. You can deploy multiple environments when you need to run multiple versions of an application. So for the given use-case, you can set up 'dev' and 'load test' environment.

You cannot have multiple development environments in Elastic Beanstalk, just one development, and one production environment - Incorrect, use the Create New Environment wizard in the AWS Management Console for BeanStalk to guide you on this.
Use only one Beanstalk environment and perform configuration changes using an Ansible script - Ansible is an open-source deployment tool that integrates with AWS. It allows us to deploy the infrastructure. Elastic Beanstalk provisions the servers that you need for hosting the application and it also handles multiple environments, so Beanstalk is a better option.
Create an Application Load Balancer to route based on hostname so you can pass on parameters to the development Elastic Beanstalk environment. Create a file in .ebextensions/ to know how to handle the traffic coming from the ALB - This is not a good design if you need to load test because you will have two versions on the same instances and may not be able to access resources in the system due to the load testing.
Reference:
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.environments.html
Discussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
