Elastic Beanstalk Flashcards

1
Q

What is Elastic Beanstalk?

A

Is a managed platform as a service (PAAS) and a developer-centric view of managing End-to-end web applications on AWS.

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

Who is in full control over the configuration of Elastic Beanstalk?

A

You, not AWS

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

Is Elastic Beanstalk free?

A

yes, but you pay for the underlying instances

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

How is the deployment strategy of Elastic Beanstalk?

A

configurable but performed by Elastic Beanstalk

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

What are the 3 architecture models of Elastic Beanstalk?

A
  • Single instance
  • LB + ASG
  • ASG only
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is good for Single instance architecture model of Elastic Beanstalk?

A

good for dev

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

What is good for LB + ASG architecture model of Elastic Beanstalk?

A

good for prod or pre-prod web apps

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

What is good for ASG only architecture model of Elastic Beanstalk?

A

for non-web apps in prod (workers, etc…)

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

What are the 3 components of Elastic Beanstalk?

A
  • Application
  • Application version: each deployment gets assigned a version
  • Environment name (dev, test, prod…): free naming
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Can you rollback to an old application version in Elastic Beanstalk?

A

yes

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

Is there a lifecycle of environments in Elastic Beanstalk?

A

yes, and you can fully control it

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

What technologies are supported by Elastic Beanstalk?

A
  • Many programming languages
  • Docker containers
  • your custom written platform (advanced)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is just the responsability of the developer in Elastic Beanstalk?

A

the code

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

Once you create your app in Elastic Beanstalk, what is created along with it?

A
  • an environment
  • a new application version
  • all the underlying elements of your application i.e. S3 buckets, Security Groups, EC2 instances, EIPs, etc.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the Beanstalk Application code options?

A

upload your code as a zip or create a sample application

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

What is the main information provided in the Beanstalk environment?

A
  • Configuration
  • Logs
  • Health
  • Monitoring
  • Alarms
  • Events
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What shows you what is going on in your Beanstalk environment?

A
The Events. There are several severity levels:
o	TRACE
o	DEBUG
o	INFO
o	WARN
o	ERROR
o	FATAL
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is available to you when you create a second Beanstalk environment?

A

To create a worker environment

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

What are the 5 configuration presets in Beanstalk apps?

A
o	Single instance (free tier)
o	Single instance (using Spot instance)
o	High Availability
o	High Availability (using on demand and spot instances)
o	Custom configuration
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What are the main aspects included in the Beanstalk App configuration?

A
  • Presets
  • Software (X-Ray, S3 log storage, CloudWatch logs, etc.)
  • Instances (Root volume, Security groups, etc.)
  • Capacity
  • Rolling updates and deployments
  • Security
  • Monitoring
  • Managed Updates
  • Notifications
  • Network
  • Database
  • Tags
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What you should know about RDS databases in Beanstalk applications?

A

DS can be provisioned with Beanstalk, which is great for dev / test
• This is not great for prod as the database lifecycle is tied to the Beanstalk environment lifecycle and it is deleted with the environment
• The best for prod is to separately create an RDS database and provide our EB application with the connection string

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

What are the 4 Beanstalk Deployment options for 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
23
Q

What are the no cost Beanstalk Deployment options for updates?

A
  • All at once

- Rolling

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

What Beanstalk Deployment option for updates has downtime?

A

All at once

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

What Beanstalk Deployment option for updates has the higher cost?

A

Immutable, double capacity

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

What is the order of Beanstalk Deployment options for updates in terms of deployment speed?

A

fastest to slowest:

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

What is great for Beanstalk Deployment option for updates All at once?

A

for quick iterations in development environment

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

How does work Beanstalk Deployment option for updates All at once?

A

deploy all in one go

29
Q

How does work Beanstalk Deployment option for updates Rolling?

A

update a few instances at a time (bucket), and then move onto the next bucket once the first bucket is healthy

30
Q

How does work Beanstalk Deployment option for updates Rolling with additional batches?

A

like rolling, but spins up new instances to move the batch (so that the old application is still available)

31
Q

How does work Beanstalk Deployment option for updates Immutable?

A

spins up new instances in a new ASG, deploys version to these instances, and then swaps all the instances when everything is healthy

32
Q

How can you define Beanstalk Deployment options for updates buckets/batches?

A

Bucket / Batch size can be a total of instances or a % of instances

33
Q

What Beanstalk Deployment options for updates allow to use buckets/batches?

A
  • rolling

- rolling with additional batches

34
Q

What Beanstalk Deployment option for updates keeps your application running but at bellow capacity?

A

rolling

35
Q

What Beanstalk Deployment option for updates keeps your application running at capacity?

A

Rolling with additional batches

Immutable

36
Q

What Beanstalk Deployment options for updates are good for prod environments?

A
  • rolling with additional batches

- Immutable (GREAT)

37
Q

What allows you to create a new “stage” environment and deploy v2 there to be validated in Beanstalk?

A

Blue / Green deployment

38
Q

What is the new environment color in Blue / Green deployment?

A

Green

39
Q

