Slide 1

Slide 1 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Danilo Poccia Principal Evangelist, Serverless @danilop What Can You Do with Serverless …in 2020 ? © 2020, Amazon Web Services, Inc. or its Affiliates. Danilo Poccia Principal Evangelist, Serverless @danilop What Can You Do with Serverless …in 2020 ?

Slide 2

Slide 2 text

© 2020, Amazon Web Services, Inc. or its Affiliates. © 2020, Amazon Web Services, Inc. or its Affiliates. https://danilop.net https://github.com/danilop/danilop-personal-page

Slide 3

Slide 3 text

© 2020, Amazon Web Services, Inc. or its Affiliates. How does Serverless work? Storage Databases Analytics Machine Learning . . . Your unique business logic User uploads a picture Customer data updated Anomaly detected API call . . . Fully-managed services Events Functions

Slide 4

Slide 4 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Serverless in December 2014… and the first half of 2015 Thumbnails Generators! S3 Bucket Lambda Function S3 Bucket

Slide 5

Slide 5 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Serverless in the first half of 2015 Static Content Generators! S3 Bucket Lambda Function S3 Bucket

Slide 6

Slide 6 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Serverless in the first half of 2015 Dynamic Websites & Apps! Browser JavaScript DynamoDB Table S3 Bucket Lambda Function AWS SDK Lambda Invoke

Slide 7

Slide 7 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Serverless in the second half of 2015… and later on! APIs! ”Alexa!” & IoT Microservices DevOps Browser Web APIs Amazon Echo IoT Devices Services Data Streams DynamoDB Table S3 Bucket Lambda Function API Gateway Schedule

Slide 8

Slide 8 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Over the years, customers shared some concerns… New Paradigm Scalability Costs Latency Language Support

Slide 9

Slide 9 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Observability Configuration Management Function Invocations Execution Environment Service Integrations So what have we been focusing on?

Slide 10

Slide 10 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Latency Observability Configuration Management Function Invocations Execution Environment Service Integrations Language Support Costs Scalability New Paradigm

Slide 11

Slide 11 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Function Invocations

Slide 12

Slide 12 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Function Invocations AWS Lambda Asynchronous Invocations (Event) Max event age Max retry attempt Destinations (to Lambda, SNS, SQS, EventBridge) ⇣ More controls for async and event-driven apps Scalability New Paradigm

Slide 13

Slide 13 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Configuring Async Invocations

Slide 14

Slide 14 text

© 2020, Amazon Web Services, Inc. or its Affiliates. AWS Lambda – Destinations for Async Invocations Amazon S3 Amazon SNS Amazon SES Amazon EventBridge Amazon CloudWatch Logs AWS Config Amazon CloudFormation AWS CodeCommit AWS Lambda Amazon SNS Amazon SQS Amazon EventBridge Lambda Function onSuccess onFailure

Slide 15

Slide 15 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Function Invocations Costs Scalability New Paradigm Kinesis / DynamoDB Streams Parallelization factor (no need for fan-outs) Failure-handling ⇣ Easier to scale streaming analytics and manage errors when processing a stream

Slide 16

Slide 16 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Kinesis / DynamoDB Streams Controls

Slide 17

Slide 17 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Function Invocations Latency Costs Amazon API Gateway New “HTTP APIs” ⇣ Cheaper and faster APIs Reduce costs by up to 70% Reduce latency by up to 50%

Slide 18

Slide 18 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Amazon API Gateway – HTTP APIs

Slide 19

Slide 19 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Function Invocations Costs New Paradigm Application Load Balancer (ALB) Weighted Target Groups ⇣ Fine-grained deployments with ALB, too Stickiness! Create rules depending on Host, HTTP header/method, Query string, or Source IP Simpler migrations to serverless

Slide 20

Slide 20 text

© 2020, Amazon Web Services, Inc. or its Affiliates. ALB Weighted Target Groups

Slide 21

