You can use Amazon EBS to build storage volumes and attach them to EC2 instances. Once the storage volume is built, you can install a file system on top of it and use it to operate a database, store files and programs, or even use it as a block device in some other fashion. Amazon EBS volumes are assigned to a certain availability zone and are automatically replicated to safeguard you against a single component failure.
In this article, we’ll go over the definition of Elastic Beanstalk, its benefits, and how it functions.
- How Does AWS Elastic Beanstalk Work?
- Elastic Beanstalk Advantages
- Elastic Beanstalk’s Central Idea
- How Does AWS’ Elastic Beanstalk Function?
- Practical Exercise: Building an Elastic Beanstalk Application
You only need to upload your code to Elastic Beanstalk, and it will take care of everything else, including capacity provisioning, load balancing, auto-scaling, and application health monitoring. At the same time, you continue to have complete control over the AWS resources that support your application and are always able to access the underlying resources.
Check Also: Free AWS Training and Certifications
Elastic Beanstalk by AWS: What Is It
- A service from AWS for orchestration.
- Is employed to scale and deliver web applications and services.
- On well-known servers like Apache, Passenger, Nginx, and IIS, support Java, Python, Ruby,.NET, PHP, Node.js, Go, and Docker.
- Deploying your application to AWS in the quickest and simplest manner possible.
- It handles application health monitoring, load balancing, deployment, capacity provisioning, and auto-scaling.
- Managing AWS resources is completely up to you.
Also Check: AWS Inspector
Benefits Of Elastic Beanstalk AWS
- Fast and simple to deploy: It is the most straightforward and time-efficient method of deploying your application on AWS. You simply upload your application using the AWS Management Console, a Git repository, or an integrated development environment (IDE) such as Eclipse or Visual Studio, and it handles the deployment details of capacity provisioning, auto-scaling, load balancing, and application health monitoring. Your application will be ready to use in minutes, with no infrastructure or resource configuration required on your behalf.
- Scalable: Using simply changeable Auto Scaling settings, it automatically scales your application up and down based on its needs. You can, for example, use CPU utilization measurements to initiate Auto Scaling operations. This allows your application to accommodate spikes in workload or traffic while minimizing costs.
- Developer productivity: Amazon Beanstalk Elastic provisions and operates the infrastructure and manages the application stack (platform) for you, so you don’t have to spend the time or develop the expertise. It also keeps the underlying platform running your application up-to-date with the latest patches and updates. So, you can focus on writing code rather than spending time managing and configuring servers, load balancers, databases, firewalls, and networks.
- Complete infrastructure control: You are free to select the AWS resources, such as Amazon EC2 instance type, that are optimal for your application. Additionally, it lets you “open the hood” and allow you to have full control over the AWS resources powering your application. If you decide you want to take over some (or all) of the elements of your infrastructure, you can do so seamlessly by using Amazon Elastic Beanstalk’s management capabilities.
Also, Read Blue-Green Deployment.
Key Concepts
AWS Elastic Beanstalk enables you to manage all of the resources that run your application as environments. Here are some key concepts:
- Application: Amazon Elastic Beanstalk application is a logical collection of Elastic Beanstalk components, including environments, environment configurations, and versions. In Elastic Beanstalk an application is conceptually similar to a folder.
- Application version: An application version of Amazon Elastic Beanstalk 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 Python WAR file.
- Environment: An environment is a collection of AWS resources running an application version. Each environment runs only one application version at a time, still, you can able to run the same application version or different application versions in many environments simultaneously.
- Environment configuration: An environment configuration determines a collection of parameters and settings that define how an environment and its associated resources behave. When you update an environment’s configuration settings, It automatically applies the changes to existing resources or deletes and deploys new resources depending on the changes you made.
- Saved configuration: A saved configuration is a template that you can use as a starting point for creating unique environment configurations. You can create and modify saved configurations and apply them to environments, using the Elastic Beanstalk console, AWS CLI, EB CLI, or API.
- Platform: A platform is a combination of an operating system, programming language runtime, application server, web server, and Elastic Beanstalk components. It provides a variety of platforms on which you can build your applications.
Check Out: AWS SDLC Automation.
How Does AWS Elastic Beanstalk Operate?
You can construct an application using Elastic Beanstalk, upload an application version in the form of an application code bundle (for instance, a Python.war file), and then provide some information about the program. The AWS resources required to run your code are automatically created and configured by Elastic Beanstalk. You can manage your environment and roll out new application versions once your environment has launched. The workflow of Elastic Beanstalk is shown in the diagram below.
It supports the DevOps practice name “rolling deployments.” When enabled, your configuration deployments work hand in hand with Auto Scaling to ensure there are always a defined number of instances available as configuration changes are made. It gives you control as Amazon EC2 instances are updated.
Read this blog where we have discussed the 6 Pillars of AWS Well-Architected Framework and their design principles.
Hands-on: Creating an Elastic Beanstalk Application
- From the console Search & click on Elastic Beanstack.
2. Click on Create Application under Elastic Beanstalk.
3. Under application information, give a name to your application and scroll down to the page.
4. Under platform select the following configuration and click on Create application.
Platform 🡪 Docker
Platform Branch 🡪 Docker running on 64bit Amazon Linux
Platform version 🡪 Set it to default
5. Under Application, code 🡪 Upload your Code
6. Under source code origin click on choose file then select the zip file which we downloaded in the previous section
Link: https://k21academy.s3.us-west-2.amazonaws.com/AWS+DevOps+Professional/Activity_Guides/Code+/Deploy+An+Application+In+Beanstalk+Using+Docker+Code/v1.zip
7. Then choose Single instance under Presets and Click on Next
8. Under Configure service access, choose to Create and Use new service role and click on
Note: We need to configure service access and create a role for Elastic Beanstalk so that it can assume this role when calling services on our behalf. This allows Elastic Beanstalk to automatically deploy new versions of our application
9. In the networking, database, and tags section, choose Default VPC, Enable public IP address, and select availability zone as us-east-1a.
10. Keep the rest of everything default and click on Next.
11. Create a security group by going to EC2 Dashboard > Security Groups > Create security group. Create a security group that allows HTTP, HTTPS, and SSH traffic from ANYWHERE.
12. Under Configure instance traffic and scaling, choose a security group that we just created.
13. Now, scroll down and select t2.micro and t3.micro from the dropdown menu as desired instance types. Remove any existing instance types. This is to ensure we perform this project at minimum cost. Click on Next.
14. Under Configure updates, monitoring, and logging, choose Basic Health Reporting
15. Deselect managed updates. Let rest everything by default and click on Next.
16. Review everything and click on submit
17. Here you shall see that your application is being created.
Note: Elastic Beanstalk takes about 5-10 minutes to create the environment
18. Once your application is up and running, you can check the health status is green
19. Now, click the URL it will redirect to the sample website which is served from your docker container
Related/References
- AWS Certified DevOps Engineer Professional DOP-C02
- Overview of Amazon Web Services & Concept
- AWS Management Console Walkthrough
- Azure DevOps Vs AWS DevOps – Difference & Pricing Overview
- Azure DevOps Vs AWS DevOps – Difference & Pricing Overview
- Case Study: How To Deploy Web App From S3 Bucket To EC2 Instance on AWS Using CodePipeline
- AWS OpsWorks Overview, Features & Benefits
- How to become a certified AWS DevOps Engineer?
Next Task For You
Begin your journey towards becoming an AWS Certified DevOps Engineer Professional by checking our FREE CLASS. Click on the below image to register for our FREE CLASS.
tushar says
What is the technology in the elastic beanstalk backend which helps the EB to deploy an application, I know how to deploy the application but how Elastic beanstalk understands that it has to do the deployment
Jayesh Pandey says
Hi Tushar,
Hope you are doing well!!
Elastic Beanstalk (EB) is a higher-level, managed ‘platform as a service’ (PaaS) for hosting web applications Rather than deal with low-level AWS resources directly, EB provides a fully-managed platform where you create an application environment using a web interface, select which platform your application uses, create and upload a source bundle, and EB handles the rest.
Under the hood, EB uses CloudFormation to create and manage the application’s various AWS resources. You can customize and extend the default EB environment by adding CloudFormation Resources to an EB configuration file deployed with your application.
Hope this helps,
Regards
Jayesh
Team K21academy
Pankaj Singh says
which verser will be best for iis server, 3.5 or 4.5 .net server?
Rahul Dangayach says
Hi Pankaj,
Both .NET Framework 3.5 and .NET Framework 4.5 are supported on IIS servers.
Windows Server 2012 natively recognizes both versions, allowing ASP.NET applications to run on IIS 8.0 using either .NET Framework 3.5 or .NET Framework 4.5. This means that you can choose either version based on your application requirements, as both are compatible with IIS servers.
Therefore, the decision between using a server with .NET Framework 3.5 or .NET Framework 4.5 for an IIS server depends on the specific needs of your applications and any compatibility requirements they may have with either version of the framework.
Both versions are supported and can run ASP.NET applications effectively on IIS servers.
Hope this helps.
Thanks and Regards
Rahul Dangayach
Team K21Academy