More Related Content Similar to Build a Serverless Web Application in One Day (20) More from Amazon Web Services (20) Build a Serverless Web Application in One Day1. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Pop-up Loft
Building Serverless Web Apps
Wild Rydes Takes Off:
The Dawn of a New Unicorn
Kashif Imran Sr. Solutions Architect AWS
Harrell Stiles, Sr. Consultant, AWS ProServe
2. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
What to expect?
• Overview of Serverless Computing
• Introduction to AWS Services used in the Workshop
• Outline of the Workshop Scenario
• Preview of the Labs
3. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
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
Physical Hardware – Concern Space
• Procurement
• Power
• Cooling
• Asset Tracking
• Remote Hands
• IP Transit
• Colocation
• Capacity Planning
• Hardware Refreshes
• Storage
• Depreciation
• Physical Security
• Networking Equipment
• Cabling
6. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Amazon Elastic Compute Cloud (EC2)
• Allows developers to
obtain compute capacity
on-demand
• Create virtual servers in
the cloud with the click of
a button
• Launched in 2006
7. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Amazon Elastic Compute Cloud (EC2)
Match Capacity and
Demand
Global Footprint Elasticity
Provision Servers in
Minutes
Infrastructure as
Code
Programmatic
Networking
8. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Servers – Concern Space
• Configuration Management
• Security Patches
• Server Utilization
• Operating Systems
• Auto-scaling Policies
• Monitoring
• Intrusion Detection
• Resiliency
• Machine Images
• Access Management
• Capacity Planning
• Hourly Billing
• Code Deployment
9. © 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…
10. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Services You Will Use Today
11. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
AWS Lambda: Serverless computing
• Run code without servers. Pay only for the compute time you consume.
• Triggered by events or called from APIs:
– PUT to an Amazon S3 bucket
– Updates to Amazon DynamoDB table
– Call to an Amazon API Gateway endpoint
– Mobile app back-end call
– And many more…
• Makes it easy to:
– Perform real-time data processing
– Build scalable back-end services
– Glue and choreograph systems
12. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Benefits of AWS Lambda
No Servers to Manage Continuous Scaling Don’t Pay for Idle Capacity
Lambda allows you to run
application logic without
provisioning servers or worrying
about the health or security of
underlying resources
Lambda scales infrastructure
beneath your application logic;
just send requests and events
and Lambda will automatically
scale to accommodate it
With Lambda, you’re billed in
100ms increments of execution
time and number of requests
and you’re never charged for
anything when your code isn’t
running
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 API Gateway
• Create, publish, maintain, monitor, and secure APIs at any scale
Create a unified API
frontend for multiple
backend microservices
DDoS and throttling to
protect your backend
microservices
Authenticate and authorize
requests to your backend
microservices
15. © 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
16. © 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
17. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Amazon Simple Storage Service (S3)
• S3 is a low-cost, highly available solution for static
website hosting – and it’s 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
18. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Workshop Overview
19. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Scenario: Wild Rydes (www.wildrydes.com)
20. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Help Wild Rydes Disrupt Transportation!
So how does this magic work?
21. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Wild Rydes is Backed by Leading Investors
THE BARN
ACCELERATOR
TENDERLOIN
CAPITAL
PENGLAI COMMUNICATIONS
AND POST NEW CENTURY
TECHNOLOGY CORP LIMITED
22. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Your Task: Build the Wild Rydes Website
Welcome to Wild Rydes Inc.,
Employee #3!
23. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Scenario: Wild Rydes
The Wild Rydes Serverless Web Application Workshop introduces the basics of
building web applications using serverless infrastructure.
24. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Lab 1: Static Website Hosting
OBJECTIVE: Create a bucket in Amazon S3 and configure it for static website hosting.
The static HTML, JS, and CSS will be served directly to user browsers from Amazon S3.
25. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Lab 2: User Management
OBJECTIVE: Allow visitors to register as a new user on Wild Rydes, by providing and
validating their email address. Amazon Cognito will be used to manage the User Pool for
Wild Rydes.
26. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Lab 3: Serverless Service Backend
OBJECTIVE: Create a service backend using AWS Lambda and Amazon DynamoDB to
handle requests from your frontend static website content.
27. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Lab 4: Create RESTful API
OBJECTIVE: Use API Gateway to expose the Lambda function you built in the previous
module as a RESTful API
28. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
https://github.com/awslabs/aws-serverless-workshops/tree/master/WebApplication
https://tinyurl.com/yb8papcs