How to Run Production Node.js on AWS Elastic Beanstalk: Complete Guide
By Braincuber Team
Published on April 17, 2026
AWS Elastic Beanstalk simplifies deploying and running applications on AWS infrastructure. But what does it actually cost to run a production Node.js app? This guide shares hard-won lessons from 2 years of managing a production Express application on Elastic Beanstalk.
What You'll Learn:
- Real monthly costs of running Node.js on Elastic Beanstalk
- How to reduce EC2 costs with Reserved Instances
- Strategies for managing environment updates
- Pain points and limitations of ELB in production
- Step by step deployment workflows for Node.js apps
The Real Cost of Running Node.js on AWS
The AWS pricing calculator is notoriously confusing due to its a la carte payment structure. This makes budgeting for production applications challenging. After two years of managing an Express-based web application on Elastic Beanstalk, here is what the actual costs look like.
Infrastructure Breakdown
This is what a typical production Node.js stack runs on AWS:
| Component | Configuration | Monthly Cost |
|---|---|---|
| Classic Load Balancer | 1 instance | $18.00 |
| EC2 Instance | t2.micro with Reserved Instance | $5.00 |
| Route 53 | 1 Hosted Zone | $0.50 |
| S3 Bucket | 7 GB storage | $0.17 |
| Data Transfer | Outbound traffic | $0.21 |
| Total | ~$25/month |
Database Not Included
This cost estimate excludes database hosting. If you plan to host MongoDB, PostgreSQL, or MySQL on AWS RDS, add approximately $15-50/month depending on instance size.
AWS Component Costs Explained
Classic Load Balancer
The Classic Load Balancer is typically the most expensive component of your Elastic Beanstalk stack:
- $0.025 per Classic Load Balancer-hour (or partial hour)
- $0.008 per GB of data processed
- Running 24/7 means approximately $18/month plus data transfer charges
Consider whether you need a load balancer during development. Destroying dev environments when not in use can save significant costs.
EC2 On-Demand vs Reserved Instances
On-Demand EC2 instances are convenient but expensive. The same t2.micro instance that costs $5/month with a Reserved Instance costs $8.40/month on-demand.
S3 Storage
S3 buckets for Elastic Beanstalk typically include:
- Static homepage assets
- Application images and media (7+ GB typical)
- Application version deployments
S3 is quite affordable. For archival purposes, consider Glacier storage for old versions.
Cost Optimization
Use Reserved Instances for production. The savings of $3-5/month per instance add up significantly over a year.
Development Environments
Destroy dev environments when not in use. Running dev and prod simultaneously doubles your costs.
Reserved EC2 Instances: A Complete Guide
Amazon's billing system is notoriously complex. Reserved Instances (RIs) can significantly reduce costs, but understanding them requires careful study.
RI Scope: Regional vs Availability Zone
Reserved Instances have two scoping options:
| Scope Type | Example | Behavior |
|---|---|---|
| Regional | us-west-2 | Automatically applies to any instance in the region |
| Availability Zone | us-west-2a | Only applies to specific AZ. If ELB spins up instances in a different AZ, you are not covered. |
RI Types: Standard vs Convertible
Reserved Instances come in two flexibility types:
- Standard RIs: Offer lower pricing with less flexibility
- Convertible RIs: More flexible for swapping instance types but come at a higher price
Payment Options
There are three payment types for Reserved Instances:
| Payment Type | Upfront Cost | Monthly Cost |
|---|---|---|
| No Upfront | $0 | Higher monthly rate |
| Partial Upfront | Some upfront | Moderate monthly rate |
| All Upfront | Full payment | Lowest monthly rate |
New Account Limitation
No Upfront RIs require established billing history. New accounts may encounter this error: ReservedInstancesLimitExceeded. Build billing history first, then switch to no-upfront options.
RI Activation Delay
For some reason, Reserved Instances take time to activate. The first day of each month often costs more because the RI has not kicked in yet. Budget accordingly if you are tracking costs closely.
Pain Points and Limitations
Two years of production experience revealed several Elastic Beanstalk limitations worth knowing before committing to the platform.
Automatic Updates Are Not Automatic
Node.js versions do not align across Linux environment versions. When AWS releases a new Linux build, your desired Node version might not be available, requiring manual intervention.
Multiple Environments Double Costs
Running separate development and production environments simultaneously essentially doubles your infrastructure costs. Destroy dev environments when not actively developing.
Documentation is Complex
AWS is massive, and specific use cases are often buried deep in documentation. Finding answers to edge cases requires significant research and experimentation.
Managing Node.js Updates on Elastic Beanstalk
The update process depends on whether you are changing the Linux environment. Here is how to manage both scenarios effectively.
Updates Without Linux Environment Changes
For code-only updates that do not require Linux version changes:
eb deploy
The eb deploy command handles everything automatically and typically propagates changes within 10 minutes.
Updates Requiring Linux Environment Changes
When AWS restricts your Node.js version on the current Linux build, you need a more complex update process:
Create New Environment
Push to a production configuration under a new environment name using eb create prod-1. This spins up a fresh instance with the updated Linux build.
Test All Updates
Verify that all your application updates work correctly on the new Linux environment. Check for dependency compatibility issues.
Configure Environment Variables
Ensure all environment variables point to the correct resources (databases, APIs, external services). New environments will not inherit these automatically.
Transfer SSL Certificate
If using HTTPS, ensure your load balancer has the same SSL certificate configured. HTTPS requests to an ELB without a certificate will fail silently.
Swap Environment URLs
Use the AWS console to swap environment URLs. Your Route 53 DNS records update automatically. No manual DNS changes required.
Repository Strategy
Maintain separate Git repository clones for development and production. Use the dev folder for active development and the production folder solely for building and deploying via eb deploy. This prevents accidental deployments.
Best Practices for Production Node.js on ELB
Use Health Checks
Configure proper health check endpoints in your Node.js app. Elastic Beanstalk relies on these to determine instance health and trigger replacements.
Secure Environment Variables
Never commit secrets to your repository. Use AWS Secrets Manager or Parameter Store for API keys, database credentials, and other sensitive configuration.
Set Deployment Health Checks
Configure rolling updates with health checks to prevent deploying broken versions to all instances simultaneously.
Monitor with CloudWatch
Enable CloudWatch monitoring for your Elastic Beanstalk environment. Set up alarms for CPU utilization, latency, and error rates.
Frequently Asked Questions
How much does it cost to run Node.js on AWS Elastic Beanstalk per month?
A basic production Node.js setup costs approximately $25/month, including a Classic Load Balancer ($18), t2.micro EC2 with Reserved Instance ($5), Route 53 ($0.50), S3 ($0.17), and data transfer ($0.21). This excludes database hosting costs.
What is the difference between Reserved Instance Regional and Availability Zone scope?
Regional RIs apply automatically to any matching instance in that AWS region (e.g., us-west-2). Availability Zone RIs only apply to instances in a specific AZ (e.g., us-west-2a). Use Regional scope for flexibility with Elastic Beanstalk auto-scaling across AZs.
How do I update Node.js version on AWS Elastic Beanstalk?
For minor updates without Linux changes, use eb deploy. For Node.js versions unavailable on your current Linux build, create a new environment with eb create, test thoroughly, transfer SSL certificates, then swap environment URLs via the AWS console.
Can new AWS accounts purchase No Upfront Reserved Instances?
No, new accounts cannot purchase No Upfront Reserved Instances due to the contractual billing obligation. Build a billing history first with Partial or All Upfront RIs, then switch to No Upfront options after establishing credit with AWS.
Why should I destroy development environments on Elastic Beanstalk?
Running separate development and production environments simultaneously doubles your infrastructure costs. Since you only actively develop intermittently, destroy dev environments when not in use and recreate them when needed.
Need Help with AWS Elastic Beanstalk?
Our AWS experts can help you optimize your Node.js deployment, reduce costs, and implement best practices for production workloads.
