© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Getting Started with Serverless
Computing Using AWS Lambda
Burak ÜNÜVAR
AWS Account Manager, SA Pro
• Compute Evolution : Monolith to Microservices
• Use Cases and References
• Intro to AWS Lambda with Demonstrations
• Pricing and Limits
• Serverless Frameworks and Monitoring
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
CORE SERVICES
Integrated Networking
Rules Engine
Device Shadows
Device SDKs
Device Gateway
Registry
Local Compute
Custom Model
Training & Hosting
Conversational Chatbots
Virtual Desktops
App Streaming
Schema Conversion
Image & Scene
Recognition
Sharing &
Collaboration
Exabyte-Scale
Data Migration
Text to Speech
Corporate Email Application Migration
Database Migration
Regions
Availability Zones
Points of Presence
Data Warehousing
Business Intelligence
Elasticsearch
Hadoop/Spark
Data Pipelines
Streaming Data
Collection
ETL
Streaming Data
Analysis
Interactive SQL
Queries
Queuing & Notifications
Workflow
Email
Transcoding
Deep Learning
(Apache MXNet,
TensorFlow, & others)
Server MigrationCommunications
MARKETPLACE
Business Apps Business Intelligence DevOps Tools Security Networking StorageDatabases
API Gateway
Single Integrated
Console
Identity
Sync
Mobile Analytics
Mobile App Testing
Targeted Push
Notifications
One-click App
Deployment
DevOps Resource
Management
Application Lifecycle
Management
Containers
Triggers
Resource Templates
Build & Test
Analyze & Debug
Identity
Management
Key Management
& Storage
Monitoring &
Logs
Configuration
Compliance
Web Application
Firewall
Assessment
& Reporting
Resource & Usage
Auditing
Access Control
Account
Grouping
DDOS
Protection
TECHNICAL & BUSINESS SUPPORT
Support
Professional
Services
Optimization
Guidance
Partner
Ecosystem
Training &
Certification
Solutions Management Account Management
Security & Billing
Reports
Personalized
Dashboard
Monitoring
Manage
Resources
Data Integration
Integrated Identity &
Access
Integrated Resource &
Deployment Management
Integrated Devices
& Edge Systems
Resource
Templates
Configuration
Tracking
Server
Management
Service
Catalogue
Search
MIGRATIONHYBRID ARCHITECTUREENTERPRISE APPSMACHINE LEARNINGIoTMOBILE SERVICESDEV OPSANALYTICS
APP SERVICES
INFRASTRUCTURE SECURITY & COMPLIANCE MANAGEMENT TOOLS
Compute
VMs, Auto-scaling, Load
Balancing, Containers,
Virtual Private Servers,
Batch Computing, Cloud
Functions,Elastic GPUs,
Edge Computing
Storage
Object, Blocks,File, Archivals,
Import/Export, Exabyte-scale
data transfer
CDN
Databases
Relational, NoSQL,
Caching, Migration,
PostgreSQL compatible
Networking
VPC, DX, DNS
Facial Recognition &
Analysis
Facial Search
Patching
Contact Center
M OST ROBUST, FULLY FEATURED TEC H NOLOGY INFRASTRUC TURE PLATFORM
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Serverless is an operational model that spans many
different categories of services
AWS
Lambda
AWS
Fargate
Amazon
API Gateway
Amazon
SNS
Amazon
SQS
AWS
Step Functions
COMPUTE
DATA STORES
INTEGRATION
Amazon
Aurora
Serverless
Amazon
S3
Amazon
DynamoDB
AWS
AppSync
*** Continuous scaling *** Fault tolerance built-in *** Event-driven *** Pay per usage *** Zero maintenance
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Computing evolution – A paradigm shift
FOCUS ON BUSINESS LOGIC
LEVELOFABSTRACTION
Virtual Servers
in Datacenters
Virtual Servers
in Datacenters
Physical Machines
Virtual Machines
Containerization
AWS Lambda
AWS Fargate
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
When the impact of change is small,
release velocity can increase
Monolith
Does everything
Microservices
Does one thing
• API driven request response
patterns
• Event driven patterns
• Data streaming patterns
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Development transformation at Amazon: 2001–2002
monolithic application
+ teams
2001
Lesson learned: decompose for agility
2002
microservices
+ 2 pizza teams
• Full ownership
• Full accountability
• “DevOps”
• Focused innovation
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Common serverless 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.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Sample Use Case 1 : REAL-TIME FILE PROCESSING
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Sample Use Case 2 : STREAM PROCESSING
Reference Architecture: Sample code
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Sample Use Case 3 : MOBILE AND WEB APPLICATIONS
Reference Architecture: Sample code
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
AWS customers are pioneer ing modern
applicat ions
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
SERVICES (ANYTHING)
Changes in
data state
Requests to
endpoints
Changes in
resource state
EVENT SOURCE FUNCTION
Node.js
Python
Java
C#
Go (coming soon)
Using AWS Lambda
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Demo 1 : Welcome to Amazon 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
• Timeout up to 15min
Flexible use
• Synchronous or
asynchronous
• Integrated with other
AWS services
Event Sources and Logs
• Amazon S3, API
Gateway, DynamoDB...
• Cloudwatch and logs
• Layers
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Fine-grained pricing : Never pay for idle
Buy compute time in 100ms increments
Low request charge
No hourly, daily, or monthly minimums
No per-device fees
Free Tier
1M requests and 400,000 GB of compute.
Every month, every customer.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
AWS Lambda Limits
Memory Size : 128 MB to 3,008 MB, in 64 MB increments.
Ephemeral Disk Capacity : 512 MB
Timeout : 900 seconds or 15 Minutes
Concurrent executions : 1000
Deployment Packagesize : 50MB zip, 250MB unzipped, 3MB via c9
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
https://docs.aws.amazon.com/lambda/latest/dg/limits.html
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Demo 2 : Intro to Amazon API Gateway
https://aws.amazon.com/getting-started/projects/build-serverless-web-app-lambda-apigateway-s3-
dynamodb-cognito/
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Demo 3 : Using AWS Lambda with Amazon S3
https://docs.aws.amazon.com/lambda/latest/dg/with-s3.html
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
AWS Serverless Application Model (AWS SAM)
Template-driven resource management model
optimized for serverless
New serverless resource types: Functions, APIs,
and tables
Supports anything AWS CloudFormation
supports
Open specification (Apache 2.0)
https://github.com/awslabs/serverless-application-model
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Useful Frameworks
Chalice
https://serverless.com/framework/docs/providers/aws/guide/intro/
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
AWS X-Ray is Built for Modern Applications
Analyze and debug
issues quickly
End-to-end view of
individual services
Identify customer
impact
Support for
Serverless
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Serverless Observability with Thundra
● Tricky: Understanding the async structure of serverless environments.
● Hard: Reduce the MTTR in serverless environments.
● Impossible: To use the already existing APM for Lambda because they’re
not lightweight.
Thundra aims to resolve the issues below by
providing light-weight libraries in Java, Node.js,
Python, .NET, and Go. With Thundra, you can
both have an overall idea in the most complex
architecture and have the power of debugging the
code even line-by-line. Plug it with Lambda
Layers and using well-known deployment tools.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Thank you very
much for listening!
For demos : https://github.com/burakunuvar/aws-lambda-webinar

