EC2

Containers (ECS/Fargate/EKS)

Lambda

Amazon EC2

Overview of the Basics

EC2 Containter Service (ECS)

Virtualization at the host level: Taking the abstraction up one level where we have multiple running Application on the same OS (rather then multiple OS running on same metal)

Conatiner Advantage
Virtualization at the OS level:

Amazon ECS

Amazon EKS

Run Kubernetes on AWS without needing to install and operate your own Kubernetes clusters

AWS Fargate

It manages your containerization clusters for us

Run containers without having to manage servers or clusters

Serverless (Lambda)

Abstracting away the whole infrastructure the code is running on

Lambda is event based

Anatomy of Lambda Functions

Handler Function

Event Object

Context Object

About Lambda:
Simple Resources Model:
Up to 3GBS of Ram for invocation

Flexible use

Flexible authorization

Monitoring and Logging

Stateless

Execution Time

Debugging & Error Handling

VPC Support

Environment Variables

Versioning and Aliases

Deployment

Concurrency

Our use case is event based data

Lambda Real-Time Event sources

Async Push Model Example

Sync Push Model Example

How Sync/Async event sources works

Stream Pull Model Example (Streaming Data)

How Stream Pull model event sources

Review: Components of serverless architectures to use with Lambda

Streaming Data to invoke lambda

Data Persistence

APIs (exposing and managing api security)

Popular Event Sources

Integration Points (Lambda can reach out to other services, and interact with other services)

Smart Resrouce Allocation

Questions: Can you use normal lambda triggered by CloudFrontDistribution (instead of lambda at edge (probably because of performancce))

Which Compute Service to choose

Considerations

VMS

Containers

Serverless

Choose Amazon EC2 for

Choose Amazon ECS for

Chooses AWS Lambda for