Elastic Beanstalk Flashcards
For a blue/green deployment type in Beanstalk which sort of DNS record is changed when you swap a url to point to a different application version?
CNAME.
You have performed a URL swap for a blue/green beanstalk deployment. When you hit the URL for the ‘blue’ site though, nothing seems to have changed. Why?
CNAME record changes occur at the R53 level. If DNS records are cached, the change may not be visible until the TTL expires.
I would like to customize the runtime of Elastic Beanstalk and include some of my company wide security software. I should
- Use EC2 userdata
- Use Docker
- Create a custom platform
Create a custom platform
Why can you not use Lambda as a resource for Beanstalk to provision a web environment?
Because lambda is an event driven severless platform that runs code in response to events and automatically manages the resources required for running that code.
Can Beanstalk deploy application versions to multiple environments?
Yes
You have created a test environment in Elastic Beanstalk and as part of that environment, you have created an RDS database. How can you make sure the database can be explored after the environment is destroyed?
- Take a snapshot of the RDS database
- Use selective deletion in Beanstalk
- Change the elastic Beanstalk environment variables
Take a snapshot of the RDS database
We have a development environment set up in Beanstalk, and a fast cadence of code releases. We can also handle a little bit of downtime as code is being deployed. Which Deployment model is best in this situation?
All At Once. This is the fastest deployment mode, but it comes at the cost of downtime as all the instances are unavailable as the deployment takes place
When you remove an application version via a lifecycle rule, do you have the option to persist the source bundle on S3
Yes
When and why would you use Packer?
You would use packer when creating your own custom Beanstalk platform. It is an open source AMI creation tool.
There are 3 architecture models for Beanstalk. What are they?
Single instance
ALB+ASG
ASG only (for worker processes)
What two are the two configuration options available for a Beanstalk Life cycle policy?
- Time Based: Beanstalk can be configured to remove versions when they hit a specified age.
- Space Based: Beanstalk can be configured to remove old versions of an application when a specified number of versions is hit
My deployments on Elastic Beanstalk have been painfully slow, and after looking at the logs, I realize this is due to the fact that my dependencies are resolved on each EC2 machine at deployment time. How can I speed up my deployment with the minimal impact?
- Place the dependencies in S3
- Remove the dependencies from your code
- Resolve the dependencies and package them in the application zip which gets uploaded to Beanstalk
Resolve the dependencies and package them in the application zip which gets uploaded to Beanstalk
Where must EB Extension config files be located?
in the /.ebextensions directory in you application zip files root directory.
When running an immutable deployment, what is the first step that Beanstalk takes when deploying new application ?
Beanstalk will deploy the application to one instance and execute health checks against that instance. If these pass, it will continue the deployment including creating the ASG.
We have a lifecycle policy set up to remove versions of an application when they are over 200 days old. What will happen with this policy if we have a currently used version of the application that is over 200 days old?
Nothing. Currently used versions of the application are unaffected by Beanstalk.
When creating ebextensions files - what must the filename end in?
.config
You would like your Elastic Beanstalk environment to expose an HTTPS endpoint instead of an HTTP endpoint in order to get in-flight encryption between your clients and your web servers. What must be done to setup HTTPS on Beanstalk?
- Use a seperate CF template and load the SSL cert into the load balancer
- create an .ebextension/elb.config file to configure the LB
- Open port 443 for the Security group
- Enable Health checks
-create an .ebextension/elb.config file to configure the LB
How many versions of an application can you have in Beanstalk and what are the implications of this number when it comes to deployments?
- The implication is that if you hit this limit, you will not be able to deploy new versions.
What service does Elastic Beanstalk use under the hood?
CloudFormation
If you provision a single container docker application via Beanstalk, does this provision an ECS cluster, or provision an EC2 instance with docker?
A single container docker application will be run on an Ec2 instance with docker
By default, does health monitoring in beanstalk publish metrics to cloudwatch?
No.
We have a Beanstalk environment set up for our production application and we need to determine the best strategy for updates. The caveat is that we are NOT able to reduce our capacity during the update, although we are ok with having both versions of the application running concurrently and with a long update.
In this case, we would use a rolling update with batches. This ensures that we are never below capacity during the update as new instances based on the bucket size will be spooled up, added to the deployment and then old instances will be taken down. I.e. if we have 4 instances running v1, and a bucket size of 2, then for a time we will have 4 v1+ 2v2 = 6 instances, then 2v1 + 4v2 = 6 and finally4 v2
There are four types of DEPLOYMENTS (not architectures) for elastic Beanstalk. What are they (5)?
All At Once Rolling Rolling with Batches Immutable Blue/Green
what is the purpose of elastic beanstalk extensions
EBExtensions allow you to define cloud formation resources to provision during EB stack creation via a JSON or YAML config file. They give you access to resources that are not provisionable through the UI - such as Elasticache.