Aws lambda webinar -buraku

  • 1.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Getting Started with Serverless Computing Using AWS Lambda Burak ÜNÜVAR AWS Account Manager, SA Pro • Compute Evolution : Monolith to Microservices • Use Cases and References • Intro to AWS Lambda with Demonstrations • Pricing and Limits • Serverless Frameworks and Monitoring
  • 2.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark CORE SERVICES Integrated Networking Rules Engine Device Shadows Device SDKs Device Gateway Registry Local Compute Custom Model Training & Hosting Conversational Chatbots Virtual Desktops App Streaming Schema Conversion Image & Scene Recognition Sharing & Collaboration Exabyte-Scale Data Migration Text to Speech Corporate Email Application Migration Database Migration Regions Availability Zones Points of Presence Data Warehousing Business Intelligence Elasticsearch Hadoop/Spark Data Pipelines Streaming Data Collection ETL Streaming Data Analysis Interactive SQL Queries Queuing & Notifications Workflow Email Transcoding Deep Learning (Apache MXNet, TensorFlow, & others) Server MigrationCommunications MARKETPLACE Business Apps Business Intelligence DevOps Tools Security Networking StorageDatabases API Gateway Single Integrated Console Identity Sync Mobile Analytics Mobile App Testing Targeted Push Notifications One-click App Deployment DevOps Resource Management Application Lifecycle Management Containers Triggers Resource Templates Build & Test Analyze & Debug Identity Management Key Management & Storage Monitoring & Logs Configuration Compliance Web Application Firewall Assessment & Reporting Resource & Usage Auditing Access Control Account Grouping DDOS Protection TECHNICAL & BUSINESS SUPPORT Support Professional Services Optimization Guidance Partner Ecosystem Training & Certification Solutions Management Account Management Security & Billing Reports Personalized Dashboard Monitoring Manage Resources Data Integration Integrated Identity & Access Integrated Resource & Deployment Management Integrated Devices & Edge Systems Resource Templates Configuration Tracking Server Management Service Catalogue Search MIGRATIONHYBRID ARCHITECTUREENTERPRISE APPSMACHINE LEARNINGIoTMOBILE SERVICESDEV OPSANALYTICS APP SERVICES INFRASTRUCTURE SECURITY & COMPLIANCE MANAGEMENT TOOLS Compute VMs, Auto-scaling, Load Balancing, Containers, Virtual Private Servers, Batch Computing, Cloud Functions,Elastic GPUs, Edge Computing Storage Object, Blocks,File, Archivals, Import/Export, Exabyte-scale data transfer CDN Databases Relational, NoSQL, Caching, Migration, PostgreSQL compatible Networking VPC, DX, DNS Facial Recognition & Analysis Facial Search Patching Contact Center M OST ROBUST, FULLY FEATURED TEC H NOLOGY INFRASTRUC TURE PLATFORM
  • 3.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark Serverless is an operational model that spans many different categories of services AWS Lambda AWS Fargate Amazon API Gateway Amazon SNS Amazon SQS AWS Step Functions COMPUTE DATA STORES INTEGRATION Amazon Aurora Serverless Amazon S3 Amazon DynamoDB AWS AppSync *** Continuous scaling *** Fault tolerance built-in *** Event-driven *** Pay per usage *** Zero maintenance
  • 4.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark Computing evolution – A paradigm shift FOCUS ON BUSINESS LOGIC LEVELOFABSTRACTION Virtual Servers in Datacenters Virtual Servers in Datacenters Physical Machines Virtual Machines Containerization AWS Lambda AWS Fargate
  • 5.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark When the impact of change is small, release velocity can increase Monolith Does everything Microservices Does one thing • API driven request response patterns • Event driven patterns • Data streaming patterns
  • 6.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark Development transformation at Amazon: 2001–2002 monolithic application + teams 2001 Lesson learned: decompose for agility 2002 microservices + 2 pizza teams • Full ownership • Full accountability • “DevOps” • Focused innovation
  • 7.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark Common serverless 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.
  • 8.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark Sample Use Case 1 : REAL-TIME FILE PROCESSING
  • 9.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark Sample Use Case 2 : STREAM PROCESSING Reference Architecture: Sample code
  • 10.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark Sample Use Case 3 : MOBILE AND WEB APPLICATIONS Reference Architecture: Sample code
  • 11.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark AWS customers are pioneer ing modern applicat ions
  • 12.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark SERVICES (ANYTHING) Changes in data state Requests to endpoints Changes in resource state EVENT SOURCE FUNCTION Node.js Python Java C# Go (coming soon) Using AWS Lambda
  • 13.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Demo 1 : Welcome to Amazon 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 • Timeout up to 15min Flexible use • Synchronous or asynchronous • Integrated with other AWS services Event Sources and Logs • Amazon S3, API Gateway, DynamoDB... • Cloudwatch and logs • Layers
  • 14.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark Fine-grained pricing : Never pay for idle Buy compute time in 100ms increments Low request charge No hourly, daily, or monthly minimums No per-device fees Free Tier 1M requests and 400,000 GB of compute. Every month, every customer. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 15.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark AWS Lambda Limits Memory Size : 128 MB to 3,008 MB, in 64 MB increments. Ephemeral Disk Capacity : 512 MB Timeout : 900 seconds or 15 Minutes Concurrent executions : 1000 Deployment Packagesize : 50MB zip, 250MB unzipped, 3MB via c9 © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. https://docs.aws.amazon.com/lambda/latest/dg/limits.html
  • 16.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Demo 2 : Intro to Amazon API Gateway https://aws.amazon.com/getting-started/projects/build-serverless-web-app-lambda-apigateway-s3- dynamodb-cognito/
  • 17.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Demo 3 : Using AWS Lambda with Amazon S3 https://docs.aws.amazon.com/lambda/latest/dg/with-s3.html
  • 18.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark AWS Serverless Application Model (AWS SAM) Template-driven resource management model optimized for serverless New serverless resource types: Functions, APIs, and tables Supports anything AWS CloudFormation supports Open specification (Apache 2.0) https://github.com/awslabs/serverless-application-model
  • 19.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark Useful Frameworks Chalice https://serverless.com/framework/docs/providers/aws/guide/intro/
  • 20.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark AWS X-Ray is Built for Modern Applications Analyze and debug issues quickly End-to-end view of individual services Identify customer impact Support for Serverless
  • 21.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark Serverless Observability with Thundra ● Tricky: Understanding the async structure of serverless environments. ● Hard: Reduce the MTTR in serverless environments. ● Impossible: To use the already existing APM for Lambda because they’re not lightweight. Thundra aims to resolve the issues below by providing light-weight libraries in Java, Node.js, Python, .NET, and Go. With Thundra, you can both have an overall idea in the most complex architecture and have the power of debugging the code even line-by-line. Plug it with Lambda Layers and using well-known deployment tools.
  • 22.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark Thank you very much for listening! For demos : https://github.com/burakunuvar/aws-lambda-webinar