Serverless Overview Flashcards
What is Cognito?
An aws server for simplified user authentication and management for web and mobile applications.
It allows developers to add user sign-up, sign-in, and access control to their apps.
It uses token exchanges to validate users.
What are noSQL databases for?
For data that doesn’t have a specific structure.
What is API Gateway?
A service for creating and using APIs. Great for accessing data from the front end like a webserver to the aws backend services like lambda, S3 or any database service like dynamodb.
Why use lambda compared to EC2?
In EC2 resources run coninuously. In Lambda you only pay for the time lambda funcions are in use. Lambda functions are called, then start and stop. Once stopped you don’t pay for anything until the function is called again.
What do you pay for in lambda?
Pay per request and compute time
How does API Gateway interact with lambda?
It calls lambda functions, from a web app for example.
How can lambda integrate with event bridge?
With eventbridge you can schedule events recurrently, for example every 1 hour. With this event you can trigger a lambda function.
This way you can do a million things. It’s similar to using CRON, but serverless.
What is Memory for a lambda function?
The power you give to a lambda function in memory, network and cpu is represented by what you configure for the function in the memory field. If you provision more memory your lambda function will run faster, but you will get billed more.
How can you prevent a lambda function from running too long and cost you unwanted money?
With a timeout configured at the function.
What is the limit in storage for a lambda function?
10Gb in a temp folder in the function
What is lambda snapstart?
Only for java 11, lambda preinitializes the function so it runs up to 10 times faster.
What is cloudfront functions and lambda@edge?
A lambda code that you attach to cloudfront distributions.
Runs close to your users to minimize latency.
They are used to manipulate the code of the website that is presented by cloudfront to the users in a specific region.
What do you need to know regarding lambda and VPC?
You need to enable access to a VPC in lambda function creation, because by default lambda runs on the aws VPC and doesn’t have access to your resources.
What is recommended to do when running lambda functions against an RDS database?
To use an RDS proxy. And give access to lambda function to your private VPC, because RDS proxy is NEVER public.
If lambda functions directly access your database, they may open too many connections introducting high load and potencial issues to your database.
With an RDS Proxy you keep your database unaffected.
What are the distinguishing characteristics of dynamodb?
multi az HA.
It’s non relational
It’s cloud native (aws propietary) so it’s fully managed
Scales massively
fast and consistent performance (single digit ms)
No maintenance, always available.
How do you create a DynamoDB database?
Yo dont create it, it’s already there. You just create tables for data.
What is dynamoDB made of?
Tables.