AWS Elastic Beanstalk Flashcards

1
Q

What is Elastic Beanstalk?

A
  • Managed service
  • Automatically handles capacity provisioning, load balancing, scaling, application
    health monitoring, instance configuration, …
  • Just the application code is the responsibility of the developer
  • Elastic Beanstalk is a developer centric view of deploying an application
    on AWS
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the Elastic Beanstalk components?

A
  • Application: collection of EB components
  • Applicaiton Version
  • Environment
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Whats the lifecycle of EB application?

A

Create app -> upload version -> Launch env -> Manage env -> iterate

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

List some supported EB platform

A
  • Go
  • Java SE
  • Java with Tomcat
  • .NET Core on Linux
  • .NET on Windows Server
  • Node.js
  • PHP
  • Python
  • Ruby
  • Packer Builder
  • Single Container Docker
  • Multi-container Docker
  • Preconfigured Docker
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the Environment tier in EB?

A
  • web server tier: ELB
  • worker tier: SQS Queue
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Whats the two EB Deployement modes?

A
  • Single instance - dev
  • High Availability with LB - prod
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the EB Deployment options for Updated?

A
  • All at once - fastest, but all instance is down
  • Rolling: update few instance, then move to next bucket (not 100% capacity)
  • Rolling with additional batches: same as rolling but adds new instances
  • Immutable: new instances in new ASG, swap if healty
  • Traffic splitting: canary testing - sends small % of traffic to the new deployement
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

List some EB CLI command:

A
  • eb create
  • eb status
  • eb health
  • eb events
  • eb logs
  • eb open
  • eb deploy
  • eb config
  • eb terminate
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What EB Deployement Proces?

A
  • package code as zip
  • Console: upload zip file, then deploy
  • CLI: create a new app version using CLI, then deploy
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is EB Lifecycle Policy?

A
  • EB can store max 1000 app vesions
  • Based on time
  • Based on space
  • not used versions are deleted
  • Option to not delete the source bundle, stored in S3
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are EB Extensions?

A
  • Parameters that are set by UI can be configured with code using YAML files
  • .ebextions/ directory in the root of source
  • YAML/JOSN
  • .config extensions
  • Resources managed by .ebextension are deleted if the env goes aways
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is under the hood of EB?

A

EB is using CloudFormation to setup things.

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

Whats Elastic Beanstalk Cloning?

A
  • Clone an environment with the exact same configuration
  • Useful for deploying a “test” version of your application
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What to consider when migrating EB?

A
  • After creating an Elastic Beanstalk environment, you cannot change the Elastic Load Balancer type (only the configuration)
  • To migrate:
    1. create a new environment with the same configuration except LB (can’t clone)
    2. deploy your application onto the new environment
    3. perform a CNAME swap or Route 53 update
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Whats the best practice for RDS in EB?

A

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
16
Q

How to decouple RDS from EB in case of migration?

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 CloudFormation stack (in DELETE_FAILED state)
16
Q

How to decouple RDS from EB in case of migration?

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 CloudFormation stack (in DELETE_FAILED state)
16
Q

How to decouple RDS from EB in case of migration?

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 CloudFormation stack (in DELETE_FAILED state)