Serverless Apps on AWS
-
Upload
amazon-web-services -
Category
Technology
-
view
1.040 -
download
0
Transcript of Serverless Apps on AWS
![Page 1: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/1.jpg)
Serverless Apps on AWSDean Bryen - Solutions Architect - AWS
James Hall - Co-Founder - Parallax
@deanbryen@parallax
![Page 2: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/2.jpg)
What are your goals?
![Page 3: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/3.jpg)
3
Racing within a window of time
![Page 4: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/4.jpg)
4
Focus is on solving a problem
![Page 5: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/5.jpg)
5
Skills are in Development not Infrastructure
![Page 6: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/6.jpg)
6
Over-Engineering vs Re-Engineering
![Page 7: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/7.jpg)
The Evolution of Architecture
![Page 8: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/8.jpg)
8
The Monolith
![Page 9: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/9.jpg)
9
Micro Services
![Page 10: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/10.jpg)
10
API Driven Development
![Page 11: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/11.jpg)
The Evolution of Compute and Storage
![Page 12: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/12.jpg)
12
Physical Servers / Disks ->VM’s
![Page 13: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/13.jpg)
13
Containers
![Page 14: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/14.jpg)
14
Platform Level Services
![Page 15: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/15.jpg)
My Application Challenge
![Page 16: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/16.jpg)
Build a micro service based web application that…..
Scales per request
Requires no deployment effort
Fault Tolerant
Has a RESTful API interface with a Web client
![Page 17: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/17.jpg)
The Catch
NO Servers
NO Monolithic App or Explicit Web Service
NO Explicit code for scaling and fault tolerance
And do it within 45 minutes…
![Page 18: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/18.jpg)
What Services Could we use?
![Page 19: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/19.jpg)
Static Assets in Amazon S3
Internet scale HTTP/S based object store
Inerently Highly Available and Fault Tolerant
Designed for 11 9’s of Durability
Can host static websites
Holds trillions of objects
![Page 20: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/20.jpg)
Serverless micro services with AWS Lambda
Event Driven Computing service
Never pay for idle
Scales per request
Supports Node.js, python and Java (or other JVM based languages)
Event triggers from other AWS Services
23 different ‘Power Levels’ of AWS Lambda
![Page 21: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/21.jpg)
A RESTful API with Amazon API Gateway
Host multiple versions and stages of your API
Create and distribute API Keys to your developers
Throttle and Monitor API Calls
Cache Responses
Transform Data
Generate SDK’s (Including Swagger Support)
Interact directly with AWS Lambda
![Page 22: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/22.jpg)
A NoSQL Data Store with Amazon DynamoDB
Managed noSQL Data Store
Can be either a Document or Key/Value store
Simply provision read and write throughput
Enables you to focuss on your data
DynamoDB streams enables you to take actions on events
Inherently Highly Available and Fault Tolerant
![Page 23: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/23.jpg)
Putting it all together
![Page 24: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/24.jpg)
The Service Itself
Static Site in S3 www.servicecheck.com
Web Client API Gateway/serviceCheck
Lambda serviceLogger
Lambda serviceCheck
DynamoDBservices
![Page 25: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/25.jpg)
Serverless Framework - Previously JAWS
![Page 26: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/26.jpg)
It’s more cost effective
![Page 27: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/27.jpg)
Demo
![Page 28: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/28.jpg)
Some other serverless patterns
![Page 29: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/29.jpg)
Serverless Real Time Clickstream
Raw data pushed to S3
Amazon Redshift
Amazon Kinesis
Amazon Kinesis
AWS Lambda
![Page 30: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/30.jpg)
Serverless DAM Architecture
users
Ingest Bucket
CloudFormation Template
DynamoDB
Cognito
Lambda MetaData
Extract
Asset Bucket
Index
Logs Bucket
Static Site
Elastic Transcoder
IAM
ElasticSearch
API$Gateway$
Lambda App Logic
![Page 31: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/31.jpg)
Serverless Chat Application
Internet
Activity Indicator
Chat Service
Activity
Messages
Search Service
DynamoDB Streams
Elasticsearch Service
S3 Web Hosting Twilio
Slack Chat
API Gateway
IoT Device
IoT Processing
Website
AWS IoT or Amazon SNS
![Page 32: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/32.jpg)
One Column
[email protected] 226477
Subtitle
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has a the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.
Here is an example: - Bullet Point one - Bullet Point one - Bullet Point one
It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
@parallax
![Page 33: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/33.jpg)
“Everybody loved the idea, some little geniuses created this app where you can record your part.”
@parallax Serverless Applications on AWS
David Guetta
![Page 34: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/34.jpg)
![Page 35: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/35.jpg)
“The longer I spent watching the intro video, the more
it looked like David sort of didn't want to be there. He
was shifting around on his chair like a man who'd just
nicked a Mars bar.”
– VICE
![Page 36: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/36.jpg)
@parallax
![Page 37: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/37.jpg)
Traditional Architecture
@parallax@parallax
![Page 38: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/38.jpg)
@parallax
Traditional Architecture
Serverless Applications on AWS
![Page 39: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/39.jpg)
£ £ £ £ £ £ £
@parallax
Traditional Architecture
Serverless Applications on AWS
![Page 40: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/40.jpg)
With AWS Serverless
@parallax@parallax Serverless Applications on AWS
![Page 41: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/41.jpg)
@parallax
Without “Servers”
Serverless Applications on AWS
![Page 42: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/42.jpg)
Serverless Framework
@parallax@parallax Serverless Applications on AWS
![Page 43: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/43.jpg)
• Pay-per-use Pricing • No servers to manage • Run nano/microservices
(or monoliths!)
@parallax Serverless Applications on AWS
![Page 44: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/44.jpg)
How it works
@parallax@parallax Serverless Applications on AWS
![Page 45: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/45.jpg)
@parallax
Page lifecycle
Serverless Applications on AWS
1. User visits
HTTPSGET /
S3 with CloudFront
2. CSS & JS
HTTPSGET*.js*.css
S3 with CloudFront
index.html
3. Lang detect
API Gateway w/Lambda
HTTPSGET/users/country
HTTPSPOST/users/update
4. User fills details
API Gateway w/Lambda
![Page 46: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/46.jpg)
@parallax
Page lifecycle
Serverless Applications on AWS
5.
5. FB Login (optional)
HTTPSGET api.facebook.com
Hits Facebook Hosted Endpointvia Facebook Javascript SDK
6. YouTube
HTTPSGETyoutube.com
YouTube iframe
{“email”: “xyz”,“profile_id”: 123}
7. Start recording
API Gateway w/Lambda
Responds with S3 upload token
HTTPSGET/recordings/token
Uploads directly to S3 bucket over HTTPS using token
6.
7. 8.
HTTPSPOSTbucket.s3.amazon/UID/recording-X.mp3
8. Upload recording
![Page 47: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/47.jpg)
@parallax
Page lifecycle
Serverless Applications on AWS
9. Submit details
API Gateway w/Lambda
10. Artwork gen
HTTPSPOST/users/generate_artwork
API Gateway w/Lambda.Create image, put on S3, return S3 image URL
11. Artwork display
CloudFront w/ S3
HTTPSGET/domain.com/UID.png
AddThis.js is populated with the share texts, and includes the S3 URL
HTTPGETaddthis.com/file.js
HTTPSPOST/users/update
{ url: “domain.com/UID.png” }
10. 11.
12. Social share 13. Social share
HTTPSGEThttps://twitter.com/intent/tweet?text=XYZ
12. 13.
Directly hits the social media service
![Page 48: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/48.jpg)
@parallax Serverless Applications on AWS
![Page 49: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/49.jpg)
@parallax Serverless Applications on AWS
![Page 50: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/50.jpg)
Chelsea FC / Delta
@parallax@parallax Serverless Applications on AWS
![Page 51: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/51.jpg)
@parallax
![Page 52: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/52.jpg)
Deployment
@parallax@parallax Serverless Applications on AWS
![Page 53: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/53.jpg)
@parallax Serverless Applications on AWS
![Page 54: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/54.jpg)
@parallax Serverless Applications on AWS
![Page 55: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/55.jpg)
The Future? GraphQL
@parallax@parallax Serverless Applications on AWS
![Page 56: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/56.jpg)
@parallax@parallax
![Page 57: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/57.jpg)
@parallax@parallax
{ user(id: 3500401) { id, name, isViewerFriend, profilePicture(size: 50) { uri, width, height } }}
![Page 58: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/58.jpg)
@parallax@parallax
{ "user" : { "id": 3500401, "name": "Jing Chen", "isViewerFriend": true, "profilePicture": { "uri": "http://someurl.cdn/pic.jpg", "width": 50, "height": 50 } }}
![Page 59: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/59.jpg)
@parallax Serverless Applications on AWS
Some sequences may have been shortened.
![Page 60: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/60.jpg)
@parallax Serverless Applications on AWS
![Page 61: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/61.jpg)
@parallax Serverless Applications on AWS
![Page 62: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/62.jpg)
@parallax Serverless Applications on AWS
![Page 63: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/63.jpg)
@parallax Serverless Applications on AWS
![Page 64: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/64.jpg)
@parallax Serverless Applications on AWS
![Page 65: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/65.jpg)
@parallax Serverless Applications on AWS
![Page 66: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/66.jpg)
Build small apps to help your DevOps
@parallax@parallax Serverless Applications on AWS
![Page 67: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/67.jpg)
One more thing
@parallax@parallax Serverless Applications on AWS
![Page 68: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/68.jpg)
@parallax Serverless Applications on AWS
![Page 69: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/69.jpg)
@parallax Serverless Applications on AWS
![Page 70: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/70.jpg)
Summary and Next Steps
![Page 71: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/71.jpg)
Summary
Utilise Platform Level Services that have built in HA
Use a microservice approach
Use a common interface for services such as RESTful APIs
Store static files in Amazon S3
Use AWS Lambda as the glue between AWS services
![Page 72: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/72.jpg)
Next Steps
Sign up for an AWS Account
Try out a new server-less service
Make use of AWS Forums and Support
Come and meet an architect at the loft
Check out aws.amazon.com for more information
![Page 74: Serverless Apps on AWS](https://reader033.fdocuments.in/reader033/viewer/2022061307/5880ac361a28abf32c8b5725/html5/thumbnails/74.jpg)
Thank You
@deanbryen
Dean Bryen - Solutions Architect - AWS James Hall - Co-Founder - Parallax
@parallax