際際滷

際際滷Share a Scribd company logo
息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
John Yeung, Solutions Architect
Kwun-Hok Chan, Solutions Architect
25th May 2018
AWS Workshop Series
Building Modern API-driven Applications
Hand-on Lab:
Wild Rydes Workshop
息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Agenda
Whats Serverless Computing (Key Concepts & Benefits)
Serverless Computing Use Cases
Hand-on Lab: Wild Rydes  Request Your Unicorn
Real-life Business Cases
息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Whats Serverless Computing
息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
In the beginning ...
息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Servers
Which users should have
access to my servers?
How
should
m
y app
withstand
a
server failing?
How will the application
handle server hardware failure?
How many servers
should I budget for?
How many users create
too much load for my servers?
How can I increase
utilization of my servers?
How can I control
access from my servers?
W
hat size
server is
right for m
y perform
ance?
When should I decide to
scale out my servers?
When should I decide to
scale up my servers?
How will I keep my server
OS patched?
Which OS should my
servers run?
Should I tune OS settings
to optimize my application?
What size servers are
right for my budget?
How can I tell if a
server has been
compromised?
Which packages should
be baked into my server images?
How will new code be
deployed to my servers?
How should I implement dynamic
configuration changes on my servers
How much remaining
capacity do my servers have?
(AAHHHHHHHHH!!)
息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
No servers to provision
or manage
Scales with usage
Never pay for idle Availability and fault
tolerance built in
Serverless means
息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
SERVICES (ANYTHING)
Changes in
data state
Requests to
endpoints
Changes in
resource state
EVENT SOURCE FUNCTION
Node.js
Python
Java
C#
Go
Serverless applications
息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Using AWS Lambda
Bring your own code
 Node.js, Java, Python,
C#, Go
 Bring your own libraries
(even native ones)
Simple resource model
 Select power rating from
128 MB to 3 GB
 CPU and network
allocated proportionately
Flexible use
 Synchronous or
asynchronous
 Integrated with other
AWS services
Flexible authorization
 Securely grant access to
resources and VPCs
 Fine-grained control for
invoking your functions
息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Using AWS Lambda
Authoring functions
 Cloud9
 WYSIWYG editor or
upload packaged .zip
 Third-party plugins
(Eclipse, Visual Studio)
Monitoring and logging
 Metrics for requests,
errors, and throttles
 Built-in logs to Amazon
CloudWatch Logs
 X-Ray integration
Programming model
 Use processes, threads,
/tmp, sockets normally
 AWS SDK built in
(Python and Node.js)
Stateless
 Persist data using
external storage
 No affinity or access to
underlying infrastructure
息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Lambda execution model
Synchronous
(push)
Asynchronous
(event)
Stream-based
Amazon
API Gateway
AWS Lambda
function
Amazon
DynamoDBAmazon
SNS
/order
AWS Lambda
function
Amazon
S3
reqs
Amazon
Kinesis
changes
AWS Lambda
service
function
息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Common use cases
Web
Applications
 Static
websites
 Complex web
apps
 Packages for
Flask and
Express
Data
Processing
 Real time
 MapReduce
 Batch
Chatbots
 Powering
chatbot logic
Backends
 Apps &
services
 Mobile
 IoT
</></>
Amazon
Alexa
 Powering
voice-enabled
apps
 Alexa Skills
Kit
IT
Automation
 Policy engines
 Extending
AWS services
 Infrastructure
