SlideShare uma empresa Scribd logo
1 de 27
© 2015, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Presenter: Vyom Nagrani, Sr. Product Manager, AWS Lambda
Q&A Moderator: Stefano Buliani, Sr. Product Manager, Amazon API Gateway
Q&A Moderator: Aaron Kao, Sr. Product Marketing Manager, Microservices
December 10th, 2015
Build Mobile Backends with
AWS Lambda and Amazon
API Gateway
Amazon API Gateway: A fully managed service for
running APIs at scale
 Build, Deploy, and Manage APIs
 Throttling rules per HTTP method
 Cache with customizable keys
 Multiple API versions and stages
 Generate client SDKs
 Dashboard for visual monitoring
 Flexible authorization model
 API Keys for 3rd party developers
Benefits of API Gateway for building mobile backends
Low cost and
efficient
Performance at
any scale
Easily monitor
API activity
Streamline API
development
Flexible security
controls
Create RESTful
Endpoints
AWS Lambda: A compute service that runs your code
in response to events
Lambda functions: Stateless, trigger-based code execution
Triggered by events:
• Direct Sync and Async invocations
• Put to an Amazon S3 bucket
• API Gateway call
• And many more …
Makes it easy to
• Build back-end services that perform at scale
• Perform data-driven auditing, analysis, and notification
Continuous ScalingNo Servers to Manage
AWS Lambda automatically scales
your application by running code in
response to each trigger. Your code
runs in parallel and processes each
trigger individually, scaling precisely
with the size of the workload.
Subsecond Metering
With AWS Lambda, you are charged
for every 100ms your code executes
and the number of times your code is
triggered. You don't pay anything
when your code isn't running.
AWS Lambda automatically runs your
code without requiring you to
provision or manage servers. Just
write the code and upload it to
Lambda.
Benefits of AWS Lambda for building mobile backends
1 2 3
API Gateway + Lambda = Frontend + Backend !
Internet
Mobile Apps
Websites
Services
API
Gateway
AWS
API Gateway
Cache
Endpoints on
Amazon EC2
Any other publicly
accessible endpoint
Amazon
CloudWatch
Monitoring
Amazon
CloudFront
AWS Lambda
functions
Walkthrough of a simple CRUD backend with a
RESTful API endpoint using AWS Lambda
Amazon API
Gateway
AWS Lambda Amazon
DynamoDB
API call from
client app
Request/Response CRUD Operations
CRUD operations with DynamoDB
‘echo’ and ‘pong’ for testing
Error handling for incorrect inputs
Execute the operation with the event payload
Architectural pattern for a simple three-tier application
Recommended whitepaper
AWS Serverless Multi-Tier Architectures
https://d0.awsstatic.com/whitepapers/AWS_Serverless_Multi-Tier_Architectures.pdf
Reference Architecture: Mobile backend using Amazon
API Gateway and AWS Lambda
https://s3.amazonaws.com/awslambda-reference-architectures/mobile-backend/lambda-refarch-mobilebackend.pdf
Sample code: Mobile backend using Amazon API Gateway
and AWS Lambda
CloudFormation templates
Template One configures
• Amazon S3
• Amazon CloudFront
• Amazon DynamoDB
Template Two creates
• 3 different AWS Lambda functions
• AWS IAM roles and policies
Setup instructions
• Deploy setup using Template One
• Create CloudSearch domain
• Update environment variables in the
Lambda function code
• Upload Lambda function code to S3
and Deploy using Template Two
• Link DynamoDB table as event source
https://github.com/awslabs/lambda-refarch-mobilebackend/
Three Next Steps
1. Create and test your first API. With a few clicks in the AWS Management Console,
you can create an API that acts as a “front door” for applications to access data,
business logic, or functionality from your back-end services.
2. Create and test your first Lambda function. With AWS Lambda, there are no new
languages, tools, or frameworks to learn. You can use any third party library, even
native ones.
3. Select Lambda as your backend for your API … Use the sample code and setup
instructions to quickly create your first mobile backend using Amazon API Gateway
and AWS Lambda.
Thank you!
Visit http://aws.amazon.com/api-gateway, the
AWS blog, and the API Gateway forum to learn
more and get started using API Gateway.
Visit http://aws.amazon.com/lambda, the
AWS Compute blog, and the Lambda forum
to learn more and get started using Lambda.

