Serverless Flashcards

1
Q

What does serverless mean?

What is the max
execution time for a lambda function?

How does scaling work for Lambda functions?

A

It means that you don’t provision or see servers.

15min

It is automated.

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

How does pricing work for lambda?

What do you get in the free tier of Lambda?

How much ram can you get per function?

How can you improve CPU and Network on in Lambda?

A

You pay per request and compute time.

1MM Requests and 400,000 GB of compute time. That means 400,000 seconds of compute time if the function has 1GB of ram. Or 40,000 seconds if the function has 10GB.

Up to 10gb.

By increasing the RAM.

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

What languages are supported on Lambda?

What type of image should be run on Lambda?

A

There are a lot of languages nativly supported on Lambda like Java, C#, Python etc. You can also run any language by using the custom runtime API

Images that implement the Lambda runtime API other standard docker images should be run on ECS/Fargate

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

How can you run a lambda function as a cron job?

Where are logs automatically stored?

A

You can configure an rule in CloudWatch Events bridge to trigger every hour and this would kick off the lambda function.

In cloudwatch.

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

What is the maximum memory allocation for a lambda function?

What is the max execution time for Lambda.

How much space is allocated for environment variables?

What is the max disk capacity for a lambda function?

How many concurrent executions do you get out of the box with Lambda? And how can this be increased?

A

10gb

900s (15 min)

4kb

512mb

1000, but you can request more

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

What is the max compressed deployment size for lambda

What is the max ucompressed deployment size for lambda?

What should you do if you need space for additional files?

A

50mb

250mb

Use the /tmp space

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

What is lambda at edge?

At what points can lambda at edge modify CloudFront requests/responses?

A

Whenever you need to integrate a lambda function with your cloudfront distribution.

It allows you to deploy lambda instances along side your CloudFront to modify reqeusts at the following points
viewer request
origin request
origin response
viewer response
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are some of the ways that Lambda@Edge can be used?

A
Website security and privacy
Dynamic web application at edge
SEO
Intelligently rout across origins and data centers
Bot Mitigation at the Ede
Real time image transformation
A/B testing
User authentication and auth
User prioritization
User tracking an analytics
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is provisioned mode from Dynamo DB?

A

You can specify the number of reads/writes per second
You need to plan capacity before hand
Pay for provisioned read capacity units (RCU) and write capacity units (WCU)
Its possible to add auto-scaling mode from RCU and WCU

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

What is On-Demand Mode for DynamoDB?

A
More expensive than provisioned mode
Read/Writes automatically scale up/down with your workloads
No capacity planning needed
Pay for what you use
Great for unpredictable workloads
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is DAX?

What is the TTL for DAX?

A

Dynamo DB Accellerator is used for caching Dynamo DB DB. It sits on type of dynamo db tables to help return faster results (Microseconds)

5 min

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

What is DnyamoDB Stream?

What can you do with these steams?

What is the retention time for this stream?

A

It is an Orderd stream of item level modifications (create update delete) in a table

Send them to Kinesis Data Streams
Read by Kinesis Client Library
Read with AWS Lambda

24h

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

What are some use-cases for DynamoDB streams?

A
React to changes in real time (ex send a welcome email)
Analytics
Insert into derived tables
Insert into ElasticSearch
Implement Cross Region replication
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are DynamoDB Global tables?

What is the pre-requisite for Global tables?

A

Global tables will write to tables across regions. This is active-active replication. Applications can read and write to tables in any region.

You must enable DynamoDB streams

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

How can you keep the size of dynamo DB tables small or remove data after some time period.

How can you search on items other than the primary key in DynamoDB?

How does dynamo DB provide consistency when writing to multiple tables?

A

By using dynamo DB TTL

By using a secondary index.

This is provided via Transactions.

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

What does an API gateway do?

A

Provides an http endpoint that proxies requests to a lambda function (think Zuul)

17
Q

What are some of the features of the API Gateway?

A

Handles API versioning
Handles different environments
Handles security (Authentication and authorization)
Creates API Keys, handles request throttling
Swagger/Open API import to quickly define APIs
Generate SDK and API specifications
Transform and validate requests and responses
Cache API responses
Rate control

18
Q

How does the API gateway handle streaming?

A

Via the websocket protocol

19
Q

What does an API gateway integrate with?

A

Lambda functions - invoke a lambda function. Provides an easy way to envoke a rest API backed by a lambda function

HTTP - This can sit in front of an internal on-prem AI or an application load balancer to provide rate limiting caching, user authentication, API keys, etc.

Any AWS service - Like a step function of SQS, this would allow you to add authentication or rate control.

20
Q

What are the 3 types of API gateway endpoints?

A

Edge Optimized - For global clients, requests are routed through the CloudFront Edge locations to improve latency, but the API gateway still only lives on one region.

Regional - For clients within the same region. Publicly available endpoints without any preconfigured CDN in front of them. you could manually combine with CloudFront to provide more control over the caching strategies and the distribution.

Private - Can only be accessed from your VPC using an interface VPC (ENI). Use a resource policy to define access.