Slide 21 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Execution Environment Language Support Runtimes Node.js 12 Python 3.8 Java 11 .NET Core 3.1 Custom Runtimes (Rust, Swift, …) Lambda@Edge now supports Node 12.x & Python 3.8 ⇣ Use your favorite programming language Easier to migrate existing apps

Slide 22

Slide 22 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Execution Environment Latency Scalability VPC to VPC NAT ⇣ Integrate VPC resources in serverless apps Use new services with Lambda functions (e.g. ElastiCache)

Slide 23

Slide 23 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Execution Environment Latency Costs Scalability AWS Lambda Provisioned Concurrency ⇣ No more “cold starts” Real-time apps and games Applications with a slow initialization Download config/data on /tmp

Slide 24

Slide 24 text

© 2020, Amazon Web Services, Inc. or its Affiliates. AWS Lambda – Provisioned Concurrency We do the initialization, you are responsible for the first invocation of the handler Avoid lazy initializations Integrated with CloudWatch Application Auto Scaling and AWS CodeDeploy

Slide 25

Slide 25 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Execution Environment Costs Scalability New Paradigm AWS Step Functions Express Workflows ⇣ Build more modular apps Separate business process flow from implementation

Slide 26

Slide 26 text

© 2020, Amazon Web Services, Inc. or its Affiliates. AWS Step Functions – Express Workflows

Slide 27

Slide 27 text

© 2020, Amazon Web Services, Inc. or its Affiliates. AWS Step Functions – AWS Toolkit for Visual Studio Code

Slide 28

Slide 28 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Service Integrations Costs Scalability New Paradigm Amazon Relational Database Service (RDS) RDS Proxy ⇣ Using relational databases in serverless apps is much easier AWS Secrets Manager stores the user name and password for the database

Slide 29

Slide 29 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Amazon RDS Proxy – How It Works Preview

Slide 30

Slide 30 text

© 2020, Amazon Web Services, Inc. or its Affiliates. RDS Proxy + Amazon Aurora Serverless = Sample workload using Aurora Serverless PostgreSQL

Slide 31

Slide 31 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Service Integrations Costs New Paradigm Amazon EventBridge Schema Registry Rules can now be triggered by CloudWatch Alarms ⇣ Building event-driven apps with IDE integration Integrating PaaS solutions with your apps

Slide 32

Slide 32 text

© 2020, Amazon Web Services, Inc. or its Affiliates.

Slide 33

Slide 33 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Service Integrations Scalability New Paradigm Amazon Athena Create user defined functions (UDF) using Lambda functions Run federated queries ⇣ Using SQL for analyzing… almost anything!

Slide 34

Slide 34 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Amazon Athena – Create your own data connector Preview

Slide 35

Slide 35 text

© 2020, Amazon Web Services, Inc. or its Affiliates. New Paradigm AWS Amplify Native iOS/Android Mobile Backends Amplify DataStore ⇣ Mobile backends for native apps Persistent on-device storage to write, read, and observe changes online or offline, and seamlessly sync to the cloud as well as across devices Service Integrations

Slide 36

Slide 36 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Latency Scalability AWS AppSync Pure WebSockets GraphQL Info Object (New) ⇣ Real-time apps More efficient resolvers Service Integrations

Slide 37

Slide 37 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Enhanced Real-Time Experience on AWS AppSync

Slide 38

Slide 38 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Configuration Management New Paradigm AWS AppConfig For EC2, containers, on-premises, Lambda, containers, mobile apps, IoT devices Application Environment Configuration Profile ⇣ Releasing configurations changes with fine-grained controls

Slide 39

Slide 39 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Configuration Management for Lambda Functions Environment Variables Parameter Store AWS Secrets Manager AWS AppConfig In the function configuration For function-specific configurations Part of AWS Systems Manager Can be shared across multiple functions For secrets, can automate rotating secrets Integrated with the new RDS Proxy Part of AWS Systems Manager Full control during the roll out of configuration changes

Slide 40

