AWS Architect Certification Training (67 Blogs) Become a Certified Professional
AWS Global Infrastructure

Cloud Computing

Topics Covered
  • AWS Architect Certification Training (58 Blogs)
  • AWS Development (8 Blogs)
  • SFDC Administration Foundation (1 Blogs)
  • Salesforce Admin and Dev Foundation (10 Blogs)
SEE MORE

AWS Elastic Beanstalk – Application Deployment Made Easy

Last updated on Jun 04,2023 16.6K Views

5 / 11 Blog from AWS Compute Services

Cloud Computing is no longer at its primal stages. It is now well established and is serving as an innovative platform, allowing companies to implement applications that would be impossible to deliver on traditional infrastructure. This success has been accompanied by an exponential increase in cloud computing services, PaaS being one of them. Amazon has launched its own service that follows PaaS model, which is AWS Elastic Beanstalk! Learn all about AWS with the AWS Training Online.

Let’s take a look at the topics covered in this AWS Beanstalk article:

  1. What is Amazon Elastic Beanstalk?
  2. Benefits of AWS Elastic Beanstalk
  3. AWS Elastic Beanstalk Components
  4. AWS Elastic Beanstalk Architecture
  5. Demo – Deploy an application on Beanstalk

What is Amazon Elastic Beanstalk?

ElasticBeanstalk - Elastic Beanstalk - Edureka

Cloud Computing is reshaping the entire application development process. A number of cloud vendors, including Amazon Web Services and Microsoft Azure, offer development tools to help make the process more simple and secure. AWS Elastic Beanstalk is one such development tool implemented based on PaaS model.

AWS Elastic Beanstalk is an easy-to-use service for deploying and scaling web applications and services developed with Java, .NET, PHP, Node.js, Python, Ruby, Go, and Docker on familiar servers such as Apache, Nginx, Passenger, and IIS.

With AWS Elastic Beanstalk, a developer can deploy an application without provisioning the underlying infrastructure while maintaining high availability. Do take a look at the following video to know more about Elastic Beanstalk.

AWS Elastic Beanstalk Tutorial | Edureka

 

But why choose Elastic Beanstalk when we already have many other platforms? So, Let’s discuss the benefits of Elastic Beanstalk.

Benefits of AWS Elastic Beanstalk

Below are some benefits that AWS Elastic Beanstalk offers over other PaaS services

Speed - Elastic Beanstalk - EdurekaOffers Quicker Deployment: Elastic Beanstalk offers developers the fastest and simplest way to deploy their application. Within minutes, the application will be ready to use without users having to deal with the underlying infrastructure or resource configuration. 

Logo - Elastic Beanstalk - EdurekaSupports Multi-Tenant Architecture: AWS Elastic Beanstalk makes it possible for users to share their applications across different devices with high scalability and security. It provides a detailed report of application usage and user profiles.           

Logo - Elastic Beanstalk - EdurekaSimplifies Operations: Beanstalk provisions and operates the infrastructure and manages the application stack. Developers have to just focus on developing code for their application rather than spending time on managing and configuring servers, databases, firewalls, and networks.

Offers Complete Resource Control: Beanstalk gives developers the freedom to select the AWS resources,Logo - Elastic Beanstalk - Edureka like EC2 instance type, that are optimal for their application. It allows developers to retain full control over AWS resources and access them at any time.

Now that we have solid reasons to believe why AWS Elastic Beanstalk is preferred by developers, let’s have a look at its fundamental concepts.

Want To Be A Certified AWS Architect?

AWS Elastic Beanstalk Components

There are certain key concepts which you will come across frequently when you deploy an application on Beanstalk. Let us have look at those concepts: 

Application:

  • An application in Elastic Beanstalk is conceptually similar to a folder
  • An application is a collection of components including environments, versions and environment configuration

Application Version:

  • An application version refers to a specific, labeled iteration of deployable code for a web application
  • An application version points to an Amazon S3 object that contains the deployable code such as a Java WAR file

Environment:

  • Environments within Elastic Beanstalk Application is where the current version of the application will be active
  • Each environment runs only a single application version at a time. But it is possible to run same or different versions of an application in many environments at the same time

Environment Tier:

Based on requirement beanstalk offers two different Environment tiers: Web Server Environment, Worker Environment

  • Web Server Environment: Handles HTTP requests from clients
  • Worker Environment: Processes background tasks which are resource consuming and time intensive

Here is an illustration to show how Application, Application version and Environments relate to each other:

AWS- Elastic-Beanstalk-Application-EdurekaAnd here is how Beanstalk Environment using default container type looks like:

AWS-Elastic-Beanstalk-Environment-Edureka
Now that you know about different key concepts pertaining to Elastic Beanstalk, let understand the architecture of Elastic Beanstalk.

AWS Elastic Beanstalk Architecture

Before getting into AWS Elastic Beanstalk architecture, let’s answer the most frequently asked question,

What is an Elastic Beanstalk Environment?

Environment refers to the current version of the application. When you launch an Environment for your application, Beanstalk asks you to choose among two different Environment Tiers i.e, Web Server Environment or Worker Environment. Let’s understand them one by one.

Check out our AWS Certification Training in Top Cities

IndiaUnited StatesOther Countries
AWS Training in HyderabadAWS Training in AtlantaAWS Training in London
AWS Training in BangaloreAWS Training in BostonAWS Training in Adelaide
AWS Training in ChennaiAWS Training in NYCAWS Training in Singapore

Web Server Environment