management
息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Create a unified
API frontend for
multiple micro-
services
Authenticate and
authorize
requests to a
backend
DDoS protection
and throttling for
your backend
Throttle, meter,
and monetize API
usage by 3rd
party developers
Amazon API Gateway
息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon DynamoDB
Fast and flexible NoSQL database service
for any scale
Dead simple
GetItem(primaryKey)
PutItem(item)
Robust depth
Fine-grained access control
Streams
Triggers
Cross-region replication
DynamoDB local
Free-text search
Titan graph database integration
Strong consistency option
Atomic counters
息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon Cognito
Add user sign-up, sign-in, and data synchronization to your apps
Add user sign-up and sign-
in to your mobile and web
apps
Federate identities and
provide secure access to
AWS resources
Store and sync across
devices
息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon Simple Storage Service S3
Durable, massively scalable object storage
Designed for 99.999999999% durability and
99.99% availability
Stores trillions of objects and regularly handles millions of
requests per second
Effectively infinite storage without provisioning capacity
息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon Simple Storage Service S3
Amazon S3 is a low-cost, highly available solution for static
website hosting  and its completely serverless
Reliably serve your static website and handle unexpected peaks
without worrying about scaling your infrastructure
Integrates with Amazon CloudFront for edge delivery of content
across the globe
息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Use Cases
息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Use Case: Web Applications and Backends
息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Use Case: Data Processing
息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Use Case: Data Processing
息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Hand-on Lab
息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Mission
Build your own Wild Rydes website on AWS!
Introducing Wild Rydes, a new innovative unicorn
transportation service using AWS Lambda, AWS Step
Functions, Amazon DynamoDB, Amazon API Gateway, and
Amazon Kinesis to get people to their destination faster and
hassle-free. You simply open the Wild Rydes app, request a
unicorn, and then wait for the nearest unicorn to arrive and
pick you up. Its better, faster, safer, and more magical.
With fresh venture capital funding, Wild Rydes seeks your
help to build its technology platform with serverless
architectures. Hop on board today and help Wild Rydes
build the future of magical transportation!
息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Overview
This workshop is broken up into five modules. You must complete each module before
proceeding to the next. However, modules 1 and 2 have AWS CloudFormation templates
available that you can use to launch the necessary resources without manually creating
them yourself. The templates let you skip those modules.
1. Static Web Hosting
2. User Management
3. Serverless Backend
4. RESTful APIs
5. Resource Termination
Ref.: https://aws.amazon.com/getting-started/serverless-web-app/
息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Architecture
息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Module 1  Static Website Hosting
In this module you'll configure
Amazon Simple Storage Service (S3)
to host the static resources for your
web application. In subsequent
modules you'll add dynamic
functionality to these pages using
JavaScript to call remote RESTful
APIs built with AWS Lambda and
Amazon API Gateway.
Ref.: https://aws.amazon.com/getting-started/serverless-web-app/module-1/
息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Module 2  User Management
In this module you'll create an
Amazon Cognito user pool to
manage your users' accounts. You'll
deploy pages that enable customers
to register as a new user, verify their
email address, and sign into the site.
Ref.: https://aws.amazon.com/getting-started/serverless-web-app/module-2/
息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Module 3  Serverless Service Backend
In this module you'll use AWS
Lambda and Amazon DynamoDB to
build a backend process for handling
requests for your web application.
The browser application that you
deployed in the first module allows
users to request that a unicorn be
sent to a location of their choice. In
order to fulfill those requests, the
JavaScript running in the browser will
need to invoke a service running in
the cloud.
Ref.: https://aws.amazon.com/getting-started/serverless-web-app/module-3/
息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Module 4  Restful APIs
In this module you'll use Amazon API
Gateway to expose the Lambda
function you built in the previous
module as a RESTful API. This API
will be accessible on the public
Internet. It will be secured using the
Amazon Cognito user pool you
created in the previous module.
Using this configuration you will then
turn your statically hosted website
into a dynamic web application by
adding client-side JavaScript that
makes AJAX calls to the exposed
APIs.
Ref.: https://aws.amazon.com/getting-started/serverless-web-app/module-4/
息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Module 5  Resource Cleanup
In this module, you will go through
the steps to terminate all the
resources you created throughout
this learning path. You will terminate
an Amazon S3 bucket, an Amazon
Cognito User Pool, an AWS Lambda
function, an IAM role, a DynamoDB
table, a REST API, and a
CloudWatch Log. It is a best practice
to delete resources you are no longer
using to avoid unwanted charges. Congratulations! You built and
terminated a serverless web application
using Amazon Web Services (AWS).
Ref.: https://aws.amazon.com/getting-started/serverless-web-app/module-5/
息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Thank You!
Email: jyeung@amazon.com

More Related Content

Similar to AWS Application Service Workshop - Serverless Architecture (7)

