Serverless Overview Flashcards

1
Q

What AWS services are serverless?

A
  • AWS Lambda & Step Functions
  • DynamoDB
  • AWS Cognito
  • AWS API Gateway
  • Amazon S3
  • AWS SNS & SQS
  • AWS Kinesis
  • Aurora Serverless
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Pricing on AWS Lambda?

A
  • Pay per request and compute time

• $0.20 per 1 million requests thereafter ($0.0000002 per request)

  • 400,000 GB-seconds of compute time per month if FREE • == 400,000 seconds if function is 1GB RAM
  • == 3,200,000 seconds if function is 128 MB RAM
  • After that $1.00 for 600,000 GB-seconds

• Free tier of 1,000,000 AWS Lambda requests and 400,000 GBs of compute time

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

Lambda Timeout

A

Default 3 seconds, max 300s (5minutes) (new limit 15 minutes) Exam expects 5 minutes

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

Lambda - Security - This must be attached to the Lambda function

A

IAM execution role

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

Lambda - Disk capacity?

A

512 MB

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

Lambda - Concurrency limits

A

1000

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

Lambda - Deployment - Max Lambda function deployment size

A

50MB

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

Lambda - Size of uncompressed deployment (code + dependencies)

A

150MB

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

Lambda - Can use __ directory to load other files at startup

A

/tmp

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

Lambda - Size of environment variables

A

4KB

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

DynamoDB - Is what kind of DB?

A

NoSQL database - not a relational database

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

DynamoDB is made of __?

A

tables

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

Each DynamoDB has a ___?

A

Primary key

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

Each DynamoDB item has ___?

A

Attributes (can be added over time – can be null)

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

max size of a DDB item?

A

400KB

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

What data types are supported in DDB?

A
  • Scalar Types: String, Number, Binary, Boolean, Null
  • DocumentTypes:List,Map
  • Set Types: String Set, Number Set, Binary Set
17
Q

DDB If burst credit are empty, you’ll get a __?

A

“ProvisionedThroughputException”.

18
Q

Explain DDB Dax

A
  • DAX = DynamoDB Accelerator

* Seamless cache for DynamoDB, no application re- write

19
Q

What does DDB DAX solve?

A
  • Solves the Hot Key problem (too many reads)

* 5 minutes TTL for cache by default

20
Q

Explain DDB Streams

A
  • Changes in DynamoDB (Create, Update, Delete) can end up in a DynamoDB Stream
  • This stream can be read by AWS Lambda, and we can then do:
  • React to changes in real time (welcome email to new users)
  • Analytics
21
Q

List some features of API Gateway

A
  • Handle API versioning (v1, v2…)
  • Handle different environments (dev, test, prod…)
  • Handle security (Authentication and Authorization)
  • Create API keys, handle request throttling
  • Swagger / Open API import to quickly define APIs • Transform and validate requests and responses
  • Generate SDK and API specifications
  • Cache API responses
22
Q

API Gateway – Security - IAM Permissions

A
  • Create an IAM policy authorization and attach to User / Role
  • API Gateway verifies IAM permissions passed by the calling application
  • Good to provide access within your own infrastructure
  • Leverages “Sig v4” capability where IAM credential are in headers IAM
23
Q
Explain API Gateway – Security
Lambda Authorizer (formerly Custom Authorizers)
A
  • Uses AWS Lambda to validate the token in header being passed • Option to cache result of authentication
  • Helps to use OAuth / SAML / 3rd party type of authentication
  • Lambda must return an IAM policy for the user
24
Q

Explain API Gateway – Security Cognito User Pools

A
  • Cognito fully manages user lifecycle
  • API gateway verifies identity automatically from AWS Cognito • No custom implementation required
  • Cognito only helps with authentication, not authorization
25
Q

What’s Cognito User Pools:

A
  • Sign in functionality for app users
  • Integrate with API Gateway
  • Create a serverless database of user for your mobile apps
  • Simple login: Username (or email) / password combination
  • Possibility to verify emails / phone numbers and add MFA
  • Can enable Federated Identities (Facebook, Google, SAML…)
26
Q

Explain Cognito Identity Pools (Federated Identity):

A
  • Provide AWS credentials to users so they can access AWS resources directly
  • Integrate with Cognito User Pools as an identity provider

• Goal:
• Provide direct access to AWS Resources
from the Client Side • How:
• Log in to federated identity provider – or remain anonymous
• Get temporary AWS credentials back from the Federated Identity Pool
• These credentials come with a pre-defined IAM policy stating their permissions
• Example:
• provide (temporary) access to write to S3 bucket using Facebook Login

27
Q

Cognito User Pools Send back what ?

A

JSON Web Tokens

28
Q

Cognito User Pools can integrate with API Gateway for authentication?

A

True