SlideShare a Scribd company logo
MAKE NEXT POSSIBLE Ⓡ
Kenzan Providence Hack Nights
October 26th, 2017
Serverless Architectures in Modern
Applications
2
What Are Serverless Architectures?
They are not actually “serverless”...
Instead, serverless architectures remove the need for managing and handling
the servers where the application or services run.
Server management is handled by third parties for you!
3
What Are Serverless Architectures?
They are not actually “serverless”...
Instead, serverless architectures remove the need for managing and handling
the servers where the application or services run.
Server management is handled by third parties for you!
The Benefits of Serverless
Serverless architectures have a lot of upside, not least of which is $$ saved.
No Server Maintenance Flexible Scaling
High Availability No Idle Capacity
Lambda Costs vs EC2: https://www.trek10.com/blog/lambda-cost/
The Current Shortcomings of Serverless
Serverless architectures are still new, and there are some growing pains.
Limited Execution
Duration
Statelessness
Limited Run-Time
Support
Cold Start Time
Logging & Debugging
When Does a Serverless
API Make Sense?
A serverless API is a good choice when you
want low server maintenance and low cost, with
a microservice application of moderate security,
that is not exceptionally sensitive to latency.
How Do Serverless
Architectures Work?
Let’s go over the key components of a serverless
architecture, AWS style.
7
The Overall View
Route 53 is a DNS service that allows you to assign a
custom domain name to your web IP address.
This is an optional piece of the serverless configuration but
is commonly used.
API gateway assigns a default route to your API that can be
used without extra configuration.
We won’t be using this in our example today but it is an
important AWS service to know about.
Route 53
The Resource Router
AWS API Gateway is integral to designing a serverless web
API.
A series of configuration that handling API routing and
Lambda execution. Can be configured with a
swagger.yaml file.
The API Gateway performs a series of tasks:
- Authorizes incoming requests
- Routes incoming requests
- Formats responses into HTTP response format for
consumption by the client
- Handles errors responses from the Lambda functions
AWS API Gateway
The Gatekeeper/Router to the Microservices
Without access to your servers, you must secure your
resources through IAM policies both at the API Gateway
level and the Lambda level.
Many options to secure traffic including:
- JWT tokens
- IP Address
- Headers
- Cookies
API Gateway allows for custom, dynamically generated IAM
policies provided by custom authorizers.
AWS Identity Access Management (IAM)
The Security Around the Gateway
The basic component of Function-as-a-Service (F.a.a.S)
architecture.
Lambdas are the holding place and configuration for code
that will be executed in any one of many servers in the cloud.
Can be configured with unique IAM roles, environment
variables, memory, timeout, and more.
Currently support the following runtime environments :
- Node.js 6.10, Edge Node.js 4.3, Node.js 4.3
- C#
- Java 8
- Python 3.6 & 2.7
AWS Lambda Functions
The Serverless Functions Where the Code is Run
AWS DynamoDB is a No-SQL database that is commonly
paired with serverless frameworks because of it’s similar
benefits :
- Fast & Consistent Performance
- Highly Scalable
- Fully Managed
- Event Driven Programming (Integrates with Lambda
function to process DB events)
- Flexible
- Integrates with IAM for security and access control
We will not be using this in our example today but it is a
good technology to know about.
AWS DynamoDB
The Database Layer
DIY Serverless Framework
Let’s get started building our own serverless web
API!
14
15
Step 1: Download the Repository
This is going to be our client code, server code, and configuration. This is the jumping off point for
our serverless web API.
Repository URL
www.github.com/mschmidt712/serverless-counter
Repository Holder Username: mschmidt712
Repository Name: serverless-counter
16
Step 2: Install Dependencies and Run UI
Here we will get the UI for our application up and running. This is going to be a simple web
application that allows the user to increment and decrement a counter.
Install Dependencies
yarn install or npm install
Run UI
npm start
17
Step 3: Sign in to AWS Console
Immediately, the application is configured to run off of a pre-made serverless backend. Let’s start
the process of building our own to hook up to.
18
Step 4: Create the Lambda Functions
To speed up the process of building the backend, the code for each lambda function is located in the
serverless-counter repository under the server folder
19
Step 5: Create the API Gateway
The suggested route to configure the API gateway is using a swagger.yaml file. For this exercise
we will use the swaggerWithApiGatewayExtensions.yaml file to save some configuration time.
20
Step 6: Configure the API Gateway
As you will see, the API Gateway requires a large amount of configuration. We’ll walk through that
now.
21
Step 7: Deploy Your API
Once the configuration is done your API is ready to deploy!
22
Step 8: Connect Your API to Your Counter
Now that your API is deployed, you will be given a unique url to access it. Copy/Paste this url into the
appConfig.json file in the UI and watch your API go live.
23
Questions?
Resources
Introduction to Serverless Computing with AWS Lambda:
https://www.contino.io/files/Contino-Introduction-to-Serverless-
Computing-with-AWS-Lambda.pdf
Amazon Docs for Lambdas: https://aws.amazon.com/lambda/
Amazon Docs for API Gateway: https://aws.amazon.com/api-
gateway/
Serverless Framework: https://serverless.com/
How to Build a Serverless API with AWS API Gateway (python):
https://www.twilio.com/blog/2017/06/build-serverless-api-
amazon-web-services-api-gateway.html
Serverless Architectures (denser informational blog):
https://martinfowler.com/articles/serverless.html
24
Backup Slides
25
Step 4: Create the Lambda Functions
Uploading the Lambda Code.
26
Step 4: Create the Lambda Functions
Configuring the Lambda function.
27
Step 4: Create the Lambda Functions
Testing the Lambda function after creation.
28
Step 6: Configure the API Gateway
Configuration of the Method Request.
29
Step 6: Configure the API Gateway
Configuration of the Integration Request.
30
Step 6: Configure the API Gateway
Configuration of the Integration Response.
31
Step 6: Configure the API Gateway
Configuration of the Method Response.
32
Step 7: Deploy Your API
Creating the deployment stage for the API.