Wildrydes Serverless Workshop Tel Aviv
Wildrydes Serverless Workshop Tel AvivWildrydes Serverless Workshop Tel Aviv
Wildrydes Serverless Workshop Tel Aviv
Boaz Ziniman
Modern Applications Web Day | Impress Your Friends with Your First Serverless...
Modern Applications Web Day | Impress Your Friends with Your First Serverless...Modern Applications Web Day | Impress Your Friends with Your First Serverless...
Modern Applications Web Day | Impress Your Friends with Your First Serverless...
AWS Germany
Serverless Computing
Serverless Computing Serverless Computing
Serverless Computing
Rushi Namani
Getting started with Serverless on AWS
Getting started with Serverless on AWSGetting started with Serverless on AWS
Getting started with Serverless on AWS
Adrian Hornsby
Re cap2018
Re cap2018Re cap2018
Re cap2018
Richard Harvey
Building API Driven Microservices
Building API Driven MicroservicesBuilding API Driven Microservices
Building API Driven Microservices
Chris Munns
Introduction to Serverless Computing and AWS Lambda - AWS IL Meetup
Introduction to Serverless Computing and AWS Lambda - AWS IL MeetupIntroduction to Serverless Computing and AWS Lambda - AWS IL Meetup
Introduction to Serverless Computing and AWS Lambda - AWS IL Meetup
Boaz Ziniman
Wildrydes Serverless Workshop Tel Aviv
Wildrydes Serverless Workshop Tel AvivWildrydes Serverless Workshop Tel Aviv
Wildrydes Serverless Workshop Tel Aviv
Boaz Ziniman
Modern Applications Web Day | Impress Your Friends with Your First Serverless...
Modern Applications Web Day | Impress Your Friends with Your First Serverless...Modern Applications Web Day | Impress Your Friends with Your First Serverless...
Modern Applications Web Day | Impress Your Friends with Your First Serverless...
AWS Germany
Serverless Computing
Serverless Computing Serverless Computing
Serverless Computing
Rushi Namani
Getting started with Serverless on AWS
Getting started with Serverless on AWSGetting started with Serverless on AWS
Getting started with Serverless on AWS
Adrian Hornsby
Building API Driven Microservices
Building API Driven MicroservicesBuilding API Driven Microservices
Building API Driven Microservices
Chris Munns
Introduction to Serverless Computing and AWS Lambda - AWS IL Meetup
Introduction to Serverless Computing and AWS Lambda - AWS IL MeetupIntroduction to Serverless Computing and AWS Lambda - AWS IL Meetup
Introduction to Serverless Computing and AWS Lambda - AWS IL Meetup
Boaz Ziniman

Recently uploaded (20)

UTI Quinolones by Mrs. Manjushri Dabhade
UTI Quinolones by Mrs. Manjushri DabhadeUTI Quinolones by Mrs. Manjushri Dabhade
UTI Quinolones by Mrs. Manjushri Dabhade
Dabhade madam Dabhade
Managing Online Signature and Payment with Odoo 17
Managing Online Signature and Payment with Odoo 17Managing Online Signature and Payment with Odoo 17
Managing Online Signature and Payment with Odoo 17
Celine George
Different perspectives on dugout canoe heritage of Soomaa.pdf
Different perspectives on dugout canoe heritage of Soomaa.pdfDifferent perspectives on dugout canoe heritage of Soomaa.pdf
Different perspectives on dugout canoe heritage of Soomaa.pdf
Aivar Ruukel
Unit 3: Combustion in Spark Ignition Engines
Unit 3: Combustion in Spark Ignition EnginesUnit 3: Combustion in Spark Ignition Engines
Unit 3: Combustion in Spark Ignition Engines
NileshKumbhar21
Antifungal agents by Mrs. Manjushri Dabhade
Antifungal agents by Mrs. Manjushri DabhadeAntifungal agents by Mrs. Manjushri Dabhade
Antifungal agents by Mrs. Manjushri Dabhade
Dabhade madam Dabhade
Recruitment in the Odoo 17 - Odoo 17 際際滷s
Recruitment in the Odoo 17 - Odoo 17 際際滷sRecruitment in the Odoo 17 - Odoo 17 際際滷s
Recruitment in the Odoo 17 - Odoo 17 際際滷s
Celine George
Knownsense 2025 Finals-U-25 General Quiz.pdf
Knownsense 2025 Finals-U-25 General Quiz.pdfKnownsense 2025 Finals-U-25 General Quiz.pdf
Knownsense 2025 Finals-U-25 General Quiz.pdf
Pragya - UEM Kolkata Quiz Club
How to Install Odoo 18 with Pycharm - Odoo 18 際際滷s
How to Install Odoo 18 with Pycharm - Odoo 18 際際滷sHow to Install Odoo 18 with Pycharm - Odoo 18 際際滷s
How to Install Odoo 18 with Pycharm - Odoo 18 際際滷s
Celine George
How to Setup Company Data in Odoo 17 Accounting App
How to Setup Company Data in Odoo 17 Accounting AppHow to Setup Company Data in Odoo 17 Accounting App
How to Setup Company Data in Odoo 17 Accounting App
Celine George
Marketing is Everything in the Beauty Business! 憓 Talent gets you in the ...
 Marketing is Everything in the Beauty Business! 憓 Talent gets you in the ... Marketing is Everything in the Beauty Business! 憓 Talent gets you in the ...