Application version which is installed on the Web Server Environment handles HTTP requests from the client. The following diagram illustrates an example AWS Elastic Beanstalk architecture for a Web Server Environment tier and shows how the components in that type of Environment Tier work together.

Beanstalk Environment – The Environment is the heart of the application. When you launch an Environment, Beanstalk assigns various resources that are needed to run the application successfully.

Elastic Load Balancer – When the application receives multiple requests from a client, Amazon Route53 forwards these requests to the Elastic Load Balancer. The load balancer distributes the requests among EC2 instances of Auto Scaling Group.

Auto Scaling Group – Auto Scaling Group automatically starts additional Amazon EC2 instances to accommodate increasing load on your application. If the load on your application decreases, Amazon EC2 Auto Scaling stops instances, but always leaves at least one instance running.

Host Manager – It is a software component which runs on every EC2 instance that has been assigned to your application. The host manager is responsible for various things like

  • Generating and monitoring application log files
  • Generating instance level events
  • Monitoring application server

Security Groups – Security Group is like a firewall for your instance. Elastic Beanstalk has a default security group, which allows the client to access the application using HTTP Port 80. It also provides you with an option where you can define security groups to the database server as well. The below image summarises what we have learned about Web Server Environment.

Architecture - AWS Elastic Beanstalk - Edureka

So that’s all about Web Server Environment. But what if the application version installed on Web Server Tier keeps denying multiple requests because it has encountered time intensive and resource consuming tasks while handling a request? Well, this is where Worker Tier comes into the picture.

Want To Take Your 'Cloud' Knowledge To Next Level?

Worker Environment

A worker is a separate background process that assists Web Server Tier by handling resource-intensive or time-intensive operations. In addition, it also emails notifications, generates reports and cleans up databases. This makes it possible for the application to remain responsive and handle multiple requests.

That’s great, but how does Worker process know which tasks to handle and when? How do these two Environment tiers communicate? For that, we use a message queuing service by AWS call Amazon Simple Queue Service (SQS). The image below gives you a rough idea of how the worker process receives and handles background tasks.

The workflow of the worker process is fairly simple. When you launch a Worker Environment tier, Elastic Beanstalk installs a daemon on each EC2 instance in the Auto Scaling group. The daemon pulls requests sent from an Amazon SQS queue. Based on the queue’s priority, SQS will send the message via a POSTrequest to the HTTP Path of the Worker Environment. The worker on receiving the message executes the tasks and sends an HTTP response once the operation is done. SQS on receiving response message deletes the message in the queue. If it fails to receive a response, it will continuously retry sending the messages.

WorkerEnv - Elastic Beanstalk - Edureka

Now that we have seen Elastic Beanstalk theoretically, in the remainder of this blog we will see how to deploy an application on Elastic Beanstalk. 

Deploy an Application on Elastic Beanstalk

Deploying an application on Elastic Beanstalk is a fairly simple process. Let’s see how to deploy an application stepwise.

Step 1: On Elastic Beanstalk console click on Create New Application option. A dialog box appears where you can give a name and appropriate description for your application.

Demo1 - Elastic Beanstalk - Edureka

Step 2: Now that the application folder has been created, you can click on the Actions tab and select Create Environment option. Beanstalk provides you with an option where you can create multiple Environments for your application.

Picture3 - Elastic Beanstalk - Edureka

Step 3: Choose among two different Environment Tier options. Choose Web Server Environment if you want your application to handle HTTP requests or choose Worker Environment to handle background tasks.

Picture4 - Elastic Beanstalk - Edureka

Step 4: Another dialog appears, where you need to provide a domain name and description for your application.

Picture5 - Elastic Beanstalk - Edureka

Step 5: Choose a platform of your choice for your application. Elastic Beanstalk will provide you with multiple options. You can choose a sample application provided by Beanstalk, or upload a file which has code for your application.

Picture6 - Elastic Beanstalk - Edureka

Beanstalk will take a few minutes to launch an Environment. Once the Environment is launched, on the navigation pane you can see multiple options where you can change the configuration of your application, view log files, and events. Since you’re already on Environment page, try exploring different features that Beanstalk offers.

Picture7 - Elastic Beanstalk - Edureka

Picture9 - Elastic Beanstalk - Edureka

Step 6: On the top right corner, you will find the URL of your application version. Click on that URL. You will be taken to a page which will confirm that you have successfully launched your application on Elastic Beanstalk.

Picture9 - Elastic Beanstalk - Edureka

Congratulations! You have successfully deployed an application on Elastic Beanstalk Platform.

I hope now you have a clear picture of Elastic Beanstalk and how you can use Beanstalk to deploy your applications.

Unlock your potential as an AWS Developer by earning your AWS Developer Certification. Take the next step in your cloud computing journey and showcase your expertise in designing,

Upcoming Batches For AWS Certification Training Course for Solutions Architect
Course NameDateDetails
AWS Certification Training Course for Solutions Architect

Class Starts on 27th April,2024

27th April

SAT&SUN (Weekend Batch)
View Details
AWS Certification Training Course for Solutions Architect

Class Starts on 4th May,2024

4th May

SAT&SUN (Weekend Batch)
View Details
AWS Certification Training Course for Solutions Architect

Class Starts on 20th May,2024

20th May

MON-FRI (Weekday Batch)
View Details
Comments
0 Comments

Join the discussion

Browse Categories

webinar REGISTER FOR FREE WEBINAR
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP

Subscribe to our Newsletter, and get personalized recommendations.

image not found!
image not found!

AWS Elastic Beanstalk – Application Deployment Made Easy

edureka.co