© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. SSID: Guest Password: Cube@11999 Introduction to Serverless on AWS Boaz Ziniman Technical Evangelist, Amazon Web Service @ziniman boaz.ziniman.aws
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Floor28 Agenda GameDay 24 Oct Enterprise IT Day 23 Oct Builders Day AppSync, Alexa & IoT 22 Oct Big Data Day 14 Oct ML & DL Day 15 Oct DevOps Day 16 Oct DevOps Day 17 Oct Technical Sessions Serverless Data Workshop Big Data UG Meetup Technical Sessions SageMaker Workshop ML&DL Meetup Technical Sessions K8s Workshop DevOps Meetup Technical Sessions Spot Workshop Databases Day 18 Oct Technical Sessions Serverless Workshop Virtual assistants UG Meetup Technical Sessions PyTorch Meetup Technical Sessions CDK Workshop AWS IL UG Meetup Builders Day Serverless backend 21 Oct Technical Sessions
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Agenda • From Monolith to Microservices • The Evolution of Servers • AWS Lambda • Serverless beyond Lambda
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. From Monolith to Microservice
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. “The Monolith”
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Challenges with monolithic software Long Build/Test/Release Cycles (who broke the build?) Operations is a nightmare (module X is failing, who’s the owner?) Difficult to scale New releases take months Long time to add new features Architecture is hard to maintain and evolve Lack of innovation Frustrated customers Lack of agility
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Monolith development lifecycle releasetestbuild delivery pipeline App (aka the “monolith”)developers
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Too much software coupling Shared libraries Shared data
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Evolving towards microservices “IMG_1760” by Robert Couse-Baker. No alterations other than cropping. https://www.flickr.com/photos/29233640@N07/14859431605/ Image used with permissions under Creative Commons license 2.0, Attribution Generic License (https://creativecommons.org/licenses/by/2.0/)
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Servers Which users should have access to my servers? How should m y app withstand a server failing? How will the application handle server hardware failure? How many servers should I budget for? How many users create too much load for my servers? How can I increase utilization of my servers? How can I control access from my servers? W hat size server is right for m y perform ance? When should I decide to scale out my servers? When should I decide to scale up my servers? How will I keep my server OS patched? Which OS should my servers run? Should I tune OS settings to optimize my application? What size servers are right for my budget? How can I tell if a server has been compromised? Which packages should be baked into my server images? How will new code be deployed to my servers? How should I implement dynamic configuration changes on my servers How much remaining capacity do my servers have? (AAHHHHHHHHH!!)
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Let’s take a look at the evolution of computing Physical Servers Datacenters Virtual Servers Datacenters Virtual Servers in the cloud
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Physical Servers Datacenters Virtual Servers Datacenters • Higher utilization • Faster provisioning speed • Improved uptime • Disaster recovery • Hardware independence • Trade CAPEX for OPEX • More scale • Elastic resources • Faster speed and agility • Reduced maintenance • Better availability and fault tolerance Each progressive step was better Virtual Servers in the cloud
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. But there are still limitations Physical Servers Datacenters Virtual Servers Datacenters • Trade CAPEX for OPEX • More scale • Elastic resources • Faster speed and agility • Reduced maintenance • Better availability and fault tolerance • Still need to administer virtual servers • Still need to manage capacity and utilization • Still need to size workloads • Still need to manage availability, fault tolerance • Still expensive to run intermittent jobs Virtual Servers in the cloud
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Evolving to Serverless SERVERLESS Virtual servers in the cloud Physical servers in datacenters Virtual servers in datacenters
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. No server is easier to manage than any server All of these responsibilities go away Provisioning and utilization Availability and fault tolerance Scaling Operations and management
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Serverless with AWS Lambda
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Deliver on demand, never pay for idle EVENT DRIVEN CONTINUOUS SCALING PAY BY USAGE
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Benefits of Lambda and serverless compute No Server Management Flexible Scaling No Idle Capacity $ High Availability
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. How it works?
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Using AWS Lambda Bring your own code • Node.js, Java, Python, C#, .Net Core 2.0, GO • Bring your own libraries (even native ones) Simple resource model • Select power rating from 128 MB to 3 GB • CPU and network allocated proportionately Flexible use • Synchronous or asynchronous • Integrated with other AWS services Flexible authorization • Securely grant access to resources and VPCs • Fine-grained control for invoking your functions
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Using AWS Lambda Authoring functions • WYSIWYG editor or upload packaged .zip • Third-party plugins (Eclipse, Visual Studio) Monitoring and logging • Metrics for requests, errors, and throttles • Built-in logs to Amazon CloudWatch Logs Programming model • Use processes, threads, /tmp, sockets normally • AWS SDK built in (Python and Node.js) Stateless • Persist data using external storage • No affinity or access to underlying infrastructure
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon S3 Amazon DynamoDB Amazon Kinesis AWS CloudFormation AWS CloudTrail Amazon CloudWatch Amazon Cognito Amazon SNSAmazon SES Cron events DATA STORES ENDPOINTS CONFIGURATION REPOSITORIES EVENT/MESSAGE SERVICES Example event sources that trigger AWS Lambda … and a few more with more on the way! AWS CodeCommit Amazon API Gateway Amazon Alexa AWS IoT AWS Step Functions
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Use cases
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Common 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
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Customers innovating with serverless
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Demo
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. IoT – Click to Website MQTT AWS IoT Static S3 Site Read SMS Amazon CloudFront Read/ WriteLambda API GAteway Lambda DynamoDB
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. http://bit.ly/OneClickIoT
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Serverless beyond Lambda
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Additional Services Amazon S3 Amazon DynamoDB Amazon Kinesis Amazon Cognito Amazon IoT Amazon CloudWatch Amazon SES Amazon SNSAmazon API Gateway …and more! Amazon Rekognition Amazon Polly Amazon QuickSight Amazon Athena AWS Fargate Amazon Aurora Serverless
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Thank You! Boaz Ziniman Technical Evangelist, Amazon Web Service Give me feedback – Talk to my Bot m.me/boaz.ziniman.aws @ziniman boaz.ziniman.aws
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. SSID: Guest Password: Cube@11999 GAME DAY PUT YOUR SKILLS TO THE TEST OCT 24 Register now: bit.ly/Floor28GameDay

