SlideShare une entreprise Scribd logo
1  sur  32
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.

Contenu connexe

Tendances

Serverless Computing
Serverless Computing Serverless Computing
Serverless Computing Rushi Namani
 
Serverless Computing: build and run applications without thinking about servers
Serverless Computing: build and run applications without thinking about serversServerless Computing: build and run applications without thinking about servers
Serverless Computing: build and run applications without thinking about serversAmazon Web Services
 
Introduction to Amazon Web Services by i2k2 Networks
Introduction to Amazon Web Services by i2k2 NetworksIntroduction to Amazon Web Services by i2k2 Networks
Introduction to Amazon Web Services by i2k2 Networksi2k2 Networks (P) Ltd.
 
Introduction to AWS Lambda and Serverless Applications
Introduction to AWS Lambda and Serverless ApplicationsIntroduction to AWS Lambda and Serverless Applications
Introduction to AWS Lambda and Serverless ApplicationsAmazon Web Services
 
Cloud Computing and Amazon Web Services
Cloud Computing and Amazon Web ServicesCloud Computing and Amazon Web Services
Cloud Computing and Amazon Web ServicesAditya Jha
 
Getting Started with Serverless Architectures with Microservices_AWSPSSummit_...
Getting Started with Serverless Architectures with Microservices_AWSPSSummit_...Getting Started with Serverless Architectures with Microservices_AWSPSSummit_...
Getting Started with Serverless Architectures with Microservices_AWSPSSummit_...Amazon Web Services
 
Elastic Load Balancing Deep Dive - AWS Online Tech Talk
Elastic  Load Balancing Deep Dive - AWS Online Tech TalkElastic  Load Balancing Deep Dive - AWS Online Tech Talk
Elastic Load Balancing Deep Dive - AWS Online Tech TalkAmazon Web Services
 
An introduction to Serverless
An introduction to ServerlessAn introduction to Serverless
An introduction to ServerlessAdrien Blind
 
AWS Serverless Introduction (Lambda)
AWS Serverless Introduction (Lambda)AWS Serverless Introduction (Lambda)
AWS Serverless Introduction (Lambda)Ashish Kushwaha
 
AWS Lambda and the Serverless Cloud
AWS Lambda and the Serverless CloudAWS Lambda and the Serverless Cloud
AWS Lambda and the Serverless CloudAmazon Web Services
 

Tendances (20)

AWS Lambda
AWS LambdaAWS Lambda
AWS Lambda
 
Serverless Computing
Serverless Computing Serverless Computing
Serverless Computing
 
Serverless Computing: build and run applications without thinking about servers
Serverless Computing: build and run applications without thinking about serversServerless Computing: build and run applications without thinking about servers
Serverless Computing: build and run applications without thinking about servers
 
Serverless computing
Serverless computingServerless computing
Serverless computing
 
Introduction to Amazon Web Services by i2k2 Networks
Introduction to Amazon Web Services by i2k2 NetworksIntroduction to Amazon Web Services by i2k2 Networks
Introduction to Amazon Web Services by i2k2 Networks
 
What is AWS?
What is AWS?What is AWS?
What is AWS?
 
Serverless Architecture
Serverless ArchitectureServerless Architecture
Serverless Architecture
 
Introduction to AWS Lambda and Serverless Applications
Introduction to AWS Lambda and Serverless ApplicationsIntroduction to AWS Lambda and Serverless Applications
Introduction to AWS Lambda and Serverless Applications
 
Cloud Computing and Amazon Web Services
Cloud Computing and Amazon Web ServicesCloud Computing and Amazon Web Services
Cloud Computing and Amazon Web Services
 
Getting Started with Serverless Architectures with Microservices_AWSPSSummit_...
Getting Started with Serverless Architectures with Microservices_AWSPSSummit_...Getting Started with Serverless Architectures with Microservices_AWSPSSummit_...
Getting Started with Serverless Architectures with Microservices_AWSPSSummit_...
 
AWS Lambda
AWS LambdaAWS Lambda
AWS Lambda
 
Deep Dive on AWS Lambda
Deep Dive on AWS LambdaDeep Dive on AWS Lambda
Deep Dive on AWS Lambda
 
Intro to AWS Lambda
Intro to AWS Lambda Intro to AWS Lambda
Intro to AWS Lambda
 
