Serverless Flashcards
How is Lambda priced?
Lambda is priced based on the Number of Requests and Duration of the process.
How many requests are free with Lambda?
The first 1 million Lambda requests are free
How does Lambda scale?
Lambda scales out, not up
What service allows you to debug your complex Lambda services?
X-Ray allows you to debug your Lambda services
What is SAM?
SAM is Serverless Application Model
What is SAM used for?
The AWS Serverless Application Model (SAM) is an open-source framework for building serverless applications.
SAM provides shorthand syntax to express functions, APIs, databases, and event source mappings. With just a few lines per resource, you can define the application you want and model it using YAML.
What is a container?
A container is a package that contains an application, libraries, runtime and tools required to run it
What is a popular container engine?
Docker is a popular container engine
What is the benefit to containers over virtualisation?
Containers provide the benefits of virtualisation with less overhead and give faster starts than VMS
What is ECS?
ECS is a managed container orchestration service. It takes all the heavy lifting out of deploying, managing and scaling containers
What instances can ECS manage?
ECS can manage EC2 and Fargate instances
What are the components of ECS?
The components of ECS are:
- Cluster
- Task Definition
- Container Definition
- Task
- Service
- Registry
What is an ECS Cluster?
An ECS Cluster is a logical collection of ECS resources - either ECS EC2 instances or Fargate instances
What are ECS Task Definitions?
ECS Task Definitions are similar to a Dockerfile that enables you to define your application running on containers in ECS.
What is ECS Container Definition?
ECS Container Definition is inside a Task Definition and it defines the individual containers a task uses.
Container Defintion controls CPU and memory allocation and port mappings
What are ECS Tasks?
ECS Tasks are single running copies of any containers defined by a task definition.
A Task is one working copy of an application
What is an ECS Service component?
An ECS Service component allows task definitions to be scaled by adding tasks.
The service defines minimum and maximum values
What is the ECS Registry?
The ECS Registry is storage for container images
What is AWS Fargate?
Fargate is a serverless compute service and eliminates the need to provision and manage servers.
Fargate works with both ECS and EKS
When would you choose EC2 over Fargate?
You would choose EC2 over Fargate if:
- there are compliance requirements
- you require broader customisations
- if you require GPUs
What is EKS?
EKS is Elastic Kubernetes Service.
Amazon EKS is a managed option for Kubernetes workloads (a popular container orchestration tool) which provides you with all the familiarity of using a Kubernetes environment, with the inherent scalability and availability the cloud provides.
What is Kubernetes?
Kubernetes is an open-source software that lets you deploy and manage containerised applications at scale
How are Containers grouped in EKS?
In EKS Containers are grouped in pods
ECS supports both EC2 and Fargate, does EKS also support both?
Yes, EKS supports both EC2 and Fargate
Why would you use EKS over ECS?
You would use EKS over ECS if you are already using K8s or if you want to migrate your K8s to AWS
What is ECR?
Amazon Elastic Container Registry (Amazon ECR) is an AWS managed container image registry service that is secure, scalable, and reliable.
What is an instance role vs a task role?
An instance role would apply a policy to all tasks within an instance whereas a task role will apply to a single task only
What are the synchronous triggers for Lambda functions?
ALB, Alexa, API Gateway, Cognito, CloudFront, Lex, and Kinesis Data Firehose are all valid direct (synchronous) triggers for Lambda functions.
S3 is one of the valid asynchronous triggers.
What is the difference between Fargate and Lambda?
AWS Lambda charges you per invocation and duration of each invocation whereas AWS Fargate charges you for the vCPU and memory resources of your containerised applications use per second.