Elastic Beanstalk Flashcards

1
Q

What is Elastic Beanstalk?

A
  • A managed AWS service that provides a developer centric view of deploying a web application on AWS.
  • Provides the developer with a central location to obtain all necessary resources (i.e. ALB, EC2, RDS etc) for an application.
  • Relies on AWS CloudFormation under the hood to provision other AWS services.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the cost of Elastic Beanstalk?

A

Elastic Beanstalk is free, but the underlying services (i.e EC2) are paid for

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

What are the three components of Elastic Beanstalk?

A
  • Application
  • Application Version
  • Environment (dev, at, prod)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the four deployment options for Beanstalk updates?

A
  • All at Once
  • Rolling
  • Rolling with additional batches
  • Immutable
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is an ‘All at Once’ deployment on Beanstalk?

A

This is the fastest deployment types, but there is downtime.. Good for development environment.

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

What is a ‘Rolling’ deployment on Beanstalk?

A
  • Update a few instances at a time (called buckets), and then move on to the next bucket when the current one is healthy.
  • Application runs below capacity.
  • Both old and new versions will run simultaneously.
  • No additional cost.
  • Long deployment.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a ‘Rolling with Additional Batches’ deployment on Beanstalk?

A

This is like the rolling deployment but it launches new instances to move the batch. This means that the application remains running at capacity, but still has both the old and new versions running at the same time.

Cost a little more because of the additional instances to keep app at capacity.

Good for production environment.

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

What is an ‘Immutable’ deployment on Elastic Beanstalk?

A
  • Spins up new instances in a new ASG, deploys new version to these instances and then swaps all the instances when the new version instances are all healthy.
  • No downtime.
  • High cost because it doubles the capacity.
  • Longest deployment.
  • Great for production.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Describe Blue / Green Deployment in Elastic Beanstalk.

A
  • Not a direct feature of Beanstalk but may be on the exam.
  • Zero downtime and release facility.
  • Create a new ‘stage’ environment (green) an deploy new version there.
  • Setup Route 53 (weighted) to direct a certain % of traffic to new green / staged environment.
  • If new version fails can be rolled back easily.
  • If it passes, can use ‘URL Swap’ feature in Beanstalk to swap old version (blue) URL with the new version (green) url.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Describe the basic deployment process for elastic beanstalk (regardless if deployment method).

A
  • Describe dependencies (i.e NodeJS)
  • Package code as zipfile
  • Upload zipfile (creates a new app version)
  • Deploy code- elastic beanstalk will deploy the zip onto each EC2 instance, resolve dependencies and start the application.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are Beanstalk lifecycle policies?

A
  • Life cycle policies in beanstalk can be based on time or space used.
  • Point is to delete OLDER versions of the application so that new versions can be continually deployed.
  • There is an option to store old bundles in an S3 bucket so that they are still archived.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How many application versions can be stored on Elastic Beanstalk?

A
  1. Once this max is reached, new applications can not be deployed. To deal with this, set life cycle policies.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Can the load balancer type be changed in Elastic Beanstalk once the environment is created?

A

No. If the load balancer type needs to be changed, you can choose to migrate the existing application. To migrate a beanstalk application, create a new environment with the same config as current (can not clone), deploy app to new environment, perform CNAME swap or route53 update.

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

What are the 2 main environments in Elastic Beanstalk?

A
  • Web Environment (Single Instances or Load Balanced)
  • Worker Environment (creates SQS queue, installs the SQS daemon on the EC2 instances and has ASG scaling policy which will add or remove instances based on queue size).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the purpose of .ebextensions directory in an elastic beanstalk project?

A
  • All of the parameters that can be set in the Elastic Beanstalk UI can be defined in config files. These config files must live in a .ebextensions directory.
  • Each file within this directory should end with .config
  • Files can be YAML or JSON
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the difference between Elastic Beanstalk rolling deployments (both regular and additional batches) and immutable deployments

A
  • Rolling and rolling with additional batches will have both pevious and new versions running simultaneously.
  • Immutable gets all instances new versions running in healthy state in a new ASG whie old version is still running. Once all new instances are healthy, previous versions are removed and replaced with newer version. So both versions are new presented to end user at same time.
17
Q

What AWS Service does Beanstalk rely on under the hood?

A

Relies on AWS CloudFormation under the hood to provision other AWS services.

18
Q

What happens to the resources created in a .ebextensions if the environment gets deleted?

A

Resources managed by .ebextensions get deleted if the environment goes away (i.e if you let.
elastic beanstalk provision an RDS, that RDS will disappear
if the environment its in gets deleted). RDS provisioned by beanstalk are good for dev/test but not recommended for prod.