How to create a new application environment in Elastic Beanstalk
Hello Everyone
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.
https://cloudaffaire.com/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.
Environment:
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.
Environment Tier:
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.
Environment Configuration:
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.
Cleanup:
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
https://docs.aws.amazon.com/elastic-beanstalk/index.html