Skip to the content.

AWS Serverless

This is not an exhaustive documentation of all the existing AWS Services. These are summarized notes for the AWS Certifications.
To see the complete documentation, please go to: AWS documentation

What is Serverless

A serverless architecture is a way to build and run applications and services without having to manage infrastructure. Your application still runs on servers, but all the server management is done by the cloud provider.

Serverless in AWS

AWS Lambda

AWS Lambda is a serverless, event-driven compute service that lets you run code for virtually any type of application or backend service without provisioning or managing servers.

Benefits

Supported Languages

AWS Lambda Integrations

Main ones:

Back to the top

AWS Lambda Pricing

Reference: https://aws.amazon.com/lambda/pricing/

AWS Lambda Limits - per region

Execution

Deployment

AWS Lambda Configuration

Configuration Description
Timeout default 3s, max of 300s
Environment variables variables that can be used by the function
Allocated Memory 128MB, up to 3GB
VPC Lambda function can be attached to a VPC + security groups
IAM Execution Role IAM Role used by the function

Back to the top

Concurrency

Throttling

Retries and Dead Letter Queue (DLQ)

Back to the top

Monitoring and Tracing

CloudWatch

X-ray

Best Practices

Back to the top

AWS Lambda@Edge

Used for running global Lambda functions alongside edge locations (for CDN for example)

Changing CLoudFront requests and responses

Use cases

Back to the top

Amazon DynamoDB

Amazon DynamoDB is a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability.

How DynamoDB works

Supported data types

Provisioned Throughput

Back to the top

DynamoDB DAX - DynamoDB Accelerator

|| |-|

Back to the top

DynamoDB Streams

Concurrency

|| |-|

Back to the top

Throttling

Basic APIs

DeleteItem

DeleteTable

BatchWriteItem

GetItem

BatchGetItem

Query

Scan

Back to the top

Consistency Model

Eventually Consistent Read

|| |-|

Back to the top

Primary Keys

Option 1: Partition key only (HASH)

|| |-|

Option 2: Partition key + Sort key

|| |-|

Back to the top

New Features

Transactions

On-demand

Other Features

Security

Backup and restore

Global tables

Replication

Migration

Back to the top

Amazon API Gateway

Amazon API Gateway is an AWS service for creating, publishing, maintaining, monitoring, and securing REST, HTTP, and WebSocket APIs at any scale.

Integrations

|| |-|

Outside of VPC

Inside of VPC

Back to the top

Mapping Templates

Deployment Stages

Stage variables

|| |-|

Back to the top

Canary Deployment

Caching API Responses

|| |-|

Back to the top

Endpoint Types

Edge-Optimized (default)

Regional

Private

Logging, Monitoring, Tracing

CloudWatch Logs

CloudWatch Metrics

X-ray

Back to the top

API Gateway - Cross-Origin Resource Sharing

Limit customer usage

Usage Plans

API Keys

Back to the top

Security

IAM

|| |-|

Back to the top

Lambda Authorizer (Custom Authorizer)

|| |-|

Back to the top

Cognito User Pools

|| |-|

Back to the top

AWS Cognito

Cognito is used for giving users an identity to be able to communicate with a system.

Cognito User Pools:

Cognito Identity Pool (Federated Identity):

Cognito Sync:

AWS Cognito User Pools

|| |-|

AWS Cognito Federated Identity Pools

|| |-|

AWS Cognito Sync - Deprecated

Back to the top

AWS SAM - Serverless Application Model

It is framework for developing and deploying serverless applications in AWS.

Here’s an example of a basic serverless application. This application processes requests to get all items from a database through an HTTP request.

It consists of the following parts:

This application’s infrastructure code can be defined in the following AWS SAM template:

AWSTemplateFormatVersion: 2010-09-09
Transform: AWS::Serverless-2016-10-31
Resources:
  getAllItemsFunction:
    Type: AWS::Serverless::Function
    Properties:
      Handler: src/get-all-items.getAllItemsHandler
      Runtime: nodejs12.x
      Events:
        Api:
          Type: HttpApi
          Properties:
            Path: /
            Method: GET
    Connectors:
      MyConn:
        Properties:
        Destination:
          Id: SampleTable
          Permissions:
            - Read
  SampleTable:
    Type: AWS::Serverless::SimpleTable  

To learn more, please see What is the AWS Serverless Application Model (AWS SAM)?

Back to the top

Serverless Architecture

Mobile App: MyTodoList

|| |-|

Mobile App: REST API Layer

|| |-|

Mobile App: Giving users access to S3

|| |-|

Mobile App: High-read Throughput, Static data

|| |-|

Mobile App: Caching at the API Gateway

|| |-|

Website: MyBlog.com

|| |-|

Back to the top