More Related Content

PPTX
Serverless computing
PDF
What Is Serverless Computing
PDF
Serverless Computing
PPTX
Serverless computing
PDF
Serverless computing
PDF
Serverless computing with AWS Lambda
PDF
Introduction to Serverless
PPTX
Introduction to microservices
Serverless computing
What Is Serverless Computing
Serverless Computing
Serverless computing
Serverless computing
Serverless computing with AWS Lambda
Introduction to Serverless
Introduction to microservices

What's hot (20)

PDF
Api Gateway
PPTX
An introduction to Serverless
PPTX
Virtualization Vs. Containers
PDF
Microservices & API Gateways
PPTX
App Modernisation with Microsoft Azure
PPTX
What is Serverless Computing?
PPTX
Monitor Azure HDInsight with Azure Log Analytics
PPTX
What is AWS?
PPTX
virtualization-vs-containerization-paas
PDF
Microservices Design Patterns | Edureka
PPTX
Serverless Architecture
PPTX
Introducing firebase
PPTX
Azure App Service
PPTX
Top 10 cloud service providers
PPTX
Introduction to Azure Functions
PPTX
Introduction to Amazon Web Services (AWS)
PDF
Cloud Computing - An Introduction
PPTX
Cloud Computing- components, working, pros and cons
PPTX
Chapter 01: A brief introduction to cloud computing
PDF
AWS Serverless Introduction (Lambda)
Api Gateway
An introduction to Serverless
Virtualization Vs. Containers
Microservices & API Gateways
App Modernisation with Microsoft Azure
What is Serverless Computing?
Monitor Azure HDInsight with Azure Log Analytics
What is AWS?
virtualization-vs-containerization-paas
Microservices Design Patterns | Edureka
Serverless Architecture
Introducing firebase
Azure App Service
Top 10 cloud service providers
Introduction to Azure Functions
Introduction to Amazon Web Services (AWS)
Cloud Computing - An Introduction
Cloud Computing- components, working, pros and cons
Chapter 01: A brief introduction to cloud computing
AWS Serverless Introduction (Lambda)
Ad

Similar to Serverless Architecture (13)