Mais conteúdo relacionado

Destaque

Destaque (13)

Grow and Retain Users with Analytics and Push Notifications
Grow and Retain Users with Analytics and Push NotificationsGrow and Retain Users with Analytics and Push Notifications
Grow and Retain Users with Analytics and Push Notifications
 
Getting Started with AWS Marketplace: A Technical Introduction
Getting Started with AWS Marketplace: A Technical IntroductionGetting Started with AWS Marketplace: A Technical Introduction
Getting Started with AWS Marketplace: A Technical Introduction
 
[AWS LA Media & Entertainment Event 2015]: Raising the Bar on Video Streaming...
[AWS LA Media & Entertainment Event 2015]: Raising the Bar on Video Streaming...[AWS LA Media & Entertainment Event 2015]: Raising the Bar on Video Streaming...
[AWS LA Media & Entertainment Event 2015]: Raising the Bar on Video Streaming...
 
AWS October Webinar Series - Using Spot Instances to Save up to 90% off Your ...
AWS October Webinar Series - Using Spot Instances to Save up to 90% off Your ...AWS October Webinar Series - Using Spot Instances to Save up to 90% off Your ...
AWS October Webinar Series - Using Spot Instances to Save up to 90% off Your ...
 
AWS Enterprise Summit London 2015 | Creating a Cloud First Standard
AWS Enterprise Summit London 2015 | Creating a Cloud First StandardAWS Enterprise Summit London 2015 | Creating a Cloud First Standard
AWS Enterprise Summit London 2015 | Creating a Cloud First Standard
 
Architecting for Greater Security on AWS
Architecting for Greater Security on AWSArchitecting for Greater Security on AWS
Architecting for Greater Security on AWS
 
Amazon API Gateway and AWS Lambda: Better Together
Amazon API Gateway and AWS Lambda: Better TogetherAmazon API Gateway and AWS Lambda: Better Together
Amazon API Gateway and AWS Lambda: Better Together
 
Amazon API Gateway
Amazon API GatewayAmazon API Gateway
Amazon API Gateway
 
Introduction to AWS Services and Cloud Computing
Introduction to AWS Services and Cloud ComputingIntroduction to AWS Services and Cloud Computing
Introduction to AWS Services and Cloud Computing
 
Microservice Architecture on AWS using AWS Lambda and Docker Containers
Microservice Architecture on AWS using AWS Lambda and Docker ContainersMicroservice Architecture on AWS using AWS Lambda and Docker Containers
Microservice Architecture on AWS using AWS Lambda and Docker Containers
 
Serverless Microservices
Serverless MicroservicesServerless Microservices
Serverless Microservices
 
Securing Serverless Workloads with Cognito and API Gateway Part II - AWS Secu...
Securing Serverless Workloads with Cognito and API Gateway Part II - AWS Secu...Securing Serverless Workloads with Cognito and API Gateway Part II - AWS Secu...
Securing Serverless Workloads with Cognito and API Gateway Part II - AWS Secu...
 
Microservices Architecture for Content Management Systems using AWS Lambda an...
Microservices Architecture for Content Management Systems using AWS Lambda an...Microservices Architecture for Content Management Systems using AWS Lambda an...
Microservices Architecture for Content Management Systems using AWS Lambda an...
 

Mais de Amazon Web Services

Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
Amazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
Amazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
Amazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
Amazon Web Services
 

Mais de Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
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
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
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
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
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
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 

