Elastic Beanstalk Components - Overview & Hands-On.
Scope:
- Concept,
- Here are the key components of Elastic Beanstalk,
- Architecture diagram of Elastic Beanstalk,
- Hands-On.
Concept:
- Elastic Beanstalk is a fully managed service by AWS that simplifies the deployment and scaling of applications.
- Elastic Beanstalk abstracts much of the infrastructure management while providing flexibility and control.
Architecture diagram of Elastic Beanstalk:
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.
- twtech 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
Step-1:
- Search for the AWS service: Elastic Beanstalk
- Create an application:
Step-2:
Application information
- Application name: twtechapp
- Environment information
- twtech Chooses the name, subdomain and description for its environment.
- These cannot be later changed.
- Environment
name: twtechapp-dev
Step-3:
- How twtech subsequently accesses the application on UI:
- Application has an 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.
Step-4:
- twtech Configures service access
- twtech Creates role: Elastic beanstalk
twtech Adds permissions
- twtech Also create IAM role for EC2 instances:
- AWSElasticBeanstalkWorkerTier,
- AWSElasticBeanstalkWebTier,
- AWSElasticBeanstalkMulticonta
- twtech Enters a role name: twtech-elasticbeanstalk-service-role
- twtech Goes back to finish the configuration of Elasticbeanstalk from UI (console),
- twtech needs to refresh and select the created roles: twtech-elasticbeanstalk-service-role
Set up networking, database, and tags - optional
Select
vpc:
Step-7:
Database
- twtech Integrates an RDS SQL database with its environment
Step-8:
twtech Configures instance traffic and scaling:
Step-9:
- twtech Configures updates, monitoring, and logging – optional
Step-10:
twtech Reviews & create the Elasticbeanstalk.
From: Launching
To: Evironment Successfully Launched
Step-11:
- twtech Checks email for notifiacation:
Step-12:
- twtech Confirms subscription:
Step-13:
- twtech goes back to Elastic Beanstalk UI to access Events generated:
Step-14:
- twtech Monitors Service metrics
Step-15:
- twtech conduct Health checks to its resources
Step-16:
- twtech verifies that Instance created:
Step-17:
- twtech verifies that Security group created:
Step-19:
- twtech verifies that an ElasticIP was created and allocated the instance created: twtechapp-dev
Step-20:
- An autoscaling group was created and manage instances:
Step-21:
twtech accesses the application with the domain
name on the browser: twtechapp-dev.eba-xxxxxx.us-east-2.elasticbeanstalk.com
Step-22:
- twtech creates another environment from the an existing environment (replicates) from: Dev to QA
twtech-insights:
- Any unwanted applications in twtech environment can be selected and deleted to reduce costs.
- When twtech deletes any applications, all the resources that were created alongside, using Elastic Beanstalk are also delete.
No comments:
Post a Comment