
AWS Compute Series — Day 3: AWS Elastic Beanstalk
Deploy Applications Without Managing Every Infrastructure Component
Series: AWS Compute Series (5 articles)
- …
- 3AWS Compute Series — Day 3: AWS Elastic Beanstalk This article
- Amazon EC2: Provision and manage virtual servers.
- AWS Lambda: Execute code in response to events without managing servers.
But what if you already have a web application and want to deploy it without manually configuring every infrastructure component?
You need somewhere to run your application, but you also need deployment management, scaling, load balancing and health monitoring.
This is where AWS Elastic Beanstalk comes in.
1. What is AWS Elastic Beanstalk?
AWS Elastic Beanstalk is a managed service that simplifies deploying, managing and scaling web applications and services.
You provide your application code or container image, choose the appropriate environment configuration, and Elastic Beanstalk provisions and manages the necessary AWS resources.
Depending on the environment mode, these resources can include:
- Compute capacity.
- Load balancers.
- Auto Scaling.
- Networking components.
- Application deployment infrastructure.
- Health monitoring.
The important distinction:
You focus on your application. Elastic Beanstalk handles much of the infrastructure provisioning and environment management.
It does not mean AWS takes responsibility for everything. You still manage your application, configuration, security and operational decisions.
2. How does Elastic Beanstalk work?
Let's introduce its main building blocks.
A. Application
An Elastic Beanstalk application is a logical container for the components associated with your application.
Think of it as the main project.
For example, you could create an application called "formuloo-compta".
B. Application Version
An application version represents a specific deployable version of your application.
For example:
- Version 1.0: initial release.
- Version 1.1: bug fixes.
- Version 2.0: new features.
Elastic Beanstalk can store application version artifacts in Amazon S3 and deploy a selected version to an environment.
This makes application version management and rollbacks easier.
C. Environment
An environment is the collection of AWS resources running a particular application version.
You can create separate environments for:
- Development.
- Testing.
- Staging.
- Production.
Each environment runs one application version at a time, although different environments can run different versions simultaneously.
D. Platform
For a Standard environment, a platform provides the operating system, programming language runtime, web server and other components needed to run your application.
Examples include supported platforms for:
- Python.
- Node.js.
- Java.
- PHP.
- .NET.
- Docker.
You select the platform appropriate for your application.
E. Environment Configuration
This defines how your environment operates.
It includes settings such as:
- Instance types.
- Capacity and scaling.
- Load balancing.
- Networking.
- Environment variables.
- Monitoring.
- Deployment policies.
These settings determine how your application environment behaves.
3. Understanding the two Elastic Beanstalk modes
This is an important distinction in the current AWS documentation.
Elastic Beanstalk provides two operating modes.
A. Beanstalk Standard
In Standard mode, Elastic Beanstalk deploys applications directly onto Amazon EC2 instances.
It can provision:
- EC2 instances.
- Auto Scaling groups.
- Load balancers.
- Security groups.
- CloudWatch alarms.
You choose a managed platform and provide your application code.
For example, you could deploy a Django application using a supported Python platform.
Elastic Beanstalk handles much of the environment setup, while EC2 provides the underlying computing capacity.
B. Beanstalk Cluster
In Cluster mode, Elastic Beanstalk runs your application as containers on an Amazon EKS cluster that it creates and operates.
You provide a container image or application source that Elastic Beanstalk builds into an image.
Elastic Beanstalk manages:
- The cluster infrastructure.
- Application deployment.
- Container replicas.
- Rolling updates.
- Environment health.
This mode is useful when you want container orchestration without directly managing the underlying Kubernetes environment.
The key difference:
Standard runs applications directly on EC2 instances, while Cluster runs containerized applications on an EKS-based environment.
They are two different operating models within Elastic Beanstalk.
4. What happens when you deploy an application?
Let's use a practical example.
Imagine we want to deploy a Django web application.
The simplified workflow is:
Application Code → Application Version → Environment → AWS Resource Provisioning → Deployment → Health Monitoring Step by step:
- Develop and test your application locally.
- Prepare a deployable application bundle or container image.
- Create an Elastic Beanstalk application.
- Choose the appropriate environment mode and configuration.
- Create an environment.
- Elastic Beanstalk provisions the necessary resources.
- Your application is deployed.
- Elastic Beanstalk monitors the environment's health.
Once deployment is complete, you can access your application through its environment URL or your own configured domain.
You can then deploy newer application versions as your application evolves.
5. How does Elastic Beanstalk manage deployments?
Deployment is more than copying new code onto a server.
What happens if your application is receiving traffic while you deploy a new version?
Elastic Beanstalk supports different deployment strategies.
For Standard environments, important strategies include:
A. All at Once
The new version is deployed to all instances simultaneously.
Advantages:
- Simple.
- Usually faster.
Disadvantages:
- Application availability may be interrupted during deployment.
B. Rolling Deployment
Instances are updated in batches.
Advantages:
- Existing capacity can continue serving traffic.
- Reduces the need to update every instance simultaneously.
Disadvantages:
- Available capacity may temporarily decrease.
C. Rolling with Additional Batch
An additional batch of instances is launched before the existing instances are updated.
Advantages:
- Helps maintain the original serving capacity during deployment.
Disadvantages:
- Requires additional temporary resources and therefore can increase costs.
D. Immutable Deployment
New instances are launched in a separate Auto Scaling group to receive the new application version.
After successful deployment and health checks, the new instances replace the old ones.
Advantages:
- Stronger isolation between old and new versions.
- Easier recovery if the deployment fails.
Disadvantages:
- Requires additional temporary infrastructure.
The Cluster mode uses its own container deployment strategies, including rolling updates and all-at-once deployment.
The right strategy depends on application availability requirements, deployment risk and infrastructure budget.
6. How does Elastic Beanstalk scale applications?
Elastic Beanstalk can adjust application capacity based on demand.
In Standard mode, it can use EC2 Auto Scaling to increase or decrease the number of instances.
Imagine your application normally handles 100 requests per minute.
During a marketing campaign, traffic increases significantly.
Elastic Beanstalk can work with Auto Scaling to add more EC2 instances, depending on your configured scaling policies.
When demand decreases, capacity can be reduced.
In Cluster mode, scaling is based on the number of application replicas within configured minimum and maximum limits.
This is another example of elasticity in cloud computing.
However, scaling still requires thoughtful configuration. It is not unlimited, and adding more instances or replicas does not automatically fix application bottlenecks.
7. Monitoring and application health
A successful deployment does not necessarily mean a healthy application.
Elastic Beanstalk provides monitoring capabilities to help you understand the state of your environment.
You can inspect:
- Environment health.
- Deployment events.
- Application logs.
- Instance health.
- CPU utilization.
- Request latency.
- Errors and other monitoring metrics.
It also integrates with Amazon CloudWatch.
For DevOps engineers, this is particularly important.
A deployment pipeline can succeed while the application itself remains unhealthy.
You must verify the actual behavior of the application after deployment.
8. Security and operational responsibilities
Elastic Beanstalk simplifies infrastructure management, but it does not eliminate security responsibilities.
You still need to consider:
- IAM roles and permissions.
- Secure environment variables and secrets.
- Network access restrictions.
- Application vulnerabilities.
- HTTPS configuration.
- Operating system and platform updates.
- Database security.
- Logging and monitoring.
For Standard environments, AWS manages platform maintenance capabilities, but you must configure and review updates appropriately.
Another important architectural recommendation:
Avoid treating an environment's automatically provisioned database as disposable application infrastructure.
For production applications, consider managing persistent databases separately using services such as Amazon RDS. This makes database lifecycle, backups and application environment replacement easier to manage independently.
9. Does Elastic Beanstalk cost money?
The Elastic Beanstalk service itself has no additional service charge.
However, the AWS resources it provisions are billable.
Depending on your architecture, you may pay for:
- EC2 instances.
- EBS volumes.
- Load balancers.
- Data transfer.
- S3 storage.
- CloudWatch monitoring and logs.
- Other associated resources.
This is an important distinction.
No additional Elastic Beanstalk service fee does not mean a free deployment.
Before deploying, understand which resources will be created and how they are billed.
Also, terminating an environment does not necessarily remove every separately retained resource, such as saved application artifacts or independently managed storage.
10. Elastic Beanstalk vs EC2 vs Lambda
Let's compare the three services we've covered so far.
Amazon EC2 | AWS Lambda | Elastic Beanstalk |
|---|---|---|
Virtual computing instances | Event-driven code execution | Application deployment and management |
You manage the OS | AWS manages execution infrastructure | AWS manages much of the environment |
Flexible server control | Function-based execution | Application-centric deployment |
Suitable for many long-running workloads | Suitable for event-driven tasks | Suitable for supported web applications and services |
You configure infrastructure and scaling | Automatic execution scaling | Managed deployment and scaling capabilities |
Think of it this way:
- EC2: I want control over my virtual server.
- Lambda: I want code to execute when an event occurs.
- Elastic Beanstalk: I want to deploy and operate an application without manually managing every infrastructure component.
These services solve different problems. None is universally better.
11. When should you use Elastic Beanstalk?
Consider Elastic Beanstalk when:
- You want to deploy a supported web application quickly.
- You want managed environment provisioning.
- You need deployment and application version management.
- You want built-in scaling and health monitoring capabilities.
- You prefer an application-centric deployment model over manually assembling every AWS resource.
However, it may not be the right choice when:
- You need complete control over infrastructure provisioning.
- Your architecture requires highly customized orchestration.
- You already have an established container platform and deployment workflow.
- You need infrastructure definitions and lifecycle management entirely under your own IaC workflow.
For those requirements, EC2, ECS, EKS, Fargate or other approaches may be more appropriate.
12. The practical takeaway
AWS Elastic Beanstalk demonstrates an important evolution in cloud infrastructure management.
With EC2, we manage virtual servers.
With Lambda, we focus on event-driven code execution.
With Elastic Beanstalk, we focus more directly on application deployment while AWS manages much of the supporting environment.
For DevOps engineers, the important lesson is understanding the level of abstraction each service provides.
More abstraction can reduce operational work, but it does not remove the need to understand the infrastructure underneath.
Before moving on, make sure you can explain:
- What is an Elastic Beanstalk application?
- What is the difference between an application version and an environment?
- What is a platform?
- What distinguishes Standard from Cluster mode?
- How do rolling and immutable deployments differ?
- How does Elastic Beanstalk scale an application?
- Which AWS resources can still generate charges?
Coming next in our Compute journey: Amazon Lightsail — understanding simplified cloud infrastructure for developers, small applications and straightforward workloads.
Learn • Build • Share • Certify
Further reading — AWS official documentation:
- "What is AWS Elastic Beanstalk?" ( https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/ )
- "Understanding Elastic Beanstalk concepts" ( https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/concepts.html )
- "Beanstalk Standard" ( https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/beanstalk-standard.html )
- "Beanstalk Cluster" ( https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/beanstalk-cluster-concepts.html )
- "Deployment policies" ( https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.deploy-existing-version.html )
Series: AWS Compute Series (5 articles)
- …
- 3AWS Compute Series — Day 3: AWS Elastic Beanstalk This article
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article