17. Elastic Beanstalk Flashcards

1
Q

What is the Elastic Beanstalk deployment process?

A
  1. Describe dependencies (requirements.txt for Python, package.json for Node.js)
  2. Package code as zip
  3. Console: upload zip file (creates new app version) and they deploy
    - CLI: create new app version using CLI and then deploy
  4. Elastic Beanstalk will deploy the zip on each EC2 instance, resolve dependencies, and start the application
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

When can you set an ELB type for your Elastic Beanstalk?

A

ONLY at creation

- you cannot change the ELB type after creating an EB environment

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

True or False: Beanstalk in Single Docker Container environment does NOT use ECS.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is used to generate the ECS task definition in Elastic Beanstalk?

A

Dockerrun.aws.json is used to generate the ECS task definition

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

When would you use a Custom Platform on EB?

A

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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

When would you use a Custom Image (AMI) on EB?

A

Custom Image is to tweak an existing Beanstalk Platform (Python, Node.js, Java, etc)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which deployment policy provides minimal application downtime?

A

Blue/Green Deployment

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How do you enable X-Ray on Elastic Beanstalk?

A

.ebextensions/xray-daemon.config

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the folder that contains all EB configuration files?

A

.ebextensions (hidden at root dir of Elastic Beanstalk proj)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the environment manifest?

A

env.yaml

  • at root of Elastic Beanstalk project
  • allows you to configure EB defaults
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the Elastic Beanstalk CLI command to configure your project directory and the EB CLI?

A

> eb init

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the Elastic Beanstalk CLI command to create your first environment?

A

> eb create

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the Elastic Beanstalk CLI command to see the current status of your environment?

A

> eb status

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the Elastic Beanstalk CLI command to view health info about the instances and the state of your overall environment use?

A

> eb health (use –refresh to update every 10s)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the Elastic Beanstalk CLI command to see a list of events output by EB?

A

> eb events

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the Elastic Beanstalk CLI command to pull logs from an instance in your environment?

A

> eb logs

17
Q

What is the Elastic Beanstalk CLI command to open your environment’s website in a browser?

A

> eb open

18
Q

What is the Elastic Beanstalk CLI command once the environment is running, deploy an update?

A

> eb deploy

19
Q

What is the Elastic Beanstalk CLI command to take a look at the configuration options available for your running environment?

A

> eb config

20
Q

What is the Elastic Beanstalk CLI command to delete the environment?

A

> eb terminate

21
Q

How do you install the EB CLI?

A

> git clone https://github.com/aws/aws-elastic-beanstalk-cli.git

> ./aws-elastic-beanstalk-cli-setup/scripts/bundled_installer

22
Q

Why would you want to use a custom image on EB?

A

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

23
Q

Can you run containers on EB?

A

Yes. You can run containers on EB either in Single-container or Multi-container, these containers are running on ECS instead of EC2

24
Q

What are the types of environments you can launch in EB?

A

Web Environment (Single-Instance or Load Balanced)
Worker Environment

25
Q

What comes with a Single Instance Web Environment in EB?

A

EB will launch a single EC2 instance and an EIP is assigned to the EC2

26
Q

What comes with a Load Balanced Web Environment in EB?

A

EB will launch EC2s behind an ELB managed by an ASG

27
Q

What comes with a Worker Environment in EB?

A

EB creates an SQS queue, installs the SQS daemon on the EC2 instances, and has an ASG scaling policy which will add or remove instances based on queue size

28
Q

Where will EB create your RDS?

A

If you let EB create the RDS instance, that means when you delete your environment, it will delete the database (bc the DB will be inside EB).

This setup is intended for development and test environments.

29
Q

What is a Blue/Green deployment?

A

Blue/Green is when deployment swaps environments (OUTSIDE an environment)

When you have external resources, such as RDS, which cannot be destroyed, B/G deployment is best

30
Q

Rolling deployment policies do not work on which environment?

A

Rolling deployments require an ELB so they cannot be used with a Single-Instance Web Environment

31
Q

What is the Immutable Deployment Policy?

A

Immutable creates the same amount of servers, switches all at once to new servers, and removes old servers

  • no downtime
  • easy to rollback
32
Q

What is the Rolling with additional batch Deployment Policy?

A

Rolling with additional batch adds new servers in batches to replace old

  • never reduces capacity
33
Q

What is the Rolling Deployment Policy?

A

Rolling updates servers in batches

  • reduced capacity based on batch size
34
Q

What is the All at once Deployment Policy?

A

All at once takes all servers out-of-service, applies changes, puts servers back-in-service

  • Fast
  • Has downtime