AWS Elastic Beanstalk Configuration

Posted By : Saurav Kumar | 24-Jun-2022

AWS Elastic Beanstalk Configuration

 

Introduction:

    Elastic Beanstalk can manage and deploy applications in the AWS Cloud without knowing the infrastructures that are responsible for running those applications. 

Setting up: Create an AWS account

If you're not already an AWS member, you need to create an AWS account.

To Sign up for an AWS account

        Open the Elastic Beanstalk console, on the same region

Create an application

In this step, you create a new application. Elastic Beanstalk supports multiple environments and platforms for different programming languages, application servers, and Docker containers. You choose a platform when you create the environment.

Create an application and an environment

To create your example application, you'll use the Create a web app console. It creates an Elastic Beanstalk application and launches an environment within it. An environment is the collection of AWS resources needed to run your application code.

To create an example application:

  1. Open the Beanstalk console
  2. Add an application tag, (optionally)
  3. Choose a platform
  4. If you have your source code, then select upload your code, another select sample application.

To run the sample application on AWS resources, Elastic Beanstalk takes the following actions. They take some time to complete.

  1. Creates an Elastic Beanstalk application named example.
  2. Launches an environment named example-env with these AWS resources:

     
    • An Amazon EC2 instance.
       
    • An Amazon EC2 security group
       
    • An Amazon Simple Storage Service bucket (Amazon S3)
       
    • Amazon CloudWatch alarms
       
    • An AWS Cloud Formation stacks
       
    • A domain name
       
  3. Creates a new application version named Sample Application. This is the default Elastic Beanstalk application file.
     
  4. Deploys the code for the application in the example-env environment.
     

During the environment creation process, the console tracks progress and shows events.

 




 

Explore our environments

    Open Elastic Beanstalk console and in the regions list, select your AWS Region.

    In your navigation panel, choose our Environment.


 

 

During the period, Elastic Beanstalk creates your AWS resources and launches your application, the environment is pending. Status messages about launch events are continuously appended to the overview.

The environment's URL is located on the cover of the overview, below the environment name. This is the URL of the web application where the environment is running.

Deploy a new Version:

To update your application version

  1. Download the example application that matches your environment's platform. Use one of the following applications(this updated version zip file is taken from AWS documentation).
     
  1. Open the Elastic Beanstalk console and in the regions list, select your AWS Region.
  2. In your navigation panel, choose our Environment from the lists.
  3. On the environment page, choose upload and deploy
  4. Choose File, and also upload the sample application source code that you downloaded.

  1. Choose Deploy

 

During the period, Elastic Beanstalk deploys your file to your Amazon EC2 instances, you can check the deployment status on the environment's overview page. After the application version is updated, the Environment Health status is gray. When the deployment is complete, Elastic Beanstalk performs an application health check operation. When the application responds to the health check, it's considered healthy and the status change to green. The environment overview shows the new Running Version and—the name you provided as the Version label.

 

About Author

Author Image
Saurav Kumar

Saurav is a DevOps Engineer. He has good knowledge of AWS, Linux, Jenkins, Docker.

Request for Proposal

Name is required

Comment is required

Sending message..