AWS Elastic Beanstalk — PaaS Deployment
AWS Elastic Beanstalk — PaaS Deployment
Section titled “AWS Elastic Beanstalk — PaaS Deployment”Elastic Beanstalk is AWS’s Platform as a Service (PaaS) offering. You upload your application code and Beanstalk handles provisioning EC2 instances, load balancers, auto-scaling, and deployment — all while keeping full EC2-level control if you need it.
In Azure terms: Elastic Beanstalk ≈ Azure App Service (but running on EC2 under the hood)
How It Works
Section titled “How It Works”- Choose a platform (Node.js, Python, Java, .NET, PHP, Ruby, Go, Docker)
- Upload your application code as a ZIP or container
- Beanstalk creates and manages:
- EC2 instances
- Load balancer (ALB or NLB)
- Auto Scaling Group
- RDS (optional)
- CloudWatch monitoring
You retain full access to the underlying EC2 instances — unlike Azure App Service where the underlying VMs are fully managed.
Supported Platforms
Section titled “Supported Platforms”| Platform | Runtime Versions |
|---|---|
| Node.js | 18.x, 20.x |
| Python | 3.11, 3.12 |
| Java | 8, 11, 17, 21 (Corretto) |
| .NET on Linux | .NET 8 |
| .NET on Windows | .NET Framework 4.8 |
| PHP | 8.1, 8.2 |
| Ruby | 3.2 |
| Go | 1.21 |
| Docker | Single container or multi-container (Docker Compose) |
Deployment Policies
Section titled “Deployment Policies”| Policy | Description | Downtime |
|---|---|---|
| All at once | Deploy to all instances simultaneously | Brief downtime |
| Rolling | Deploy in batches — some instances update at a time | Minimal |
| Rolling with additional batch | Add extra capacity during deployment | Zero |
| Immutable | Deploy to new instances, swap when healthy | Zero |
| Traffic splitting | Canary — route % traffic to new version | Zero |
| Blue/Green | Deploy to separate environment, swap DNS | Zero |
Configuration Files (.ebextensions)
Section titled “Configuration Files (.ebextensions)”Customize your Beanstalk environment with .ebextensions/*.config YAML/JSON files:
option_settings: aws:elasticbeanstalk:application:environment: DB_HOST: my-rds.abc123.us-east-1.rds.amazonaws.com NODE_ENV: production
aws:autoscaling:asg: MinSize: 2 MaxSize: 10
aws:autoscaling:trigger: MeasureName: CPUUtilization Threshold: 70Elastic Beanstalk vs Azure App Service
Section titled “Elastic Beanstalk vs Azure App Service”| Feature | Elastic Beanstalk | Azure App Service |
|---|---|---|
| Abstraction level | Higher (PaaS) but EC2 accessible | Full PaaS — no VM access |
| Platforms | Node, Python, Java, .NET, PHP, Ruby, Go, Docker | Node, Python, Java, .NET, PHP, Ruby, Go, containers |
| Scaling | Auto Scaling Group (EC2) | Scale out settings (instance count) |
| Deployment slots | No (use Blue/Green environments) | Yes (staging slots + swap) |
| Pricing | Pay for underlying EC2 + LB | Per App Service Plan |
| Custom OS packages | Yes (via .ebextensions) | Limited (Kudu) |
| Container support | Single and multi-container Docker | Docker, custom containers |
EB CLI
Section titled “EB CLI”# Install EB CLIpip install awsebcli
# Initialize in your projecteb init my-app --region us-east-1 --platform "node.js-20"
# Create an environment (provisions everything)eb create my-env --instance-type t3.small --min-instances 2
# Deploy applicationeb deploy
# Check environment statuseb status
# Open in browsereb open
# View logseb logs
# SSH into an EC2 instanceeb ssh
# Terminate environmenteb terminate my-envUseful Links
Section titled “Useful Links”- Elastic Beanstalk Documentation
- Elastic Beanstalk Pricing (Free — pay only for underlying resources)
- EB CLI Reference