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.

PlatformRuntime Versions
Node.js18.x, 20.x
Python3.11, 3.12
Java8, 11, 17, 21 (Corretto)
.NET on Linux.NET 8
.NET on Windows.NET Framework 4.8
PHP8.1, 8.2
Ruby3.2
Go1.21
DockerSingle container or multi-container (Docker Compose)
PolicyDescriptionDowntime
All at onceDeploy to all instances simultaneouslyBrief downtime
RollingDeploy in batches — some instances update at a timeMinimal
Rolling with additional batchAdd extra capacity during deploymentZero
ImmutableDeploy to new instances, swap when healthyZero
Traffic splittingCanary — route % traffic to new versionZero
Blue/GreenDeploy to separate environment, swap DNSZero

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
FeatureElastic BeanstalkAzure App Service
Abstraction levelHigher (PaaS) but EC2 accessibleFull PaaS — no VM access
PlatformsNode, Python, Java, .NET, PHP, Ruby, Go, DockerNode, Python, Java, .NET, PHP, Ruby, Go, containers
ScalingAuto Scaling Group (EC2)Scale out settings (instance count)
Deployment slotsNo (use Blue/Green environments)Yes (staging slots + swap)
PricingPay for underlying EC2 + LBPer App Service Plan
Custom OS packagesYes (via .ebextensions)Limited (Kudu)
Container supportSingle and multi-container DockerDocker, 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