Elastic Beanstalk Flashcards

1
Q

Can I run containers with Beanstalk?

A

Yes. Elastic Beanstalk and ECS are alternatives for running containers, with Elastic Beanstalk offering a higher level of abstraction and simplicity, and ECS providing more control over container orchestration.

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

Difference between EB running a single container per EC2 instance, and multi-container. How to implement the latter?

A

By default, EB runs one container / instance. You prepare a Dockerfile, and EB handles the rest.

EB can implement multi-container deployments (2+ per instance), using ECS behind the scenes.

  1. Create a “Dockerrun.aws.json” file describing each / all instances, and include it in your application code.
  2. Console: Choose “Multi-container Docker” as a platform
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Difference in container visibility (as part of a cluster) if the underlying instance is terminated (a) while running and (b) while stopped

A

If the instance is terminated by running, there might be a delay in the ECS service recognizing this. If the EC2 instance is terminated, the ECS agent on that instance loses connection with the ECS service, and it might take some time for the ECS service to recognize this disconnection and update the cluster’s state accordingly.

If the instance is stopped, the deregistration of a stopped instance from the ECS cluster is quicker because it’s already not participating in task placements and there’s less complexity involved in updating the cluster state.

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

How many roles are required for ECS / Fargate vs. ECS / EC2. Where do they reside?

A

Fargate: one role, in the Task Definition

EC2: two roles. One in the Task Definition, one in the EC2 Instance Profile

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

Difference between “ECS Service-Level Autoscaling” and “EC2 Autoscaling.”

A

ECS Service-Level Autoscaling only concerns scaling out the number of tasks (containers) that are running. This may necessitate changing the number of EC2 Instances hosting those containers, but the process of adjusting that number is handled by EC2 Instance Auto-Scaling.

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