Skip to content

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)

  1. Choose a platform (Node.js, Python, Java, .NET, PHP, Ruby, Go, Docker)
  2. Upload your application code as a ZIP or container
  3. 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.

Platform Runtime Versions
Node.js 22, 24
Python 3.12, 3.13, 3.14
Java 8, 11, 17, 21, 25 (Corretto)
.NET on Linux .NET 10
.NET on Windows .NET Framework 4.8, .NET 10
PHP 8.4, 8.5
Ruby 3.2
Go 1.21
Docker Single container or multi-container (Docker Compose)
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

Customize your Beanstalk environment with .ebextensions/*.config YAML/JSON files:

.ebextensions/environment.config
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: 70
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
Terminal window
# Install EB CLI
pip install awsebcli
# Initialize in your project
eb 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 application
eb deploy
# Check environment status
eb status
# Open in browser
eb open
# View logs
eb logs
# SSH into an EC2 instance
eb ssh
# Terminate environment
eb terminate my-env