Marketing is Everything in the Beauty Business! 憓 Talent gets you in the ...
coreylewis960
Unit No 4- Chemotherapy of Malignancy.pptx
Unit No  4- Chemotherapy of Malignancy.pptxUnit No  4- Chemotherapy of Malignancy.pptx
Unit No 4- Chemotherapy of Malignancy.pptx
Ashish Umale
MIPLM subject matter expert Dr Robert Klinski
MIPLM subject matter expert Dr Robert KlinskiMIPLM subject matter expert Dr Robert Klinski
MIPLM subject matter expert Dr Robert Klinski
MIPLM
Anti-Fungal Agents.pptx Medicinal Chemistry III B. Pharm Sem VI
Anti-Fungal Agents.pptx Medicinal Chemistry III B. Pharm Sem VIAnti-Fungal Agents.pptx Medicinal Chemistry III B. Pharm Sem VI
Anti-Fungal Agents.pptx Medicinal Chemistry III B. Pharm Sem VI
Samruddhi Khonde
MIPLM subject matter expert Daniel Holzner
MIPLM subject matter expert Daniel HolznerMIPLM subject matter expert Daniel Holzner
MIPLM subject matter expert Daniel Holzner
MIPLM
Chapter 6. Business and Corporate Strategy Formulation.pdf
Chapter 6. Business and Corporate Strategy Formulation.pdfChapter 6. Business and Corporate Strategy Formulation.pdf
Chapter 6. Business and Corporate Strategy Formulation.pdf
Rommel Regala
ANTIVIRAL agent by Mrs. Manjushri Dabhade
ANTIVIRAL agent by Mrs. Manjushri DabhadeANTIVIRAL agent by Mrs. Manjushri Dabhade
ANTIVIRAL agent by Mrs. Manjushri Dabhade
Dabhade madam Dabhade
Introduction to Systematic Reviews - Prof Ejaz Khan
Introduction to Systematic Reviews - Prof Ejaz KhanIntroduction to Systematic Reviews - Prof Ejaz Khan
Introduction to Systematic Reviews - Prof Ejaz Khan
Systematic Reviews Network (SRN)
CLEFT LIP AND PALATE: NURSING MANAGEMENT.pptx
CLEFT LIP AND PALATE: NURSING MANAGEMENT.pptxCLEFT LIP AND PALATE: NURSING MANAGEMENT.pptx
CLEFT LIP AND PALATE: NURSING MANAGEMENT.pptx
PRADEEP ABOTHU
3. AI Trust Layer, Governance Explainability, Security & Compliance.pdf
3. AI Trust Layer, Governance  Explainability, Security & Compliance.pdf3. AI Trust Layer, Governance  Explainability, Security & Compliance.pdf
3. AI Trust Layer, Governance Explainability, Security & Compliance.pdf
Mukesh Kala
UTI Quinolones by Mrs. Manjushri Dabhade
UTI Quinolones by Mrs. Manjushri DabhadeUTI Quinolones by Mrs. Manjushri Dabhade
UTI Quinolones by Mrs. Manjushri Dabhade
Dabhade madam Dabhade
Managing Online Signature and Payment with Odoo 17
Managing Online Signature and Payment with Odoo 17Managing Online Signature and Payment with Odoo 17
Managing Online Signature and Payment with Odoo 17
Celine George
Different perspectives on dugout canoe heritage of Soomaa.pdf
Different perspectives on dugout canoe heritage of Soomaa.pdfDifferent perspectives on dugout canoe heritage of Soomaa.pdf
Different perspectives on dugout canoe heritage of Soomaa.pdf
Aivar Ruukel
Unit 3: Combustion in Spark Ignition Engines
Unit 3: Combustion in Spark Ignition EnginesUnit 3: Combustion in Spark Ignition Engines
Unit 3: Combustion in Spark Ignition Engines
NileshKumbhar21
Antifungal agents by Mrs. Manjushri Dabhade
Antifungal agents by Mrs. Manjushri DabhadeAntifungal agents by Mrs. Manjushri Dabhade
Antifungal agents by Mrs. Manjushri Dabhade
Dabhade madam Dabhade
Recruitment in the Odoo 17 - Odoo 17 際際滷s
Recruitment in the Odoo 17 - Odoo 17 際際滷sRecruitment in the Odoo 17 - Odoo 17 際際滷s
Recruitment in the Odoo 17 - Odoo 17 際際滷s
Celine George
How to Install Odoo 18 with Pycharm - Odoo 18 際際滷s
How to Install Odoo 18 with Pycharm - Odoo 18 際際滷sHow to Install Odoo 18 with Pycharm - Odoo 18 際際滷s
How to Install Odoo 18 with Pycharm - Odoo 18 際際滷s
Celine George
How to Setup Company Data in Odoo 17 Accounting App
How to Setup Company Data in Odoo 17 Accounting AppHow to Setup Company Data in Odoo 17 Accounting App
How to Setup Company Data in Odoo 17 Accounting App
Celine George
Marketing is Everything in the Beauty Business! 憓 Talent gets you in the ...
 Marketing is Everything in the Beauty Business! 憓 Talent gets you in the ... Marketing is Everything in the Beauty Business! 憓 Talent gets you in the ...
