AWS ELASTIC BEANSTALK(Platform As A Service)

Akshat Soni
5 min readApr 11, 2021

Holla Amigo!!!

Today I would like to discuss the AWS ElasticBeanstalk Service.

This service provides the fastest and simplest way to get web applications up and running on AWS. Developers simply upload their application code and the service automatically handles all the details such as resource provisioning, load balancing, auto-scaling, and monitoring. Elastic Beanstalk is ideal if you have a PHP, Java, Python, Ruby, Node.js, .NET, Go, or Docker web application. Elastic Beanstalk uses core AWS services such as Amazon EC2, Amazon Elastic Container Service (Amazon ECS), Auto Scaling, and Elastic Load Balancing to easily support applications that need to scale to serve millions of users.

It also provides us an option to customize our web application such as connecting it with the RDS or monitoring these applications etc.

An Elastic Beanstalk application is a logical collection of Elastic Beanstalk components, including environments, versions, and environment configurations. In Elastic Beanstalk an application is conceptually similar to a folder.

In Elastic Beanstalk, an application version refers to a specific, labeled iteration of deployable code for a web application. An application version points to an Amazon Simple Storage Service (Amazon S3) object that contains the deployable code, such as a Java WAR file. An application version is part of an application. Applications can have many versions and each application version is unique. In a running environment, you can deploy any application version you already uploaded to the application, or you can upload and immediately deploy a new application version. You might upload multiple application versions to test the differences between one version of your web application and another.

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 create an environment, Elastic Beanstalk provisions the resources needed to run the application version you specified

This service provides a dedicated server to our application along with a lot of other features like load balancers, auto-scaling groups, databases, etc.

Many of the people confused this service with the serverless services but in the serverless service like Lambda services it did not provide any dedicated servers, Lambda services are helpful when we need to perform any specific operation. For example, I am a Machine Learning Engineer and I want whenever a new dataset (.csv file) uploads in the s3 bucket, there I want to remove some columns, For this purpose, I can write a python code using pandas and NumPy and using the Lambda Service I can integrate this function with the S3 bucket and perform the complete task.

But if the requirement is like I want to host a web application for which I require both python and flask, Then I can choose between the EC2 service and the Elastic Beanstalk service. Again if we use the EC2 service we first need to select the AMIs and then launch the instance and then configure our web application. Instead of doing all these things we can directly upload our code either from the s3 bucket or locally to the EB portal and deploy our application.

Also, all the practicals I did so far is using AWS cli as it is faster and helps me keep a record of what and how many resources I have used but for this service prefer you all to use the WebConsole as it is easier otherwise you first need to create eb application with cli then the application version and then set up the environment configurations.

First Goto you AWS Management Console and then search for ElasticBeanstalk. Click on Create Application

Give the application name

Then select the platform on which your web app works

I have selected Php stable version just to run some web pages.

Now directly upload the zip file which contains your webpages or uploads this zip file into your S3 bucket and paste the URL there

But if you want your app to be monitored regularly or you want to connect it with the databases then click on the configure more options

Now you will see all the different operations you can edit for the app

Click on create app.

This will now open an event log for you, where you can check all the resources created for your app such as the security groups, IAM roles, instances, etc.

After the application is deployed, click on the Applications tab on the left side -> click on your app name

Using this URL you will be redirected to your app page via a load balancer, you can check the details in your ec2 dashboard also, This service will automatically launch an EC2 instance, create an IAM role(for EC2 service to access other Service like S3, Cloudfront, etc), creates a load balancer, a security group, and also for the logs it uses cloudwatch services, and also on customization it will run add some more components here.

On clicking the URL you will be redirected to your webpage

For deleting this application go back to the Application Page and there select the app then on Actions use Delete application.

This will be all from my side in this service. Hope this helps.

THANK YOU!!!

--

--