PDF
AWS Lambda Documentation
PDF
Serverless Computing, AWS Way: SourceFuse Technologies
PDF
Serverless Computing, AWS Way by SourceFuse Technologies
PPTX
Scheduled Retweets Using AWS Lambda
PPTX
Auto Retweets Using AWS Lambda
PDF
Serverless architectures-with-aws-lambda
PDF
When to use serverless computing.pdf
PDF
Let's set the record straight on the term serverless and what it’s not
PDF
20180111 we bde-bs - serverless url shortener
PDF
AWS re:Invent 2020 Serverless Recap
PPTX
AWS Serverless concepts and solutions
PDF
Jak nie zwariować z architekturą Serverless?
PDF
When to use serverless computing.pdf
AWS Lambda Documentation
Serverless Computing, AWS Way: SourceFuse Technologies
Serverless Computing, AWS Way by SourceFuse Technologies
Scheduled Retweets Using AWS Lambda
Auto Retweets Using AWS Lambda
Serverless architectures-with-aws-lambda
When to use serverless computing.pdf
Let's set the record straight on the term serverless and what it’s not
20180111 we bde-bs - serverless url shortener
AWS re:Invent 2020 Serverless Recap
AWS Serverless concepts and solutions
Jak nie zwariować z architekturą Serverless?
When to use serverless computing.pdf
Ad

Recently uploaded (20)

PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
Big Data Technologies - Introduction.pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
PDF
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
PPTX
MYSQL Presentation for SQL database connectivity
PDF
GamePlan Trading System Review: Professional Trader's Honest Take
PDF
Machine learning based COVID-19 study performance prediction
PDF
[발표본] 너의 과제는 클라우드에 있어_KTDS_김동현_20250524.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
Reach Out and Touch Someone: Haptics and Empathic Computing
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Big Data Technologies - Introduction.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Empathic Computing: Creating Shared Understanding
Network Security Unit 5.pdf for BCA BBA.
Understanding_Digital_Forensics_Presentation.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
Spectral efficient network and resource selection model in 5G networks
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
MYSQL Presentation for SQL database connectivity
GamePlan Trading System Review: Professional Trader's Honest Take
Machine learning based COVID-19 study performance prediction
[발표본] 너의 과제는 클라우드에 있어_KTDS_김동현_20250524.pdf
20250228 LYD VKU AI Blended-Learning.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
Advanced methodologies resolving dimensionality complications for autism neur...
Dropbox Q2 2025 Financial Results & Investor Presentation

