Lê Thanh Sang
Senior Developer at GO1
Getting Started with
Serverless Architectures
November 19, 2016
1. Welcome
2. What is Serverless? Benefits of Serverless?
4. Demo: Building note application
5. Q&A
Meetup Agenda
Who Am I?
 A husband
 Working for GO1 from 2013 as Senior Developer
 Current leading the iTeams (Integrations &
Infrastructure)
 About GO1: “We help hundreds of organizations
provide training for over 150,000 users”
www.go1.com
What is Serverless?
Provisioning
and Utilization
Operations
and Management
Scaling Availability and
Fault Tolerance
Removes the need for….
Benefits of Serverless?
Provisioning
and Utilization
Operations
and Management
Scaling Availability and
Fault Tolerance
Which leads to….
Low Cost Simple Low Latency Scalable Reliable
Platform of Serverless Products
Storage DatabaseCompute
Messaging and QueuesGateways
User Management
Internet of Things
Machine LearningStreaming Analytics
Real-time Processing
Streams
Files
ETL (Extract, Transform, Load)
IoT Backends
Web Application Serverless Architecture
Anatomy of a Web Application
What makes up a web application?
• Let’s break it down…
Serverless Web Application
Where did all the servers go?
Static Website Hosting on S3 - refresher
 Specify an index document (i.e. index.html)
 Specify an error document
 Objects publicly readable
 Supports redirects
 All Requests
 Conditional
bucket with
objects
API Gateway - refresher
Create Configure Publish
Maintain Monitor Secure
API Gateway – Stage Variables
 Key/Value pairs used for configuration
 Used for different stages of API
 Specify a Lambda function name
 Pass to backend
Lambda
 Serverless, event-driven compute
 Code is: NodeJS, Python, JVM based
 Specify memory allocated
 Determine what invokes the functions
 API Gateway, S3, DynamoDB, Kinesis, SNS, SES, Cognito,
Cloudwatch Logs, Cloudwatch Events, CloudFormation,
Config, Scheduled Events
Lambda – Versioning and Aliases
• Versioning
 ARN for each one (immutable)
 Versions of functions for Dev, Staging, Prod
• Aliases
 Point to a version
 Have an ARN also
 Event sources point to Alias ARNs
Lambda – Dynamic Configuration
• One option:
 Pull Configs from DDB
 Write values to global vars
 Code uses global vars
Lambda
Function
Amazon
DynamoDB
DynamoDB - refresher
 NoSQL database
 Keys: Hash Key and (optional) Range Key
 Tips:
 Plan your keys
 Think about your queries
Demo
(https://github.com/sanglt/aws-
serverless-note-demo)
Demo App Architecture
AWS Lambda
Functions
web browser
Amazon S3
Dynamic Content
StaticContent
Amazon
DynamoDB
Amazon API
Gateway
1
Architect to be Serverless
• Fully Managed
 No provisioning
 Zero administration
 High availability
• Developer Productivity
 Focus on the code that
matters
 Innovate rapidly
 Reduce time to market
• Continuous Scaling
 Automatically
 Scale up and scale down
References
• http://www.slideshare.net/AmazonWebServices/
getting-started-with-serverless-architectures-
august-2016-monthly-webinar-series
• https://github.com/serverless/serverless
• http://docs.aws.amazon.com/amazondynamodb/l
atest/gettingstartedguide/GettingStarted.NodeJs.
html
Q&A
Thank You
Meetup: www.meetup.com/aws-vn/
FB: www.facebook.com/groups/amazonwebservicevietnam
Join Slack: https://aws-vn.herokuapp.com/

Cloudsolutionday 2016: Getting Started with Severless Architecture