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:
- Open the Beanstalk console
- Add an application tag, (optionally)
- Choose a platform
- 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.
- Creates an Elastic Beanstalk application named example.
- 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
- An Amazon EC2 instance.
- Creates a new application version named Sample Application. This is the default Elastic Beanstalk application file.
- 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
- 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).
- Docker – docker.zip
- Multicontainer Docker – docker-multicontainer-v2.zip
- Preconfigured Docker (Glassfish) – docker-glassfish-v1.zip
- Go – go.zip
- Corretto – corretto.zip
- Tomcat – tomcat.zip
- .NET Core on Linux – dotnet-core-linux.zip
- .NET – dotnet-asp-v1.zip
- Node.js – nodejs.zip
- PHP – php.zip
- Python – python.zip
- Ruby – ruby.zip
- Open the Elastic Beanstalk console and in the regions list, select your AWS Region.
- In your navigation panel, choose our Environment from the lists.
- On the environment page, choose upload and deploy
- Choose File, and also upload the sample application source code that you downloaded.
- 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.
Cookies are important to the proper functioning of a site. To improve your experience, we use cookies to remember log-in details and provide secure log-in, collect statistics to optimize site functionality, and deliver content tailored to your interests. Click Agree and Proceed to accept cookies and go directly to the site or click on View Cookie Settings to see detailed descriptions of the types of cookies and choose whether to accept certain cookies while on the site.
About Author
Saurav Kumar
Saurav is a DevOps Engineer. He has good knowledge of AWS, Linux, Jenkins, Docker.