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
What Beanstalk Deployment option for updates has the higher cost?
Immutable, double capacity
26
What is the order of Beanstalk Deployment options for updates in terms of deployment speed?
fastest to slowest: - All at once - Rolling - Rolling with additional batches - Immutable
27
What is great for Beanstalk Deployment option for updates All at once?
for quick iterations in development environment
28
How does work Beanstalk Deployment option for updates All at once?
deploy all in one go
29
How does work Beanstalk Deployment option for updates Rolling?
update a few instances at a time (bucket), and then move onto the next bucket once the first bucket is healthy
30
How does work Beanstalk Deployment option for updates Rolling with additional batches?
like rolling, but spins up new instances to move the batch (so that the old application is still available)
31
How does work Beanstalk Deployment option for updates Immutable?
spins up new instances in a new ASG, deploys version to these instances, and then swaps all the instances when everything is healthy
32
How can you define Beanstalk Deployment options for updates buckets/batches?
Bucket / Batch size can be a total of instances or a % of instances
33
What Beanstalk Deployment options for updates allow to use buckets/batches?
- rolling | - rolling with additional batches
34
What Beanstalk Deployment option for updates keeps your application running but at bellow capacity?
rolling
35
What Beanstalk Deployment option for updates keeps your application running at capacity?
Rolling with additional batches | Immutable
36
What Beanstalk Deployment options for updates are good for prod environments?
- rolling with additional batches | - Immutable (GREAT)
37
What allows you to create a new “stage” environment and deploy v2 there to be validated in Beanstalk?
Blue / Green deployment
38
What is the new environment color in Blue / Green deployment?
Green
39
How could you test your new green environment?
Route 53 can be setup using weighted policies to redirect a little bit of traffic to the stage environment
40
Using Beanstalk what you need to do once the Green environment has been validated?
A CNAME URLs swap
41
What can you install to work with Beanstalk from the CLI easier?
We can install an additional CLI called the “EB cli” which makes working with Beanstalk from the CLI easier.
42
What is helpful for the EB CLI?
It’s helpful for your automated deployment pipelines!
43
How many application versions can store at most Elastic Beanstalk ?
Elastic Beanstalk can store at most 1000 application versions
44
What can you use to phase out old application versions in Beanstalk?
To phase out old application versions, use a lifecycle policy
45
Based on what can you define lifecycle policies in Beanstalk?
o Based on time (old versions are removed) | o Based on quantity, space (when you have too many versions)
46
What happens to versions that are currently in use and are affected by a Beanstalk lifecycle policy?
Versions that are currently used won’t be deleted
47
What happens to the source bundles in S3 of versions that are affected by a Beanstalk lifecycle policy?
You have the option to retain or delete the source bundle in S3 to prevent data loss (useful for restoring purposes)
48
How can you configure your Beanstalk apps outside the console?
All the parameters set in the UI can be configured with code using files
49
Where should be located the code where you are configuring your Beanstalk app?
in the .ebextensions/ directory in the root of source code
50
What format must have the code where you are configuring your Beanstalk app?
YAML / JSON format
51
What file extension must have the file where you are configuring your Beanstalk app?
.config extensions (example: logging.config)
52
What are you able to do from the code where you are configuring your Beanstalk app?
o Able to modify some default settings using: option_settings o Ability to add resources such as RDS, ElastiCache, DynamoDB, etc.…
53
What could happen to resources managed by .ebextensions from the code where you are configuring your Beanstalk app?
Resources managed by .ebextensions get deleted if the environment goes away
54
Set an example of one option_settings that you can modify from the code where you are configuring your Beanstalk app
Environment variables
55
What relies on Beanstalk under the hood?
Under the hood, Elastic Beanstalk relies on CloudFormation. Stacks are created behind scenes
56
What can you do in your .ebextensions using CloudFormation?
you can define CloudFormation resources in your .ebextensions to provision ElastiCache, an S3 bucket, anything you want!
57
What is useful for deploying a “test” version of your Beanstalk application?
Cloning feature
58
While cloning a Beanstalk environment, what can and cannot you change?
While cloning an environment, you can just change a few settings, you can’t change i.e. the LB
59
While cloning a Beanstalk environment, what happens to RDS?
You can clone RDS database type but the data is not preserved
60
How can you migrate your ELB in Beanstalk?
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
How can you decouple your RDS database from your Beanstalk environment?
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
What you must provide to run a Elastic Beanstalk – Single Container Docker?
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
What Beanstalk platform does not use ECS?
Beanstalk in Single Docker Container does not use ECS
64
What is required to run a Beanstalk Multicontainer Docker?
* 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
What is used for a Beanstalk Multi container Docker?
• 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
What can you do if your Beanstalk application performs tasks that are long to complete?
decouple your app in two tiers and offload these tasks to a dedicated worker environment
67
How can you define tasks in your Beanstalk worker environment?
You can define periodic tasks in a file cron.yaml
68
How can you create a new Beanstalk platform?
Build that platform using the Packer software (open source tool to create AMIs)
69
What is the use case for creating a new Beanstalk platform?
Use case: app language is incompatible with Beanstalk & doesn’t use Docker