Serverless Architecture

  • 1. MAKE NEXT POSSIBLE Ⓡ Kenzan Providence Hack Nights October 26th, 2017 Serverless Architectures in Modern Applications
  • 2. 2 What Are Serverless Architectures? They are not actually “serverless”... Instead, serverless architectures remove the need for managing and handling the servers where the application or services run. Server management is handled by third parties for you!
  • 3. 3 What Are Serverless Architectures? They are not actually “serverless”... Instead, serverless architectures remove the need for managing and handling the servers where the application or services run. Server management is handled by third parties for you!
  • 4. The Benefits of Serverless Serverless architectures have a lot of upside, not least of which is $$ saved. No Server Maintenance Flexible Scaling High Availability No Idle Capacity Lambda Costs vs EC2: https://www.trek10.com/blog/lambda-cost/
  • 5. The Current Shortcomings of Serverless Serverless architectures are still new, and there are some growing pains. Limited Execution Duration Statelessness Limited Run-Time Support Cold Start Time Logging & Debugging
  • 6. When Does a Serverless API Make Sense? A serverless API is a good choice when you want low server maintenance and low cost, with a microservice application of moderate security, that is not exceptionally sensitive to latency.
  • 7. How Do Serverless Architectures Work? Let’s go over the key components of a serverless architecture, AWS style. 7
  • 9. Route 53 is a DNS service that allows you to assign a custom domain name to your web IP address. This is an optional piece of the serverless configuration but is commonly used. API gateway assigns a default route to your API that can be used without extra configuration. We won’t be using this in our example today but it is an important AWS service to know about. Route 53 The Resource Router
  • 10. AWS API Gateway is integral to designing a serverless web API. A series of configuration that handling API routing and Lambda execution. Can be configured with a swagger.yaml file. The API Gateway performs a series of tasks: - Authorizes incoming requests - Routes incoming requests - Formats responses into HTTP response format for consumption by the client - Handles errors responses from the Lambda functions AWS API Gateway The Gatekeeper/Router to the Microservices
  • 11. Without access to your servers, you must secure your resources through IAM policies both at the API Gateway level and the Lambda level. Many options to secure traffic including: - JWT tokens - IP Address - Headers - Cookies API Gateway allows for custom, dynamically generated IAM policies provided by custom authorizers. AWS Identity Access Management (IAM) The Security Around the Gateway
  • 12. The basic component of Function-as-a-Service (F.a.a.S) architecture. Lambdas are the holding place and configuration for code that will be executed in any one of many servers in the cloud. Can be configured with unique IAM roles, environment variables, memory, timeout, and more. Currently support the following runtime environments : - Node.js 6.10, Edge Node.js 4.3, Node.js 4.3 - C# - Java 8 - Python 3.6 & 2.7 AWS Lambda Functions The Serverless Functions Where the Code is Run
  • 13. AWS DynamoDB is a No-SQL database that is commonly paired with serverless frameworks because of it’s similar benefits : - Fast & Consistent Performance - Highly Scalable - Fully Managed - Event Driven Programming (Integrates with Lambda function to process DB events) - Flexible - Integrates with IAM for security and access control We will not be using this in our example today but it is a good technology to know about. AWS DynamoDB The Database Layer
  • 14. DIY Serverless Framework Let’s get started building our own serverless web API! 14
  • 15. 15 Step 1: Download the Repository This is going to be our client code, server code, and configuration. This is the jumping off point for our serverless web API. Repository URL www.github.com/mschmidt712/serverless-counter Repository Holder Username: mschmidt712 Repository Name: serverless-counter
  • 16. 16 Step 2: Install Dependencies and Run UI Here we will get the UI for our application up and running. This is going to be a simple web application that allows the user to increment and decrement a counter. Install Dependencies yarn install or npm install Run UI npm start
  • 17. 17 Step 3: Sign in to AWS Console Immediately, the application is configured to run off of a pre-made serverless backend. Let’s start the process of building our own to hook up to.
  • 18. 18 Step 4: Create the Lambda Functions To speed up the process of building the backend, the code for each lambda function is located in the serverless-counter repository under the server folder
  • 19. 19 Step 5: Create the API Gateway The suggested route to configure the API gateway is using a swagger.yaml file. For this exercise we will use the swaggerWithApiGatewayExtensions.yaml file to save some configuration time.
  • 20. 20 Step 6: Configure the API Gateway As you will see, the API Gateway requires a large amount of configuration. We’ll walk through that now.
  • 21. 21 Step 7: Deploy Your API Once the configuration is done your API is ready to deploy!
  • 22. 22 Step 8: Connect Your API to Your Counter Now that your API is deployed, you will be given a unique url to access it. Copy/Paste this url into the appConfig.json file in the UI and watch your API go live.
  • 23. 23 Questions? Resources Introduction to Serverless Computing with AWS Lambda: https://www.contino.io/files/Contino-Introduction-to-Serverless- Computing-with-AWS-Lambda.pdf Amazon Docs for Lambdas: https://aws.amazon.com/lambda/ Amazon Docs for API Gateway: https://aws.amazon.com/api- gateway/ Serverless Framework: https://serverless.com/ How to Build a Serverless API with AWS API Gateway (python): https://www.twilio.com/blog/2017/06/build-serverless-api- amazon-web-services-api-gateway.html Serverless Architectures (denser informational blog): https://martinfowler.com/articles/serverless.html
  • 25. 25 Step 4: Create the Lambda Functions Uploading the Lambda Code.
  • 26. 26 Step 4: Create the Lambda Functions Configuring the Lambda function.
  • 27. 27 Step 4: Create the Lambda Functions Testing the Lambda function after creation.
  • 28. 28 Step 6: Configure the API Gateway Configuration of the Method Request.
  • 29. 29 Step 6: Configure the API Gateway Configuration of the Integration Request.
  • 30. 30 Step 6: Configure the API Gateway Configuration of the Integration Response.
  • 31. 31 Step 6: Configure the API Gateway Configuration of the Method Response.
  • 32. 32 Step 7: Deploy Your API Creating the deployment stage for the API.