How could you test your new green environment?

A

Route 53 can be setup using weighted policies to redirect a little bit of traffic to the stage environment

40
Q

Using Beanstalk what you need to do once the Green environment has been validated?

A

A CNAME URLs swap

41
Q

What can you install to work with Beanstalk from the CLI easier?

A

We can install an additional CLI called the “EB cli” which makes working with Beanstalk from the CLI easier.

42
Q

What is helpful for the EB CLI?

A

It’s helpful for your automated deployment pipelines!

43
Q

How many application versions can store at most Elastic Beanstalk ?

A

Elastic Beanstalk can store at most 1000 application versions

44
Q

What can you use to phase out old application versions in Beanstalk?

A

To phase out old application versions, use a lifecycle policy

45
Q

Based on what can you define lifecycle policies in Beanstalk?

A

o Based on time (old versions are removed)

o Based on quantity, space (when you have too many versions)

46
Q

What happens to versions that are currently in use and are affected by a Beanstalk lifecycle policy?

A

Versions that are currently used won’t be deleted

47
Q

What happens to the source bundles in S3 of versions that are affected by a Beanstalk lifecycle policy?

A

You have the option to retain or delete the source bundle in S3 to prevent data loss (useful for restoring purposes)

48
Q

How can you configure your Beanstalk apps outside the console?

A

All the parameters set in the UI can be configured with code using files

49
Q

Where should be located the code where you are configuring your Beanstalk app?

A

in the .ebextensions/ directory in the root of source code

50
Q

What format must have the code where you are configuring your Beanstalk app?

A

YAML / JSON format

51
Q

What file extension must have the file where you are configuring your Beanstalk app?

A

.config extensions (example: logging.config)

52
Q

What are you able to do from the code where you are configuring your Beanstalk app?

A

o Able to modify some default settings using: option_settings
o Ability to add resources such as RDS, ElastiCache, DynamoDB, etc.…

53
Q

What could happen to resources managed by .ebextensions from the code where you are configuring your Beanstalk app?

A

Resources managed by .ebextensions get deleted if the environment goes away

54
Q

Set an example of one option_settings that you can modify from the code where you are configuring your Beanstalk app

A

Environment variables

55
Q

What relies on Beanstalk under the hood?

A

Under the hood, Elastic Beanstalk relies on CloudFormation. Stacks are created behind scenes

56
Q

What can you do in your .ebextensions using CloudFormation?

A

you can define CloudFormation resources in your .ebextensions to provision ElastiCache, an S3 bucket, anything you want!

57
Q

What is useful for deploying a “test” version of your Beanstalk application?

A

Cloning feature

58
Q

While cloning a Beanstalk environment, what can and cannot you change?

A

While cloning an environment, you can just change a few settings, you can’t change i.e. the LB

59
Q

While cloning a Beanstalk environment, what happens to RDS?

A

You can clone RDS database type but the data is not preserved

60
Q

How can you migrate your ELB in Beanstalk?

A

After creating an ELB, you cannot change the type. To migrate:
o create a new environment with the same configuration except LB (can’t clone)
o deploy your application onto the new environment
o perform a CNAME swap or Route53 update

61
Q

How can you decouple your RDS database from your Beanstalk environment?

A
  1. Create a snapshot of RDS DB (as a safeguard)
  2. Go to the RDS console and protect the RDS database from deletion
  3. Create a new Elastic Beanstalk environment, without RDS, point your application to existing RDS
  4. perform a CNAME swap (blue/green) or Route 53 update, confirm working
  5. Terminate the old environment (RDS won’t be deleted)
  6. Delete manually CloudFormation stack (in DELETE_FAILED state)
62
Q

What you must provide to run a Elastic Beanstalk – Single Container Docker?

A

Either:
o Dockerfile: Elastic Beanstalk will build and run the Docker container
o Dockerrun.aws.json (v1): Describe where already built Docker image is

63
Q

What Beanstalk platform does not use ECS?

A

Beanstalk in Single Docker Container does not use ECS

64
Q

What is required to run a Beanstalk Multicontainer Docker?

A
  • a config Dockerrun.aws.json (v2) at the root of source code
  • Dockerrun.aws.json is used to generate the ECS task definition
  • Your Docker images must be pre-built and stored in ECR for example
65
Q

What is used for a Beanstalk Multi container Docker?

A

• Multi Docker helps run multiple containers per EC2 instance in EB
• This will create for you:
o ECS Cluster
o EC2 instances, configured to use the ECS Cluster
o Load Balancer (in high availability mode)
o Task definitions and execution

66
Q

What can you do if your Beanstalk application performs tasks that are long to complete?

A

decouple your app in two tiers and offload these tasks to a dedicated worker environment

67
Q

How can you define tasks in your Beanstalk worker environment?

A

You can define periodic tasks in a file cron.yaml

68
Q

How can you create a new Beanstalk platform?

A

Build that platform using the Packer software (open source tool to create AMIs)

69
Q

What is the use case for creating a new Beanstalk platform?

A

Use case: app language is incompatible with Beanstalk & doesn’t use Docker