Elastic Beanstalk Flashcards
What is Elastic Beanstalk?
It is a service for deploying and scaling web applications. Developers don’t have to worry about the underlying infrastructure that is needed to run the application.
What 8 programming technologies is supported by Elastic Beanstalk?
- Java
- Python
- Go
- Docker
- .NET
- Node.js
- PHP
- Ruby
What application server platforms are supported?
- Apache Tomcat
- Nginx
- Passenger
- Puma
- IIS
What will Elastic Beanstalk handle for you?
- Capacity provisioning
- Deployment
- Load balancing
- Auto-scaling
- Application health
What do you pay for?
You only pay for the AWS resources required to store and run your applications.
What more than deployment is included in Elastic Beanstalk?
- Update
- Monitoring
- Metrics
- Health checks
Which are the four deployment policies used by elastic Beanstalk? How do they work?
- All at Once
- Deploys the new version to all instances simultaneously
- All of your instances are out of service while the deployment takes place
- If the update fails, you need to roll back the changes by re-deploying the original version to all your instances
- Rolling
- Deploys the new version in batches
- Each batch of instances is taken out of service while the deployment takes place
- E.g. if you have ten EC2 instances and you deploy in batches of 2, then you will have 8 operating instances at all times during the deployment
- Your environment capacity will be reduces by the number of instances in a batch while the deployment takes place
- Not ideal for performance sensitive systems
- If the update fails, you need to perform an additional rolling update to roll back the changes
- Rolling with Additional Batch
- Launches an additional batch of instances
- Deploys the new version in batches
- Maintains full capacity during the deployment process
- If the update fails, you need to perform an additional rolling update to roll back the changes
- Immutable
- Deploys the new version to a fresh group of instances in their own new autoscaling group
- When the new instances pass their health check, they are moved to your existing autoscaling group; and finally, the old instances are terminated
- Maintains full capacity during the deployment process
- The impact of a failed update is far less, and the rollback process requires only to terminating the new autoscaling group
- Preferred option for Mission Critical production system
What format can be used to write the Elastic Beanstalk configuration files?
YAML and JSON.
What extension must the config files have?
.config
What folder must the config files be saved into?
In the .ebextensions folder. The .ebextensions folder must be included in the top-level directory of your application source code bundle.
What are the two ways of integrating an RDS database with your Elastic Beanstalk environment?
- Launch the RDS from within Elastic Beanstalk:
- The RDS instance is created within your Elastic Beanstalk environment
- Good option for Dev and Test deployments
- If you terminate the environment, the database instance will be terminated as well
- Launch the RDS from outside Elastic Beanstalk:
- This decouples the RDS instance from the EBS environment
- Gives more flexibility
- Allows you to connect multiple environments to the same database
- Provides a wider choice of database types
- Allows you to tear down your environment without affecting the database instance
- You need to add an additional Security Group to your environment’s Auto Scaling group
- You’ll need to provide connection string configuration information to your application servers (endpoint, password) using Elastic Beanstalk environment properties
You can deploy your Docker container using Elastic Beanstalk, how?
- You can deploy your Docker container to a single EC2 instance
- or, You can deploy multiple Docker instances to an ECS cluster
Elastic Beanstalk and Docker, from where can the code be uploaded?
- A public S3 bucket or you local machine.
- You can also store the code in CodeCommit, but then you will have to use the Elastic Beanstalk CLI