Other Compute Services Flashcards

1
Q

What is Docker?

A

• Docker is a software development platform to deploy apps
• Apps are packaged in containers that can be run on any OS
• Apps run the same, regardless of where they’re run
• Scale containers up and down very quickly (seconds)

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

Where are Docker images stored?

A

• Docker images are stored in Docker Repositories

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

Docker versus Virtual Machines

A

• Docker is ”sort of” a virtualization technology, but not exactly
• Resources are shared with the host => many containers on one server
• VM emulates machine hardware whereas Docker emulates the operating system in which your application runs.

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

Elastic Container Service (ECS)

A

Is a fully managed container orchestration service that makes it easy for you to deploy, manage, and scale containerized applications.

• You must provision & maintain the infrastructure (the EC2 instances)
• AWS takes care of starting / stopping containers

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

Fargate

A

Fargate is a “serverless” way to run your ECS/EKS containers in a cluster. AWS manages the underlying host, which means you don’t have to think about patching, scaling, or securing of the host.

• AWS just runs containers for you based on the CPU / RAM you need

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

Elastic Container Registry (ECR)

A

• Private Docker Registry on AWS
• This is where you store your Docker images so they can be run by ECS or Fargate

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

What’s serverless?

A

• Serverless is a new paradigm in which the developers don’t have to manage servers anymore…
• They just deploy code
• They just deploy… functions
• Serverless does not mean there are no servers…

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

Some of the serverless services in AWS

A

• S3
• DynamoDB
• Fargate
• Lambda

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

Why AWS Lambda

A

• No servers to manage!
• Limited by time - short executions
• Run on-demand
• Scaling is automated!

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

Benefits of AWS Lambda

A

• Pay per request and compute time (Calls and Duration)
• Integrated with the whole AWS suite of services
• Event-Driven: functions get invoked by AWS when needed
• Can scale from a single request to hundreds of thousands per second.
• Integrated with many programming languages
• Easy to get more resources per functions (up to 10GB of RAM!)

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

AWS Lambda language support

A

• Node.js (JavaScript)
• Python
• Java (Java 8 compatible)
• C# (.NET Core)
• C# / Powershell
• Ruby

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

Lambda Container Image

A

Is a package that includes the Lambda Runtime API, necessary dependencies, an operating system, and function handlers required to run Docker containers in AWS Lambda.
• These packages allow development teams to deploy and execute arbitrary code and libraries into the Lambda runtime.
• ECS / Fargate is preferred for running arbitrary Docker images

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

Example: Serverless Thumbnail creation

A

New image in S3 > Trigger > AWS Lambda Function (Creates a Thumbnail) > Push > New thumbnail in S3

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

Example: Serverless CRON Job

A

CloudWatch Events EventBridge > Trigger Every 1 hour > AWS Lambda Function (Perform a task)

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

Amazon API Gateway

A

• Example: building a serverless API
• Fully managed service for developers to easily create, publish, maintain, monitor, and secure APIs
• Scalable
• Supports RESTful APIs and WebSocket APIs
• Support for security, user authentication, API throttling, API keys, monitoring…

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

Amazon API Gateway (Example)

A

Client > REST API > API Gateway > PROXY REQUESTS > Lambda > CRUD > DynamoDB

16
Q

AWS Batch

A

A “batch” job is a job with a start and an end (opposed to continuous)
• Fully managed batch processing at any scale
• Efficiently run 100,000s of computing batch jobs on AWS
• Batch will dynamically launch EC2 instances or Spot Instances
• AWS Batch provisions the right amount of compute / memory
• Batch jobs are defined as Docker images and run on ECS
• You submit or schedule batch jobs and AWS Batch does the rest!
• Helpful for cost optimizations and focusing less on the infrastructure

17
Q

AWS Batch (Example)

A

Amazon S3 > Trigger > AWS Batch with ECS launches an EC2 Instance & Spot Instance > Insert processed object > Amazon S3

18
Q

Batch vs Lambda

A

Lambda: • Time limit • Limited runtimes • Limited temporary disk space • Serverless

Batch: • No time limit • Any runtime as long as it’s packaged as a Docker image • Rely on EBS / instance store for disk space • Relies on EC2 (can be managed by AWS)

19
Q

Amazon Lightsail

A

Build applications and websites fast with low-cost, pre-configured cloud resources
• Virtual servers, storage, databases, and networking
• Low & predictable pricing
• Great for people with little cloud experience
• Has high availability but no auto-scaling, limited AWS integrations
• Use cases: Simple web applications, Websites and Dev / Test environment

20
Q

Other Compute - Summary

A

• Docker: container technology to run applications
• ECS: run Docker containers on EC2 instances
• Fargate: Run Docker containers without provisioning the infrastructure (Serverless)
• ECR: Private Docker Images Repository
• Batch: run batch jobs on AWS across managed EC2 instances
• Lightsail: predictable & low pricing for simple application & DB stacks

21
Q

Lambda Summary

A

• Lambda Billing: By the time run x by the RAM provisioned & By the number of invocations
• Language Support
• Invocation time: up to 15 minutes
• API Gateway: expose Lambda functions as HTTP API
• Use cases: Create Thumbnails for images uploaded onto S3 & Run a Serverless cron job