Slide 1

Slide 1 text

April 6th, 2024

Slide 2

Slide 2 text

Choosing the right architecture for your Serverless API Jones Zachariah Noel N Senior Developer Advocate @ Freshworks | AWS Serverless Hero

Slide 3

Slide 3 text

About Me https://zachjonesnoel.com 👋 I’m Jones Zachariah Noel N (zachjonesnoel) 🥑 Senior Developer Advocate @ Freshworks ☁ AWS Serverless Hero ⚡ Serverless architect 🚀 AWS UG Bengaluru co-organizer 󰞵 Runs newsletter / blog on The Serverless Terminal ▶ Co-run The Zacs’ Show Talking AWS podcast

Slide 4

Slide 4 text

COMMUNITY DAY Mumbai What we will look into Look into API workloads Factors to consider while choosing API service API Gateway, AppSync, Lambda Function URLs ⚡ ⚡ ⚡

Slide 5

Slide 5 text

Front-end / integration systems Backend system APIs GIF from Tenor

Slide 6

Slide 6 text

COMMUNITY DAY Mumbai

Slide 7

Slide 7 text

COMMUNITY DAY Mumbai What are the API workloads Web and mobile backend APIs Integration systems Real-time systems Icons from Flaticon

Slide 8

Slide 8 text

COMMUNITY DAY Mumbai Serverless API Services on AWS Icons from AWS Service Icons Amazon API Gateway AWS AppSync AWS Lambda function URLs Application Load Balancers

Slide 9

Slide 9 text

COMMUNITY DAY Mumbai API consideration - API Type RESTful APIs GraphQL Icons from Flaticon Websockets

Slide 10

Slide 10 text

COMMUNITY DAY Mumbai API consideration - API response Synchronous API Asynchronous API Icons from Flaticon

Slide 11

Slide 11 text

COMMUNITY DAY Mumbai API consideration - Cache support Supports cached responses Freshness validated request/response Icons from Flaticon

Slide 12

Slide 12 text

COMMUNITY DAY Mumbai API consideration - Authorization Identity and Access Management (IAM) API Keys Icons from Flaticon Custom authorizers - Lambda, Cognito, Identity providers

Slide 13

Slide 13 text

COMMUNITY DAY Mumbai API consideration - Response structure Defined Models, Schemas Streaming data Icons from Flaticon

Slide 14

Slide 14 text

COMMUNITY DAY Mumbai API consideration - Supported content-types Standard - application/json, application/xml, text/html and more Custom content-types / binary data Icons from Flaticon

Slide 15

Slide 15 text

COMMUNITY DAY Mumbai API consideration - API Interactions Unidirectional API interactions with request/response Bidirectional API interactions with request/response Icons from Flaticon

Slide 16

Slide 16 text

COMMUNITY DAY Mumbai AWS API Gateway Supports different destinations with VTL resolvers

Slide 17

Slide 17 text

COMMUNITY DAY Mumbai Choosing Amazon API Gateway Protocol HTTPs, WebSocket API Type RESTful, WebSocket Security API keys, IAM, Cognito, Custom authorizers Caching Various caching options available Offline capability N/A Integration type REST APIs, Lambda functions, selective AWS Services API operation CRUD with HTTP methods Direct integration with AWS services with transformation Mapping request and response templates Throttling and rate-limits Granular control with usage plans

Slide 18

Slide 18 text

COMMUNITY DAY Mumbai

Slide 19

Slide 19 text

COMMUNITY DAY Mumbai

Slide 20

Slide 20 text

COMMUNITY DAY Mumbai AWS AppSync Supports different destinations with VTL and JavaScript resolvers

Slide 21

Slide 21 text

COMMUNITY DAY Mumbai Choosing AWS AppSync Protocol HTTPs, WebSocket API Type GraphQL Security API keys, IAM, Cognito Caching Simple caching option available Offline capability Supported with AppSync resolvers and SDK Integration type Data Sources - REST APIs, Lambda functions, AWS Services API operation GraphQL operations - Query, Mutation and Subscription Direct integration with AWS services with transformation AppSync resolvers with VTL and JS runtime - both unit resolvers and pipeline resolvers Throttling and rate-limits Limited throttling options for the APIs

Slide 22

Slide 22 text

COMMUNITY DAY Mumbai

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

COMMUNITY DAY Mumbai Choosing AWS Lambda function URLs Protocol HTTPs API Type RESTful in nature Security IAM roles Caching N/A Offline capability N/A Integration type Lambda function based integrations API operation Defined by Lambda function Direct integration with AWS services with transformation N/A Throttling and rate-limits N/A

Slide 25

Slide 25 text

COMMUNITY DAY Mumbai

Slide 26

Slide 26 text

COMMUNITY DAY Mumbai In a SaaS product, APIs to interact with different resources to perform different CRUD operations authenticated with an API key associated with user/customer Amazon API Gateway

Slide 27

Slide 27 text

COMMUNITY DAY Mumbai In a Serverless quiz application, that is used for real-time scoring and leaderboard generation for max 1000 for users concurrently AWS AppSync

Slide 28

Slide 28 text

COMMUNITY DAY Mumbai API for mobile application that has to interact with backend and get real-time updates of IoT devices if they are up and running or any alerts AWS AppSync

Slide 29

Slide 29 text

COMMUNITY DAY Mumbai A Public API that is interacting with Lambda function to generate dynamic data and return them in different bits and chunks. AWS Lambda function URL

Slide 30

Slide 30 text

AWS Service Amazon API Gateway AWS AppSync AWS Lambda Function URL Protocol HTTPs, WebSocket HTTPs, WebSocket HTTPs API Type RESTful, WebSocket GraphQL RESTful in nature Security API keys, IAM, Cognito, Custom authorizers API keys, IAM, Cognito IAM roles Caching Various caching options available Simple caching option available - Offline capability - Supported with AppSync resolvers and SDK - Integration type REST APIs, Lambda functions, selective AWS Services Data Sources - REST APIs, Lambda functions, AWS Services Lambda function based integrations API operation CRUD with HTTP methods GraphQL operations - Query, Mutation and Subscription Defined by Lambda function Direct integration with AWS services with transformation Mapping request and response templates AppSync resolvers with VTL and JS runtime - both unit resolvers and pipeline resolvers - Throttling and rate-limits Granular control with usage plans Limited throttling options for the APIs -

Slide 31

Slide 31 text

Thank You Jones Zachariah Noel N Senior Developer Advocate @ Freshworks AWS Serverless Hero https://zachjonesnoel.com

Slide 32

Slide 32 text

COMMUNITY DAY Mumbai