How to create a new application environment in Elastic Beanstalk
Welcome to CloudAffaire and this is Debjeet.
In the last blog post, we have discussed how to enable application version lifecycle policy in Elastic Beanstalk.
In this blog post, we will discuss how to create a new application environment in Elastic Beanstalk.
Application environment in Elastic Beanstalk:
An application environment is the collection of resources running an application version. You can consider each environment as sperate instance of your application and 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. When you deploy a new application, Elastic Beanstalk automatically creates a default environment for your application. Below are the key concepts related to an application environment in Elastic Beanstalk.
An environment is a collection of AWS resources running an application version. Each environment runs only one application version at a time; however, you can run the same application version or different application versions in many environments simultaneously.
When you launch an Elastic Beanstalk environment, you first choose an environment tier. The environment tier designates the type of application that the environment runs, and determines what resources Elastic Beanstalk provisions to support it. An application that serves HTTP requests runs in a web server environment tier. An environment that pulls tasks from an AWS Simple Queue Service (AWS SQS) queue runs in a worker environment tier.
An environment configuration identifies a collection of parameters and settings that define how an environment and its associated resources behave. When you update an environment’s configuration settings, Elastic Beanstalk automatically applies the changes to existing resources or deletes and deploys new resources.
Next, we are going to create a new environment for our web tier application.
Prerequisite for this demo:
- PHP web application deployed to Elastic Beanstalk (as per previous blog post)
Step 1: Login to the AWS console and navigate to ‘Elastic Beanstalk’.
Step 2: From ‘Actions’ click ‘Create environment’.
Step 3: Select the environment tier.
Step 4: Provide your environment configuration details and click ‘Create environment’.
Note: This will create new resources (EC2, EIP, SG, etc.) for your new application environment.
Our new application environment created successfully.
Gen inside the environment that you want to delete and from ‘Actions’ click ‘Terminate Environment’.
Provide the environment name and click ‘Terminate’.
Hope you have enjoyed this article. In the next blog post, we will discuss Elastic Beanstalk environment configurations.
To get more details on AWS Elastic Beanstalk, please refer below AWS documentation