AWS Elastic Beanstalk Flashcards
What is Elastic Beanstalk?
- Managed service
- Automatically handles capacity provisioning, load balancing, scaling, application
health monitoring, instance configuration, … - Just the application code is the responsibility of the developer
- Elastic Beanstalk is a developer centric view of deploying an application
on AWS
What are the Elastic Beanstalk components?
- Application: collection of EB components
- Applicaiton Version
- Environment
Whats the lifecycle of EB application?
Create app -> upload version -> Launch env -> Manage env -> iterate
List some supported EB platform
- Go
- Java SE
- Java with Tomcat
- .NET Core on Linux
- .NET on Windows Server
- Node.js
- PHP
- Python
- Ruby
- Packer Builder
- Single Container Docker
- Multi-container Docker
- Preconfigured Docker
What are the Environment tier in EB?
- web server tier: ELB
- worker tier: SQS Queue
Whats the two EB Deployement modes?
- Single instance - dev
- High Availability with LB - prod
What are the EB Deployment options for Updated?
- All at once - fastest, but all instance is down
- Rolling: update few instance, then move to next bucket (not 100% capacity)
- Rolling with additional batches: same as rolling but adds new instances
- Immutable: new instances in new ASG, swap if healty
- Traffic splitting: canary testing - sends small % of traffic to the new deployement
List some EB CLI command:
- eb create
- eb status
- eb health
- eb events
- eb logs
- eb open
- eb deploy
- eb config
- eb terminate
What EB Deployement Proces?
- package code as zip
- Console: upload zip file, then deploy
- CLI: create a new app version using CLI, then deploy
What is EB Lifecycle Policy?
- EB can store max 1000 app vesions
- Based on time
- Based on space
- not used versions are deleted
- Option to not delete the source bundle, stored in S3
What are EB Extensions?
- Parameters that are set by UI can be configured with code using YAML files
- .ebextions/ directory in the root of source
- YAML/JOSN
- .config extensions
- Resources managed by .ebextension are deleted if the env goes aways
What is under the hood of EB?
EB is using CloudFormation to setup things.
Whats Elastic Beanstalk Cloning?
- Clone an environment with the exact same configuration
- Useful for deploying a “test” version of your application
What to consider when migrating EB?
- After creating an Elastic Beanstalk environment, you cannot change the Elastic Load Balancer type (only the configuration)
- To migrate:
1. create a new environment with the same configuration except LB (can’t clone)
2. deploy your application onto the new environment
3. perform a CNAME swap or Route 53 update
Whats the best practice for RDS in EB?
The best for prod is to separately create an RDS database and provide our EB application with the connection string