Marketing is Everything in the Beauty Business! 憓 Talent gets you in the ...
coreylewis960
Unit No 4- Chemotherapy of Malignancy.pptx
Unit No  4- Chemotherapy of Malignancy.pptxUnit No  4- Chemotherapy of Malignancy.pptx
Unit No 4- Chemotherapy of Malignancy.pptx
Ashish Umale
MIPLM subject matter expert Dr Robert Klinski
MIPLM subject matter expert Dr Robert KlinskiMIPLM subject matter expert Dr Robert Klinski
MIPLM subject matter expert Dr Robert Klinski
MIPLM
Anti-Fungal Agents.pptx Medicinal Chemistry III B. Pharm Sem VI
Anti-Fungal Agents.pptx Medicinal Chemistry III B. Pharm Sem VIAnti-Fungal Agents.pptx Medicinal Chemistry III B. Pharm Sem VI
Anti-Fungal Agents.pptx Medicinal Chemistry III B. Pharm Sem VI
Samruddhi Khonde
MIPLM subject matter expert Daniel Holzner
MIPLM subject matter expert Daniel HolznerMIPLM subject matter expert Daniel Holzner
MIPLM subject matter expert Daniel Holzner
MIPLM
Chapter 6. Business and Corporate Strategy Formulation.pdf
Chapter 6. Business and Corporate Strategy Formulation.pdfChapter 6. Business and Corporate Strategy Formulation.pdf
Chapter 6. Business and Corporate Strategy Formulation.pdf
Rommel Regala
ANTIVIRAL agent by Mrs. Manjushri Dabhade
ANTIVIRAL agent by Mrs. Manjushri DabhadeANTIVIRAL agent by Mrs. Manjushri Dabhade
ANTIVIRAL agent by Mrs. Manjushri Dabhade
Dabhade madam Dabhade
CLEFT LIP AND PALATE: NURSING MANAGEMENT.pptx
CLEFT LIP AND PALATE: NURSING MANAGEMENT.pptxCLEFT LIP AND PALATE: NURSING MANAGEMENT.pptx
CLEFT LIP AND PALATE: NURSING MANAGEMENT.pptx
PRADEEP ABOTHU
3. AI Trust Layer, Governance Explainability, Security & Compliance.pdf
3. AI Trust Layer, Governance  Explainability, Security & Compliance.pdf3. AI Trust Layer, Governance  Explainability, Security & Compliance.pdf
3. AI Trust Layer, Governance Explainability, Security & Compliance.pdf
Mukesh Kala