Introduction to Serverless
Introduction to ServerlessIntroduction to Serverless
Introduction to Serverless
 
Elastic Load Balancing Deep Dive - AWS Online Tech Talk
Elastic  Load Balancing Deep Dive - AWS Online Tech TalkElastic  Load Balancing Deep Dive - AWS Online Tech Talk
Elastic Load Balancing Deep Dive - AWS Online Tech Talk
 
An introduction to Serverless
An introduction to ServerlessAn introduction to Serverless
An introduction to Serverless
 
AWS Serverless Introduction (Lambda)
AWS Serverless Introduction (Lambda)AWS Serverless Introduction (Lambda)
AWS Serverless Introduction (Lambda)
 
AWS Lambda
AWS LambdaAWS Lambda
AWS Lambda
 
AWS Lambda Features and Uses
AWS Lambda Features and UsesAWS Lambda Features and Uses
AWS Lambda Features and Uses
 
AWS Lambda and the Serverless Cloud
AWS Lambda and the Serverless CloudAWS Lambda and the Serverless Cloud
AWS Lambda and the Serverless Cloud
 

Similaire à Serverless Architecture

Primeros pasos con arquitecturas serverless
Primeros pasos con arquitecturas serverlessPrimeros pasos con arquitecturas serverless
Primeros pasos con arquitecturas serverlessAmazon Web Services
 
AWS Lambda Documentation
AWS Lambda DocumentationAWS Lambda Documentation
AWS Lambda DocumentationWhizlabs
 
Raleigh DevDay 2017: Building serverless web applications
Raleigh DevDay 2017: Building serverless web applicationsRaleigh DevDay 2017: Building serverless web applications
Raleigh DevDay 2017: Building serverless web applicationsAmazon Web Services
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesAmazon Web Services
 
Serverless Computing, AWS Way by SourceFuse Technologies
Serverless Computing, AWS Way by SourceFuse Technologies Serverless Computing, AWS Way by SourceFuse Technologies
Serverless Computing, AWS Way by SourceFuse Technologies SourceFuse
 
Serverless Computing, AWS Way: SourceFuse Technologies
Serverless Computing, AWS Way: SourceFuse Technologies Serverless Computing, AWS Way: SourceFuse Technologies
Serverless Computing, AWS Way: SourceFuse Technologies Sarmishtha Sinha
 
Scheduled Retweets Using AWS Lambda
Scheduled Retweets Using AWS LambdaScheduled Retweets Using AWS Lambda
Scheduled Retweets Using AWS LambdaSrushith Repakula
 
Getting Started with Serverless Architectures - August 2016 Monthly Webinar S...
Getting Started with Serverless Architectures - August 2016 Monthly Webinar S...Getting Started with Serverless Architectures - August 2016 Monthly Webinar S...
Getting Started with Serverless Architectures - August 2016 Monthly Webinar S...Amazon Web Services
 
Serverless architectures-with-aws-lambda
Serverless architectures-with-aws-lambdaServerless architectures-with-aws-lambda
Serverless architectures-with-aws-lambdasaifam
 
Serverless Development Deep Dive
Serverless Development Deep DiveServerless Development Deep Dive
Serverless Development Deep DiveAmazon Web Services
 
SRV203 Getting Started with AWS Lambda and the Serverless Cloud
SRV203 Getting Started with AWS Lambda and the Serverless CloudSRV203 Getting Started with AWS Lambda and the Serverless Cloud
SRV203 Getting Started with AWS Lambda and the Serverless CloudAmazon Web Services
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesAmazon Web Services
 
AWS March 2016 Webinar Series Getting Started with Serverless Architectures
AWS March 2016 Webinar Series   Getting Started with Serverless ArchitecturesAWS March 2016 Webinar Series   Getting Started with Serverless Architectures
AWS March 2016 Webinar Series Getting Started with Serverless ArchitecturesAmazon Web Services
 
SMC305 Building CI/CD Pipelines for Serverless Applications
SMC305 Building CI/CD Pipelines for Serverless ApplicationsSMC305 Building CI/CD Pipelines for Serverless Applications
SMC305 Building CI/CD Pipelines for Serverless ApplicationsAmazon Web Services
 
When to use serverless computing.pdf
When to use serverless computing.pdfWhen to use serverless computing.pdf
When to use serverless computing.pdfSGBSeo
 
