Components of Elastic Beanstalk.
Elastic Beanstalk is a fully managed service by AWS that simplifies the deployment and scaling of applications. It abstracts much of the infrastructure management while providing flexibility and control.
Here are the key components of Elastic Beanstalk:
1.
Application
- A logical container for the Elastic Beanstalk
environment.
- Represents your project (e.g., a web app or service).
- Can contain multiple environments (like dev, test,
prod).
2.
Application Version
- A specific deployable version of your app (code
+ configuration).
- Stored in Amazon S3.
- You can deploy different versions to different
environments.
3.
Environment
- A version of your application deployed on AWS
infrastructure.
- Types:
- Web Server Environment – Handles HTTP requests (e.g., Nginx, Apache).
- Worker Environment – Processes background tasks from an Amazon SQS
queue.
4.
Environment Configuration
- Contains all settings for an environment:
- EC2 instance types
- Auto Scaling policies
- Load balancing settings
- Database configuration (optional)
- Environment variables
5. Platform
- A preconfigured stack of:
- Operating System (Amazon Linux, AL2023, etc.)
- Runtime (Node.js, Python, Java, .NET, etc.)
- Web server (e.g., Apache, Nginx)
- Managed by AWS with regular updates.
6. Elastic Beanstalk CLI (EB CLI)
- A command-line tool (eb) to interact with Beanstalk.
- Allows you to deploy, monitor, and manage environments
from your terminal.
7. AWS Resources (Provisioned by Beanstalk)
Elastic Beanstalk automatically
provisions and manages AWS resources, including:
- Amazon EC2
– Compute instances
- Elastic Load Balancer (ELB) – For distributing traffic
- Auto Scaling Group
– For scaling in/out
- Amazon RDS
(optional) – Database
- Amazon S3
– Stores application versions
- Amazon CloudWatch
– Monitoring and logging
8. Configuration Files (.ebextensions)
- Located in your source bundle (.zip or .war)
- Used to customize environment and install additional
software or packages.
9. Health Monitoring & Observability.
- Provides detailed health status for your
application (Ok, Warning, Severe).
- Uses metrics like HTTP response codes, latency, and
instance status.
Project: Hands-on
How twech use the Elastic Beanstalk in aws:.To create and manage resources
Search for the aws service: Elastic Beanstalk
Create an application:
Application information
Application
name: twtechapp
Environment information
Choose the name, subdomain and description for your environment.
These cannot be changed later.
Environment
name: twtechapp-dev
To
access the application on UI: auto-generated-domain.us-east-2.elasticbeanstalk.com
Platform
Platform
type: node.js
Application code
Presets
Start from a preset that matches your use case or choose custom
configuration to unset recommended values and use the service's default values.
Configure service access
Create role: Elastic beanstalk
Add permissions
Enter a role name: twtech-elasticbeanstalk-service-role
Set up networking, database, and tags - optional
Database
Configure instance traffic
and scaling
Configure updates, monitoring, and logging – optional
Review & create the Elasticbeanstalk.
From:
To:
Also Check email for notifiacation:
Confirm subscription:
Events generated:
Monitoring: Service metrics
Health checks
Instance created:
Security group created:
An autoscaling group was created and manage instances:
How twtech accesses the application with the domain
name: twtechapp-dev.eba-xxxxxx.us-east-2.elasticbeanstalk.com
How twtech creates another environment from the an existing environment: dev to QA
twtech-insights:
No comments:
Post a Comment