17. Elastic Beanstalk Flashcards
What is the Elastic Beanstalk deployment process?
- Describe dependencies (requirements.txt for Python, package.json for Node.js)
- Package code as zip
- Console: upload zip file (creates new app version) and they deploy
- CLI: create new app version using CLI and then deploy - Elastic Beanstalk will deploy the zip on each EC2 instance, resolve dependencies, and start the application
When can you set an ELB type for your Elastic Beanstalk?
ONLY at creation
- you cannot change the ELB type after creating an EB environment
True or False: Beanstalk in Single Docker Container environment does NOT use ECS.
True
What is used to generate the ECS task definition in Elastic Beanstalk?
Dockerrun.aws.json is used to generate the ECS task definition
When would you use a Custom Platform on EB?
Custom Platform is to create an entirely new Beanstalk Platform
- used when your application language is incompatible with Beanstalk and doesn’t use Docker
- Build your own platform using the Packer software
- Define an AMI using Platform.yaml file
When would you use a Custom Image (AMI) on EB?
Custom Image is to tweak an existing Beanstalk Platform (Python, Node.js, Java, etc)
Which deployment policy provides minimal application downtime?
Blue/Green Deployment
How do you enable X-Ray on Elastic Beanstalk?
.ebextensions/xray-daemon.config
What is the folder that contains all EB configuration files?
.ebextensions (hidden at root dir of Elastic Beanstalk proj)
What is the environment manifest?
env.yaml
- at root of Elastic Beanstalk project
- allows you to configure EB defaults
What is the Elastic Beanstalk CLI command to configure your project directory and the EB CLI?
> eb init
What is the Elastic Beanstalk CLI command to create your first environment?
> eb create
What is the Elastic Beanstalk CLI command to see the current status of your environment?
> eb status
What is the Elastic Beanstalk CLI command to view health info about the instances and the state of your overall environment use?
> eb health (use –refresh to update every 10s)
What is the Elastic Beanstalk CLI command to see a list of events output by EB?
> eb events
What is the Elastic Beanstalk CLI command to pull logs from an instance in your environment?
> eb logs
What is the Elastic Beanstalk CLI command to open your environment’s website in a browser?
> eb open
What is the Elastic Beanstalk CLI command once the environment is running, deploy an update?
> eb deploy
What is the Elastic Beanstalk CLI command to take a look at the configuration options available for your running environment?
> eb config
What is the Elastic Beanstalk CLI command to delete the environment?
> eb terminate
How do you install the EB CLI?
> git clone https://github.com/aws/aws-elastic-beanstalk-cli.git
> ./aws-elastic-beanstalk-cli-setup/scripts/bundled_installer
Why would you want to use a custom image on EB?
a custom AMI can improve provisioning times when instances are launched in your environment, often used when you need to install a lot of software that isn’t included in the standard AMIs
Can you run containers on EB?
Yes. You can run containers on EB either in Single-container or Multi-container, these containers are running on ECS instead of EC2
What are the types of environments you can launch in EB?
Web Environment (Single-Instance or Load Balanced)
Worker Environment