
Cloud
Learning Level
AWS Elastic Beanstalk is a managed service for deploying and scaling web applications and APIs quickly.
By the end of this lesson, you'll understand:
# Initialize Elastic Beanstalk
eb init -p "node.js 18 running on 64bit Amazon Linux 2" my-app
# Create environment
eb create production
# Deploy application
eb deploy
# Open in browser
eb openNode.js Express App:
const express = require('express');
const app = express();
const PORT = process.env.PORT || 3000;
app.get('/', (req, res) => {
res.send('Hello from Elastic Beanstalk!');
});
app.listen(PORT, () => {
console.log(`Server running on port ${PORT}`);
});# .ebextensions/env.config
option_settings:
aws:autoscaling:asg:
MinSize: 1
MaxSize: 4
aws:autoscaling:trigger:
MeasureName: CPUUtilization
Statistic: Average
Unit: Percent
UpperThreshold: 80
LowerThreshold: 20# Scale environment
eb scale 4
# Configure autoscaling
eb config
# Edit MinSize, MaxSize, TargetTrackingScalingPolicy# View environment health
eb health
# View logs
eb logs
# SSH into instance
eb sshLearn about Lambda for serverless, or explore S3 for static hosting.
Resources
Ojasa Mirai
Master AI-powered development skills through structured learning, real projects, and verified credentials. Whether you're upskilling your team or launching your career, we deliver the skills companies actually need.
Learn Deep • Build Real • Verify Skills • Launch Forward