Introduction to Serverless computing and AWS Lambda - Floor28

  • 1.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. SSID: Guest Password: Cube@11999 Introduction to Serverless on AWS Boaz Ziniman Technical Evangelist, Amazon Web Service @ziniman boaz.ziniman.aws
  • 2.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Floor28 Agenda GameDay 24 Oct Enterprise IT Day 23 Oct Builders Day AppSync, Alexa & IoT 22 Oct Big Data Day 14 Oct ML & DL Day 15 Oct DevOps Day 16 Oct DevOps Day 17 Oct Technical Sessions Serverless Data Workshop Big Data UG Meetup Technical Sessions SageMaker Workshop ML&DL Meetup Technical Sessions K8s Workshop DevOps Meetup Technical Sessions Spot Workshop Databases Day 18 Oct Technical Sessions Serverless Workshop Virtual assistants UG Meetup Technical Sessions PyTorch Meetup Technical Sessions CDK Workshop AWS IL UG Meetup Builders Day Serverless backend 21 Oct Technical Sessions
  • 3.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Agenda • From Monolith to Microservices • The Evolution of Servers • AWS Lambda • Serverless beyond Lambda
  • 4.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. From Monolith to Microservice
  • 5.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. “The Monolith”
  • 6.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Challenges with monolithic software Long Build/Test/Release Cycles (who broke the build?) Operations is a nightmare (module X is failing, who’s the owner?) Difficult to scale New releases take months Long time to add new features Architecture is hard to maintain and evolve Lack of innovation Frustrated customers Lack of agility
  • 7.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Monolith development lifecycle releasetestbuild delivery pipeline App (aka the “monolith”)developers
  • 8.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Too much software coupling Shared libraries Shared data
  • 9.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Evolving towards microservices “IMG_1760” by Robert Couse-Baker. No alterations other than cropping. https://www.flickr.com/photos/29233640@N07/14859431605/ Image used with permissions under Creative Commons license 2.0, Attribution Generic License (https://creativecommons.org/licenses/by/2.0/)
  • 10.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 11.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 12.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Servers Which users should have access to my servers? How should m y app withstand a server failing? How will the application handle server hardware failure? How many servers should I budget for? How many users create too much load for my servers? How can I increase utilization of my servers? How can I control access from my servers? W hat size server is right for m y perform ance? When should I decide to scale out my servers? When should I decide to scale up my servers? How will I keep my server OS patched? Which OS should my servers run? Should I tune OS settings to optimize my application? What size servers are right for my budget? How can I tell if a server has been compromised? Which packages should be baked into my server images? How will new code be deployed to my servers? How should I implement dynamic configuration changes on my servers How much remaining capacity do my servers have? (AAHHHHHHHHH!!)
  • 13.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Let’s take a look at the evolution of computing Physical Servers Datacenters Virtual Servers Datacenters Virtual Servers in the cloud
  • 14.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Physical Servers Datacenters Virtual Servers Datacenters • Higher utilization • Faster provisioning speed • Improved uptime • Disaster recovery • Hardware independence • Trade CAPEX for OPEX • More scale • Elastic resources • Faster speed and agility • Reduced maintenance • Better availability and fault tolerance Each progressive step was better Virtual Servers in the cloud
  • 15.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. But there are still limitations Physical Servers Datacenters Virtual Servers Datacenters • Trade CAPEX for OPEX • More scale • Elastic resources • Faster speed and agility • Reduced maintenance • Better availability and fault tolerance • Still need to administer virtual servers • Still need to manage capacity and utilization • Still need to size workloads • Still need to manage availability, fault tolerance • Still expensive to run intermittent jobs Virtual Servers in the cloud
  • 16.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Evolving to Serverless SERVERLESS Virtual servers in the cloud Physical servers in datacenters Virtual servers in datacenters
  • 17.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. No server is easier to manage than any server All of these responsibilities go away Provisioning and utilization Availability and fault tolerance Scaling Operations and management
  • 18.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Serverless with AWS Lambda
  • 19.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Deliver on demand, never pay for idle EVENT DRIVEN CONTINUOUS SCALING PAY BY USAGE
  • 20.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Benefits of Lambda and serverless compute No Server Management Flexible Scaling No Idle Capacity $ High Availability
  • 21.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. How it works?
  • 22.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Using AWS Lambda Bring your own code • Node.js, Java, Python, C#, .Net Core 2.0, GO • Bring your own libraries (even native ones) Simple resource model • Select power rating from 128 MB to 3 GB • CPU and network allocated proportionately Flexible use • Synchronous or asynchronous • Integrated with other AWS services Flexible authorization • Securely grant access to resources and VPCs • Fine-grained control for invoking your functions
  • 23.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Using AWS Lambda Authoring functions • WYSIWYG editor or upload packaged .zip • Third-party plugins (Eclipse, Visual Studio) Monitoring and logging • Metrics for requests, errors, and throttles • Built-in logs to Amazon CloudWatch Logs Programming model • Use processes, threads, /tmp, sockets normally • AWS SDK built in (Python and Node.js) Stateless • Persist data using external storage • No affinity or access to underlying infrastructure
  • 24.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Amazon S3 Amazon DynamoDB Amazon Kinesis AWS CloudFormation AWS CloudTrail Amazon CloudWatch Amazon Cognito Amazon SNSAmazon SES Cron events DATA STORES ENDPOINTS CONFIGURATION REPOSITORIES EVENT/MESSAGE SERVICES Example event sources that trigger AWS Lambda … and a few more with more on the way! AWS CodeCommit Amazon API Gateway Amazon Alexa AWS IoT AWS Step Functions
  • 25.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Use cases
  • 26.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Common 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
  • 27.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Customers innovating with serverless
  • 28.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 29.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Demo
  • 30.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. IoT – Click to Website MQTT AWS IoT Static S3 Site Read SMS Amazon CloudFront Read/ WriteLambda API GAteway Lambda DynamoDB
  • 31.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. http://bit.ly/OneClickIoT
  • 32.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Serverless beyond Lambda
  • 33.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Additional Services Amazon S3 Amazon DynamoDB Amazon Kinesis Amazon Cognito Amazon IoT Amazon CloudWatch Amazon SES Amazon SNSAmazon API Gateway …and more! Amazon Rekognition Amazon Polly Amazon QuickSight Amazon Athena AWS Fargate Amazon Aurora Serverless
  • 34.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Thank You! Boaz Ziniman Technical Evangelist, Amazon Web Service Give me feedback – Talk to my Bot m.me/boaz.ziniman.aws @ziniman boaz.ziniman.aws
  • 35.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. SSID: Guest Password: Cube@11999 GAME DAY PUT YOUR SKILLS TO THE TEST OCT 24 Register now: bit.ly/Floor28GameDay