Let's set the record straight on the term serverless and what it’s not
Let's set the record straight on the term serverless and what it’s notLet's set the record straight on the term serverless and what it’s not
Let's set the record straight on the term serverless and what it’s notJeshan Babooa
 
20180111 we bde-bs - serverless url shortener
20180111   we bde-bs - serverless url shortener20180111   we bde-bs - serverless url shortener
20180111 we bde-bs - serverless url shortenerLuca Bianchi
 

Similaire à Serverless Architecture (20)

Primeros pasos con arquitecturas serverless
Primeros pasos con arquitecturas serverlessPrimeros pasos con arquitecturas serverless
Primeros pasos con arquitecturas serverless
 
AWS Lambda Documentation
AWS Lambda DocumentationAWS Lambda Documentation
AWS Lambda Documentation
 
AWS Serverless Development
AWS Serverless DevelopmentAWS Serverless Development
AWS Serverless Development
 
Raleigh DevDay 2017: Building serverless web applications
Raleigh DevDay 2017: Building serverless web applicationsRaleigh DevDay 2017: Building serverless web applications
Raleigh DevDay 2017: Building serverless web applications
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless Architectures
 
Serverless Computing, AWS Way by SourceFuse Technologies
Serverless Computing, AWS Way by SourceFuse Technologies Serverless Computing, AWS Way by SourceFuse Technologies
Serverless Computing, AWS Way by SourceFuse Technologies
 
Serverless Computing, AWS Way: SourceFuse Technologies
Serverless Computing, AWS Way: SourceFuse Technologies Serverless Computing, AWS Way: SourceFuse Technologies
Serverless Computing, AWS Way: SourceFuse Technologies
 
Auto Retweets Using AWS Lambda
Auto Retweets Using AWS LambdaAuto Retweets Using AWS Lambda
Auto Retweets Using AWS Lambda
 
Scheduled Retweets Using AWS Lambda
Scheduled Retweets Using AWS LambdaScheduled Retweets Using AWS Lambda
Scheduled Retweets Using AWS Lambda
 
Getting Started with Serverless Architectures - August 2016 Monthly Webinar S...
Getting Started with Serverless Architectures - August 2016 Monthly Webinar S...Getting Started with Serverless Architectures - August 2016 Monthly Webinar S...
Getting Started with Serverless Architectures - August 2016 Monthly Webinar S...
 
Serverless architectures-with-aws-lambda
Serverless architectures-with-aws-lambdaServerless architectures-with-aws-lambda
Serverless architectures-with-aws-lambda
 
Serverless Development Deep Dive
Serverless Development Deep DiveServerless Development Deep Dive
Serverless Development Deep Dive
 
SRV203 Getting Started with AWS Lambda and the Serverless Cloud
SRV203 Getting Started with AWS Lambda and the Serverless CloudSRV203 Getting Started with AWS Lambda and the Serverless Cloud
SRV203 Getting Started with AWS Lambda and the Serverless Cloud
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless Architectures
 
AWS March 2016 Webinar Series Getting Started with Serverless Architectures
AWS March 2016 Webinar Series   Getting Started with Serverless ArchitecturesAWS March 2016 Webinar Series   Getting Started with Serverless Architectures
AWS March 2016 Webinar Series Getting Started with Serverless Architectures
 
SMC305 Building CI/CD Pipelines for Serverless Applications
SMC305 Building CI/CD Pipelines for Serverless ApplicationsSMC305 Building CI/CD Pipelines for Serverless Applications
SMC305 Building CI/CD Pipelines for Serverless Applications
 
When to use serverless computing.pdf
When to use serverless computing.pdfWhen to use serverless computing.pdf
When to use serverless computing.pdf
 
Let's set the record straight on the term serverless and what it’s not
Let's set the record straight on the term serverless and what it’s notLet's set the record straight on the term serverless and what it’s not
Let's set the record straight on the term serverless and what it’s not
 
20180111 we bde-bs - serverless url shortener
20180111   we bde-bs - serverless url shortener20180111   we bde-bs - serverless url shortener
20180111 we bde-bs - serverless url shortener
 
Serverless: State Of the Union
Serverless: State Of the UnionServerless: State Of the Union
Serverless: State Of the Union
 

Dernier

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 

Dernier (20)

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 

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.