Cantril Flashcards
(58 cards)
IAM Service-linked role
IAM role linked to a specific AWS service
You can’t delete the role until it’s no longer needed
IAM PassRole Permissions
a user can (e.g.) initialize a Cloudformation stack and pass a role to it. The role may have the necessary permissions even if the user does not. The user must have permission to pass the role.
Elastic Beanstalk Application
A collection of things relating to an application: code and infra
Service Control Policies
account permissions boundaries. And, they do not apply to the management account.
Source Bundle
Elastic Beanstalk Application Version
Elastic Beanstalk Environment
Container of infra and configuration for a specific application version
EB Deployment Policy Options
- All at once
Deploy to all at once, brief outage
Simple, but significant limitations - Rolling
Deploy in rolling batches
Loss in capacity during deployment - Rolling with additional batch
As above, but you pay for an additional batch so there’s no loss in capacity
Safer, but more expensive - Immutable
New instances with new version in new autoscaling group
When it passes its tests, the new instances are added to the original autoscaling group and the original instances are terminated
You have to pay for double your capacity during deployment
Lowest risk - Traffic splitting
Same as Immutable, but sends 50% of traffic to the new instances before terminating the old instances
you can do A/B testing
Regression path is quick
If you have an RDS instance inside an EB environment and you want to decouple it
- Create an RDS snapshot
- Enable delete protection
- Create a new DB environment with the same app version
- Ensure new env can connect to the DB that is now outside of EB
- Swap environments (CNAME or DNS)
- Terminate the old environment - this will try to terminate the RDS instance, but will fail because of step 2
- Locate DELETE_FAILED stack in CF and manually delete the stack, choosing to retain stuck resources
Customize EB environments
CF format in yml or json, stored in .ebextensions/*.config
option_settings allows you to set options of resources
Dockerrun.aws.json
ElasticBeanstalk and Docker
ECS
Elastic Container Service
ECR
Kinda like DockerHub, has container images
ECR Registry
can have many repositories
ECR Repository
can have many images
ECR Container Definition
Tells ECS where your container is, what port it uses. Just enough info about the container you want to define
ECR Task Definition
Task is a self-contained application. A task can have multiple container definitions inside it. It also contains the Task Role, which is an IAM role that the task can assume
ECR Service Definition
How we want a task to scale. It can add availability and scalability
ECS EC2 Mode
Runs within a VPC. Can take advantage of MultiAZ
Not serverless
ECS Fargate
Serverless. The user is not responsible for managing EC2 instances.
Each resource that is running your tasks and services is injected into your VPC.
You only pay for the resources you consume. You don’t manage hosts.
using containers
EC2, ECS with EC2, or ECS Fargate?
ECS
Large consistent workload, price conscious
EC2, ECS with EC2, or ECS Fargate?
EC2 Mode, using Spot and Reserve Instances
Large workload, overhead conscious, minimizing what you need to manage
EC2, ECS with EC2, or ECS Fargate?
Fargate
Small / Burst workloads
EC2, ECS with EC2, or ECS Fargate?
Fargate
Batch / Periodic
EC2, ECS with EC2, or ECS Fargate?
Fargate