AWS Application Service Workshop - Serverless Architecture

  • 1. 息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. John Yeung, Solutions Architect Kwun-Hok Chan, Solutions Architect 25th May 2018 AWS Workshop Series Building Modern API-driven Applications Hand-on Lab: Wild Rydes Workshop
  • 2. 息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Agenda Whats Serverless Computing (Key Concepts & Benefits) Serverless Computing Use Cases Hand-on Lab: Wild Rydes Request Your Unicorn Real-life Business Cases
  • 3. 息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Whats Serverless Computing
  • 4. 息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. In the beginning ...
  • 5. 息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Servers Which users should have access to my servers? How should m y app withstand a server failing? How will the application handle server hardware failure? How many servers should I budget for? How many users create too much load for my servers? How can I increase utilization of my servers? How can I control access from my servers? W hat size server is right for m y perform ance? When should I decide to scale out my servers? When should I decide to scale up my servers? How will I keep my server OS patched? Which OS should my servers run? Should I tune OS settings to optimize my application? What size servers are right for my budget? How can I tell if a server has been compromised? Which packages should be baked into my server images? How will new code be deployed to my servers? How should I implement dynamic configuration changes on my servers How much remaining capacity do my servers have? (AAHHHHHHHHH!!)
  • 6. 息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. No servers to provision or manage Scales with usage Never pay for idle Availability and fault tolerance built in Serverless means
  • 7. 息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. SERVICES (ANYTHING) Changes in data state Requests to endpoints Changes in resource state EVENT SOURCE FUNCTION Node.js Python Java C# Go Serverless applications
  • 8. 息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Using AWS Lambda Bring your own code Node.js, Java, Python, C#, Go Bring your own libraries (even native ones) Simple resource model Select power rating from 128 MB to 3 GB CPU and network allocated proportionately Flexible use Synchronous or asynchronous Integrated with other AWS services Flexible authorization Securely grant access to resources and VPCs Fine-grained control for invoking your functions
  • 9. 息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Using AWS Lambda Authoring functions Cloud9 WYSIWYG editor or upload packaged .zip Third-party plugins (Eclipse, Visual Studio) Monitoring and logging Metrics for requests, errors, and throttles Built-in logs to Amazon CloudWatch Logs X-Ray integration Programming model Use processes, threads, /tmp, sockets normally AWS SDK built in (Python and Node.js) Stateless Persist data using external storage No affinity or access to underlying infrastructure
  • 10. 息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Lambda execution model Synchronous (push) Asynchronous (event) Stream-based Amazon API Gateway AWS Lambda function Amazon DynamoDBAmazon SNS /order AWS Lambda function Amazon S3 reqs Amazon Kinesis changes AWS Lambda service function
  • 11. 息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Common use cases Web Applications Static websites Complex web apps Packages for Flask and Express Data Processing Real time MapReduce Batch Chatbots Powering chatbot logic Backends Apps & services Mobile IoT </></> Amazon Alexa Powering voice-enabled apps Alexa Skills Kit IT Automation Policy engines Extending AWS services Infrastructure management
  • 12. 息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Create a unified API frontend for multiple micro- services Authenticate and authorize requests to a backend DDoS protection and throttling for your backend Throttle, meter, and monetize API usage by 3rd party developers Amazon API Gateway
  • 13. 息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon DynamoDB Fast and flexible NoSQL database service for any scale Dead simple GetItem(primaryKey) PutItem(item) Robust depth Fine-grained access control Streams Triggers Cross-region replication DynamoDB local Free-text search Titan graph database integration Strong consistency option Atomic counters
  • 14. 息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Cognito Add user sign-up, sign-in, and data synchronization to your apps Add user sign-up and sign- in to your mobile and web apps Federate identities and provide secure access to AWS resources Store and sync across devices
  • 15. 息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Simple Storage Service S3 Durable, massively scalable object storage Designed for 99.999999999% durability and 99.99% availability Stores trillions of objects and regularly handles millions of requests per second Effectively infinite storage without provisioning capacity
  • 16. 息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Simple Storage Service S3 Amazon S3 is a low-cost, highly available solution for static website hosting and its completely serverless Reliably serve your static website and handle unexpected peaks without worrying about scaling your infrastructure Integrates with Amazon CloudFront for edge delivery of content across the globe
  • 17. 息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Use Cases
  • 18. 息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Use Case: Web Applications and Backends
  • 19. 息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Use Case: Data Processing
  • 20. 息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Use Case: Data Processing
  • 21. 息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Hand-on Lab
  • 22. 息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 23. 息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 24. 息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Mission Build your own Wild Rydes website on AWS! Introducing Wild Rydes, a new innovative unicorn transportation service using AWS Lambda, AWS Step Functions, Amazon DynamoDB, Amazon API Gateway, and Amazon Kinesis to get people to their destination faster and hassle-free. You simply open the Wild Rydes app, request a unicorn, and then wait for the nearest unicorn to arrive and pick you up. Its better, faster, safer, and more magical. With fresh venture capital funding, Wild Rydes seeks your help to build its technology platform with serverless architectures. Hop on board today and help Wild Rydes build the future of magical transportation!
  • 25. 息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Overview This workshop is broken up into five modules. You must complete each module before proceeding to the next. However, modules 1 and 2 have AWS CloudFormation templates available that you can use to launch the necessary resources without manually creating them yourself. The templates let you skip those modules. 1. Static Web Hosting 2. User Management 3. Serverless Backend 4. RESTful APIs 5. Resource Termination Ref.: https://aws.amazon.com/getting-started/serverless-web-app/
  • 26. 息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Architecture
  • 27. 息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Module 1 Static Website Hosting In this module you'll configure Amazon Simple Storage Service (S3) to host the static resources for your web application. In subsequent modules you'll add dynamic functionality to these pages using JavaScript to call remote RESTful APIs built with AWS Lambda and Amazon API Gateway. Ref.: https://aws.amazon.com/getting-started/serverless-web-app/module-1/
  • 28. 息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Module 2 User Management In this module you'll create an Amazon Cognito user pool to manage your users' accounts. You'll deploy pages that enable customers to register as a new user, verify their email address, and sign into the site. Ref.: https://aws.amazon.com/getting-started/serverless-web-app/module-2/
  • 29. 息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Module 3 Serverless Service Backend In this module you'll use AWS Lambda and Amazon DynamoDB to build a backend process for handling requests for your web application. The browser application that you deployed in the first module allows users to request that a unicorn be sent to a location of their choice. In order to fulfill those requests, the JavaScript running in the browser will need to invoke a service running in the cloud. Ref.: https://aws.amazon.com/getting-started/serverless-web-app/module-3/
  • 30. 息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Module 4 Restful APIs In this module you'll use Amazon API Gateway to expose the Lambda function you built in the previous module as a RESTful API. This API will be accessible on the public Internet. It will be secured using the Amazon Cognito user pool you created in the previous module. Using this configuration you will then turn your statically hosted website into a dynamic web application by adding client-side JavaScript that makes AJAX calls to the exposed APIs. Ref.: https://aws.amazon.com/getting-started/serverless-web-app/module-4/
  • 31. 息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Module 5 Resource Cleanup In this module, you will go through the steps to terminate all the resources you created throughout this learning path. You will terminate an Amazon S3 bucket, an Amazon Cognito User Pool, an AWS Lambda function, an IAM role, a DynamoDB table, a REST API, and a CloudWatch Log. It is a best practice to delete resources you are no longer using to avoid unwanted charges. Congratulations! You built and terminated a serverless web application using Amazon Web Services (AWS). Ref.: https://aws.amazon.com/getting-started/serverless-web-app/module-5/
  • 32. 息 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Thank You! Email: jyeung@amazon.com