Upgrade to Pro — share decks privately, control downloads, hide ads and more …

2019 Update: Serverless Beyond AWS Lambda

2019 Update: Serverless Beyond AWS Lambda

This presentation is a no-nonsense review of all new features and services around Lambda. Serverless is more than just AWS Lambda! I will review the full picture of services and new features: Starting with the open-sourced Firecracker mini-VM that spins up in 125ms, to serverless databases that can scale down to zero, Dynamo DB that does not need provisioned throughput anymore, to Lambda layers and custom runtimes that brings languages you always wanted like COBOL and PHP.

Fast paced! Honest tech bits. Explained well. With a lot of references. Promised!

Presentation from Serverless Days 2019 in Zurich.
twitter: @frankmunz
medium: https://medium.com/@frank.munz

Frank Munz

April 11, 2019
Tweet

More Decks by Frank Munz

Other Decks in Technology

Transcript

  1. © 2018, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Dr. Frank Munz Technical Evangelist, AWS @frankmunz 2019 Update Serverless Beyond AWS Lambda
  2. © 2018, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. About me • Software Architect / DevOps Engineer • Technical Evangelist @ AWS • Published an AWS book a while ago • Containers, serverless and a sprinkle of ML & big / fast data @frankmunz
  3. © 2018, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. Ok, so serverless …
  4. © 2018, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. The Serverless Operational Model No provisioning, no management Pay for value Automatic scaling Highly available and secure
  5. © 2018, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. AWS Serverless Portfolio COMPUTE AND DATASTORES AWS Lambda AWS Fargate Amazon API Gateway Amazon SNS Amazon MQ Amazon SQS AWS Step Functions APPLICATION INTEGRATION DEVELOPER TOOLS SECURITY AND ADMINISTRATION Amazon Aurora Serverless Amazon S3 Amazon DynamoDB AWS AppSync AWS IAM Amazon Cognito Amazon Inspector Amazon VPC Amazon GuardDuty AWS CloudFormation AWS Cloud9 AWS CloudTrail Amazon CloudWatch AWS X-Ray AWS CodePipeline AWS Config AWS SSO AWS Shield AWS WAF Amazon Kinesis AWS Serverless Application Repository
  6. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Custom Runtimes Rule Stack Support for Ruby + AWS OPEN SOURCE o f f e r e d b y o f f e r e d b y o f f e r e d b y o f f e r e d b y PARTNER SUPPORTED
  7. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Layers Upload layer once, reference up to 5 layers within any function (one can be custom runtime) Layers are immutable, versioned and can overwrite each other Promote separation of responsibilities Secure sharing by ecosystem https://aws.amazon.com/blogs/aws/new-for- aws-lambda-use-any-programming-language-and- share-common-components/
  8. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Custom Runtimes Bring any Linux compatible language runtime Powered by new Runtime API Custom runtimes distributed as “layers” Rule Stack
  9. © 2018, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. References https://www.youtube.com/watch?v =QdzV04T_kec https://aws.amazon.com/blogs/a ws/new-for-aws-lambda-use-any- programming-language-and- share-common-components/ https://docs.aws.amazon.com/lambda/latest/dg /runtimes-custom.html
  10. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T AWS Fargate No cluster or infrastructure to manage or scale Everything is handled at the container level Scale seamlessly on demand Time and event-based scheduling, network integration, individually metered, and billed. Native service discovery. Containers as first-class primitive
  11. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Recent launches - Fargate Cost reduction of up to 50% Tagging & Cost Allocation Cloud Map Integration AWS App Mesh Secrets management Private Link Support Rule Stack
  12. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T App Mesh works across compute services Amazon ECS AWS Fargate Amazon EKS Amazon EC2 Kubernetes on EC2
  13. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Based on Envoy proxy Start App Mesh from the AWS CLI, console or SDK There is no additional charge for using AWS App Mesh Supports any third-party tool that works with Envoy App Mesh
  14. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T References https://www.slideshare.net/Amaz onWebServices/introducing-aws- app-mesh-mad303-santa-clara- aws-summit https://www.youtube.com/watch?v=f DmJf9kWFws https://aws.amazon.com/containers/new/
  15. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Firecracker • microVM, developed in Rust • Boots in 125 msec. • < 5MB of system overhead • Linux host and guest 4.14+ • Minimal device model -> small attack surface • Apache License, version 2.0 • Used for AWS Fargate and Lambda https://github.com/firecracker-microvm/firecracker https://aws.amazon.com/blogs/aws/firecracker-lightweight-virtualization- for-serverless-computing/
  16. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Firecracker Architecture and Benefits • Same security as EC2 • Designed for low overhead, high density, and fast start times
  17. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T „The great thing about Lambda internals and Firecracker is you can leave this room and forget about all this. It was just for your entertainement. You can build your business logic and deliver value to your customers.“ Mark Brooker
  18. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Author and debug Lambda applications Python, Node New Python Developer Preview Java, Python Developer Preview .NET, Node
  19. © 2018, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. Dynamo DB • Multi-region • Multi-master • Encryption at rest • Time to live • Backup & Restore • Point-in-time recovery • In-memory caching • Single digit ms perf, 99.99% uptime SLA • You define rcu and wcu Fully managed key-value and document DB
  20. © 2018, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. Autoscaling DynamoDB (J. Barr Blog 2017) https://aws.amazon.com/blogs/aws/new-auto-scaling-for-amazon-dynamodb/
  21. © 2018, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. DynamoDB: On Demand • Thousands of request / sec • Pay per request • For new or existing tables • Also for indexes Good use cases for on demand: - Serverless stacks - Unpredictable, spiky load https://aws.amazon.com/blogs/aws/amazon-dynamodb-on-demand-no-capacity-planning-and-pay- per-request-pricing/
  22. © 2018, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. Dynamo DB https://aws.amazon.com/blogs/aws/amazon-dynamodb-on-demand-no-capacity- planning-and-pay-per-request-pricing/ https://www.youtube.com/watch ?v=1CN0y2bfHac https://www.youtube.com/ watch?v=eTbBdXJq8ss
  23. © 2018, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. Watch This! (if you care about DBs on AWS)
  24. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Aurora Aurora Provisioned: Specifiy instance size and #read replicas Aurora Serverless • Endpoint without instance size • Min and max Aurora Capacity Units (ACUs) = processing and memory capacity • Auto rules based on CPU/mem/#connections • Can scale to zero, no cool-down for scale up • MySQL (Postgres in preview) Cloud native DB - compatible with MySQL and PostgreSQL
  25. © 2018, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. Aurora Serverless Autoscaling Scale compute to zero after period of inactivity
  26. © 2018, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. The Computer Science behind Aurora https://www.allthingsdistri buted.com/files/p1041- verbitski.pdf
  27. © 2018, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. Aurora https://www.slides hare.net/AmazonWeb Services/amazon- aurora-storage- demystified-how- it-all-works- dat363-aws- reinvent-2018 https://www.youtube.com/wat ch?v=2WG01wJIGSQ https://www.youtube.co m/watch?v=4DqNk7ZTYjA https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUs erGuide/aurora-serverless.how-it-works.html https://www.allthingsdistributed.com/files/p1041- verbitski.pdf
  28. © 2018, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. Data Analytics: AWS Lambda Lambda polls each shard once per second Lambda’s maximum execution time is 15 minutes data producer Kinesis Data Streams Amazon SNS Continuously stream data Lambda service Lambda function A Lambda function B Continuously polls for new data, 1 poll per second Automatically invokes your function(s) when data found
  29. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T AWS Lambda supports Kinesis Data Streams Enhanced Fan-Out and HTTP/2 for faster streaming Enhanced fan-out allows customers to scale the number of functions reading from a stream in parallel while maintaining performance. HTTP/2 data retrieval API improves data delivery speed between data producers and Lambda functions by more than 65% Amazon Kinesis Data Streams https://aws.amazon.com/blogs/aws/kds-enhanced-fanout/
  30. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Kinesis Streaming Data Analytics / SQL
  31. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Kinesis Streaming Data Analytics / Apache Flink Framework and engine for stateful processing of data streams. Simple programming High performance Stateful Processing Strong data integrity Easy to use and flexible APIs make building apps fast In-memory computing provides low latency & high throughput Durable application state saves Exactly-once processing and consistent state
  32. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T Conclusion Serverless is more than just AWS Lambda (FaaS). AWS Lambda integration to other AWS services bring customer value
  33. © 2018, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. frankmunz @frankmunz https://medium.com/@frank.munz (Blog) https://speakerdeck.com/fmunz (Slides) Thank You!