AWS December 2015 Webinar Series - Build Mobile Backends with AWS Lambda and Amazon API Gateway

  • 1. © 2015, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Presenter: Vyom Nagrani, Sr. Product Manager, AWS Lambda Q&A Moderator: Stefano Buliani, Sr. Product Manager, Amazon API Gateway Q&A Moderator: Aaron Kao, Sr. Product Marketing Manager, Microservices December 10th, 2015 Build Mobile Backends with AWS Lambda and Amazon API Gateway
  • 2. Amazon API Gateway: A fully managed service for running APIs at scale  Build, Deploy, and Manage APIs  Throttling rules per HTTP method  Cache with customizable keys  Multiple API versions and stages  Generate client SDKs  Dashboard for visual monitoring  Flexible authorization model  API Keys for 3rd party developers
  • 3. Benefits of API Gateway for building mobile backends Low cost and efficient Performance at any scale Easily monitor API activity Streamline API development Flexible security controls Create RESTful Endpoints
  • 4. AWS Lambda: A compute service that runs your code in response to events Lambda functions: Stateless, trigger-based code execution Triggered by events: • Direct Sync and Async invocations • Put to an Amazon S3 bucket • API Gateway call • And many more … Makes it easy to • Build back-end services that perform at scale • Perform data-driven auditing, analysis, and notification
  • 5. Continuous ScalingNo Servers to Manage AWS Lambda automatically scales your application by running code in response to each trigger. Your code runs in parallel and processes each trigger individually, scaling precisely with the size of the workload. Subsecond Metering With AWS Lambda, you are charged for every 100ms your code executes and the number of times your code is triggered. You don't pay anything when your code isn't running. AWS Lambda automatically runs your code without requiring you to provision or manage servers. Just write the code and upload it to Lambda. Benefits of AWS Lambda for building mobile backends 1 2 3
  • 6. API Gateway + Lambda = Frontend + Backend ! Internet Mobile Apps Websites Services API Gateway AWS API Gateway Cache Endpoints on Amazon EC2 Any other publicly accessible endpoint Amazon CloudWatch Monitoring Amazon CloudFront AWS Lambda functions
  • 7. Walkthrough of a simple CRUD backend with a RESTful API endpoint using AWS Lambda Amazon API Gateway AWS Lambda Amazon DynamoDB API call from client app Request/Response CRUD Operations
  • 8.
  • 9.
  • 10. CRUD operations with DynamoDB ‘echo’ and ‘pong’ for testing Error handling for incorrect inputs Execute the operation with the event payload
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23. Architectural pattern for a simple three-tier application Recommended whitepaper AWS Serverless Multi-Tier Architectures https://d0.awsstatic.com/whitepapers/AWS_Serverless_Multi-Tier_Architectures.pdf
  • 24. Reference Architecture: Mobile backend using Amazon API Gateway and AWS Lambda https://s3.amazonaws.com/awslambda-reference-architectures/mobile-backend/lambda-refarch-mobilebackend.pdf
  • 25. Sample code: Mobile backend using Amazon API Gateway and AWS Lambda CloudFormation templates Template One configures • Amazon S3 • Amazon CloudFront • Amazon DynamoDB Template Two creates • 3 different AWS Lambda functions • AWS IAM roles and policies Setup instructions • Deploy setup using Template One • Create CloudSearch domain • Update environment variables in the Lambda function code • Upload Lambda function code to S3 and Deploy using Template Two • Link DynamoDB table as event source https://github.com/awslabs/lambda-refarch-mobilebackend/
  • 26. Three Next Steps 1. Create and test your first API. With a few clicks in the AWS Management Console, you can create an API that acts as a “front door” for applications to access data, business logic, or functionality from your back-end services. 2. Create and test your first Lambda function. With AWS Lambda, there are no new languages, tools, or frameworks to learn. You can use any third party library, even native ones. 3. Select Lambda as your backend for your API … Use the sample code and setup instructions to quickly create your first mobile backend using Amazon API Gateway and AWS Lambda.
  • 27. Thank you! Visit http://aws.amazon.com/api-gateway, the AWS blog, and the API Gateway forum to learn more and get started using API Gateway. Visit http://aws.amazon.com/lambda, the AWS Compute blog, and the Lambda forum to learn more and get started using Lambda.