Cloudsolutionday 2016: Getting Started with Severless Architecture

28
Lê Thanh Sang Senior Developer at GO1 Getting Started with Serverless Architectures November 19, 2016

Transcript of Cloudsolutionday 2016: Getting Started with Severless Architecture

Page 1: Cloudsolutionday 2016: Getting Started with Severless Architecture

Lê Thanh SangSenior Developer at GO1

Getting Started with Serverless Architectures

November 19, 2016

Page 2: Cloudsolutionday 2016: Getting Started with Severless Architecture

1. Welcome2. What is Serverless? Benefits of Serverless? 4. Demo: Building note application 5. Q&A

Meetup Agenda

Page 3: Cloudsolutionday 2016: Getting Started with Severless Architecture

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

Page 4: Cloudsolutionday 2016: Getting Started with Severless Architecture

What is Serverless?

Provisioning

and Utilization

Operations

and Management

Scaling Availability and

Fault Tolerance

Removes the need for….

Page 5: Cloudsolutionday 2016: Getting Started with Severless Architecture

Benefits of Serverless?

Provisioning

and Utilization

Operations

and Management

Scaling Availability and

Fault Tolerance

Which leads to….

Low Cost Simple Low Latency Scalable Reliable

Page 6: Cloudsolutionday 2016: Getting Started with Severless Architecture

Platform of Serverless Products

Storage DatabaseCompute

Messaging and QueuesGateways

User Management

Internet of Things

Machine LearningStreaming Analytics

Page 7: Cloudsolutionday 2016: Getting Started with Severless Architecture

Real-time Processing

Streams

Files

Page 8: Cloudsolutionday 2016: Getting Started with Severless Architecture

ETL (Extract, Transform, Load)

Page 9: Cloudsolutionday 2016: Getting Started with Severless Architecture

IoT Backends

Page 10: Cloudsolutionday 2016: Getting Started with Severless Architecture

Web Application Serverless Architecture

Page 11: Cloudsolutionday 2016: Getting Started with Severless Architecture

Anatomy of a Web Application

Page 12: Cloudsolutionday 2016: Getting Started with Severless Architecture

What makes up a web application?

• Let’s break it down…

Page 13: Cloudsolutionday 2016: Getting Started with Severless Architecture

Serverless Web Application

Page 14: Cloudsolutionday 2016: Getting Started with Severless Architecture

Where did all the servers go?

Page 15: Cloudsolutionday 2016: Getting Started with Severless Architecture

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

Page 16: Cloudsolutionday 2016: Getting Started with Severless Architecture

API Gateway - refresher

Create Configure Publish

Maintain Monitor Secure

Page 17: Cloudsolutionday 2016: Getting Started with Severless Architecture

API Gateway – Stage Variables

Key/Value pairs used for configuration Used for different stages of API Specify a Lambda function name Pass to backend

Page 18: Cloudsolutionday 2016: Getting Started with Severless Architecture

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

Page 19: Cloudsolutionday 2016: Getting Started with Severless Architecture

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

Page 20: Cloudsolutionday 2016: Getting Started with Severless Architecture

Lambda – Dynamic Configuration

• One option:

Pull Configs from DDB Write values to global vars Code uses global vars

Lambda Function

Amazon DynamoDB

Page 21: Cloudsolutionday 2016: Getting Started with Severless Architecture

DynamoDB - refresher

NoSQL database Keys: Hash Key and (optional) Range Key Tips:

Plan your keys Think about your queries

Page 22: Cloudsolutionday 2016: Getting Started with Severless Architecture

Demo(https://github.com/sanglt/aws-

serverless-note-demo)

Page 23: Cloudsolutionday 2016: Getting Started with Severless Architecture

Demo App Architecture

AWS Lambda

Functionsweb browser

Amazon S3

Dynamic Content

Sta

tic C

onte

nt

Amazon DynamoDB

Amazon API Gateway

1

Page 24: Cloudsolutionday 2016: Getting Started with Severless Architecture

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

Page 26: Cloudsolutionday 2016: Getting Started with Severless Architecture

Q&A

Page 27: Cloudsolutionday 2016: Getting Started with Severless Architecture

Thank You

Page 28: Cloudsolutionday 2016: Getting Started with Severless Architecture

Meetup: www.meetup.com/aws-vn/

FB: www.facebook.com/groups/amazonwebservicevietnam

Join Slack: https://aws-vn.herokuapp.com/