Slide 40 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Observability Costs Scalability New Paradigm Tracing – AWS X-Ray Trace Maps – for single requests Simplified identification of service disruption – in Service Maps SNS/SQS support (added in July/August) Amazon API Gateway (since 2018) AWS AppSync (new) ⇣ More and easier observability

Slide 41

Slide 41 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Observability Costs Scalability New Paradigm Monitoring CloudWatch Embedded Metric Format Percentiles on CloudWatch metrics CloudWatch Synthetics CloudWatch ServiceLens CloudWatch Anomaly Detection (added in September) ⇣ More visibility into your application behavior

Slide 42

Slide 42 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Using CloudWatch Embedded Metric Format

Slide 43

Slide 43 text

© 2020, Amazon Web Services, Inc. or its Affiliates. CloudWatch Synthetics – Monitor Application Endpoints

Slide 44

Slide 44 text

© 2020, Amazon Web Services, Inc. or its Affiliates. CloudWatch ServiceLens CloudWatch metrics and logs + AWS X-Ray traces

Slide 45

Slide 45 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Using CloudWatch Anomaly Detection Alarms

Slide 46

Slide 46 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Editing the Anomaly Detection Model

Slide 47

Slide 47 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Observability Configuration Management Function Invocations Execution Environment Service Integrations Latency Language Support Costs Scalability New Paradigm

Slide 48

Slide 48 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Observability Configuration Management Function Invocations Execution Environment Service Integrations Lots of concerns have been addressed…

Slide 49

Slide 49 text

© 2020, Amazon Web Services, Inc. or its Affiliates. More tooling available

Slide 50

Slide 50 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Compute Savings Plans Simplify purchasing with a flexible pricing model applying to Amazon EC2, AWS Fargate, and AWS Lambda usage Recommendations in AWS Cost Explorer Any instance family, any region VMs, Containers, and Functions Flexibility

Slide 51

Slide 51 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Serverless Lens in AWS Well-Architected Tool N ew

Slide 52

Slide 52 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Photo by Scott Blake on Unsplash Some Examples

Slide 53

Slide 53 text

Siemens employs 377,000 people who speak almost 50 different languages 3 euros per interview Amazon Translate + Amazon Comprehend + Amazon SageMaker “By using AWS Lambda functions, we are running translations with just three lines of code” Siemens Employee Surveys less than one euro per interview Case Study

Slide 54

Slide 54 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Roomba Vacuum Cleaners

Slide 55

Slide 55 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Roomba Vacuum Cleaners

Slide 56

Slide 56 text

© 2020, Amazon Web Services, Inc. or its Affiliates. fractional delivery Run simulation jobs and add logs to S3 bucket Lambda function FanOut Step Function parallel jobs Lambda function If successful, get output If failed, get execution history Start AWS RoboMaker Update Amazon DynamoDB with job IDS Aggregate Results Parse Logs logs in S3 bucket Amazon Simple Storage Service (Amazon S3) Amazon DynamoDB AWS RoboMaker Check simulation job status Trigger Lambda every 2 minutes Amazon CloudWatch Event Time Based Send task success/failure heartbeat Controller Step Function FanOut Tests Step Function AWS Step Functions workflow AWS Step Functions workflow Start controller execution and wait to finish 1 2 3 4 5 6

Slide 57

Slide 57 text

© 2020, Amazon Web Services, Inc. or its Affiliates. So, what can you do with serverless, now? ✓ Web/Mobile/IoT backends ✓ Batch/streaming analytics ✓ DevOps & IT automation ✓ Voice/text chat interfaces ✓ Real-time apps, multi-player games ✓ Complex async jobs/tasks/activities ✓ Reduce costs even more ✓ Reduce complexity ✓ And much, much more!

Slide 58

Slide 58 text

© 2020, Amazon Web Services, Inc. or its Affiliates. What Can You Do with Serverless …in 2020 ?

Slide 59

Slide 59 text

© 2020, Amazon Web Services, Inc. or its Affiliates. What Are You Going to Build …in 2020 ?

Slide 60

Slide 60 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Thank you! @danilop Please give me your feedback!