In this lab, we will:
- Create an AWS Elastic Beanstalk application
- Create an Elastic Beanstalk environment
- Deploy a sample application
- Understand the resources created by Elastic Beanstalk
- Access the deployed application from the browser
Before starting this lab, ensure you have:
- AWS Account
- IAM user with appropriate permissions
- Basic understanding of:
- EC2
- Security Groups
- Load Balancer
- Auto Scaling
User
↓
Elastic Beanstalk
↓
Load Balancer
↓
EC2 Instance
↓
Application
Elastic Beanstalk automatically creates:
- EC2 instance
- Security Group
- Load Balancer (optional)
- Auto Scaling Group
- CloudWatch monitoring
- Open AWS Console
- Search for:
Elastic Beanstalk
- Open the service
Click:
Create Application
my-demo-app
my-demo-env
AWS automatically generates:
my-demo-env.region.elasticbeanstalk.com
Under:
Platform
Choose:
Node.js
You may also choose:
- Python
- Docker
- Java
- PHP
- Go
Under:
Application Code
Choose:
Sample Application
Elastic Beanstalk provides a demo application.
Choose:
Single Instance
Used for:
- Development
- Testing
For production environments, choose:
High Availability
Click:
Create Application
Elastic Beanstalk now starts creating resources.
Elastic Beanstalk automatically provisions:
| Resource | Purpose |
|---|---|
| EC2 Instance | Runs application |
| Security Group | Controls traffic |
| Auto Scaling Group | Scaling management |
| Load Balancer | Traffic distribution |
| CloudWatch | Monitoring |
| S3 Bucket | Stores application versions |
Elastic Beanstalk performs:
- EC2 provisioning
- Platform installation
- Application deployment
- Health checks
- Environment startup
Once environment health becomes:
Green
Open the provided URL:
http://my-demo-env.region.elasticbeanstalk.com
You should see the sample application page.
Inside the environment dashboard, explore:
- Health
- Logs
- Monitoring
- Configuration
- Events
Navigate to:
EC2 Console
You will notice Elastic Beanstalk created:
- EC2 instance
- Security Group
- Key pair (optional)
If High Availability was selected:
Navigate to:
EC2 → Load Balancers
Elastic Beanstalk automatically creates:
Application Load Balancer
Navigate to:
EC2 → Auto Scaling Groups
Elastic Beanstalk automatically creates scaling policies.
Navigate to:
CloudWatch
Monitor:
- CPU Utilization
- Network Traffic
- Request Count
- Instance Health
Navigate to:
EC2 → Security Groups
Verify inbound rules:
| Port | Protocol | Purpose |
|---|---|---|
| 80 | HTTP | Web traffic |
| 22 | SSH | SSH access |
Test:
- Browser accessibility
- Health status
- Response time
| Color | Meaning |
|---|---|
| Green | Healthy |
| Yellow | Warning |
| Red | Critical |
| Grey | Pending |
To deploy new application versions:
- Go to:
Elastic Beanstalk → Upload and Deploy
- Upload new ZIP file
- Deploy application
Elastic Beanstalk automatically updates the environment.
To avoid AWS charges:
- Open Elastic Beanstalk
- Select environment
- Click:
Actions → Terminate Environment
- Elastic Beanstalk uses EC2 internally
- Infrastructure is automatically managed
- Application deployment is automated
- Environment URL is auto-generated
- Monitoring is integrated with CloudWatch
- Use High Availability for production
- Enable Auto Scaling
- Store secrets securely
- Use separate RDS databases
- Enable HTTPS using ACM
Check:
- Security Group
- Health status
- EC2 instance state
Check:
- Application logs
- Deployment logs
- Platform compatibility
Verify:
- ZIP structure
- Platform version
- Application dependencies
Elastic Beanstalk automatically provisions infrastructure such as EC2, Auto Scaling, Load Balancer, and Security Groups.
Yes.
| Single Instance | High Availability |
|---|---|
| One EC2 instance | Multiple EC2 instances |
| No Load Balancer | Uses Load Balancer |
| Used for testing | Used for production |