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

What Can You Do with Serverless – In 2021

Danilo Poccia
February 04, 2021

What Can You Do with Serverless – In 2021

AWS User Group Dublin, February 4th, 2021

Serverless is always evolving (faster than any definition) and each year new capabilities simplify existing workloads and enable new applications to be implemented in an easier, more efficient way. At AWS, we focused our efforts to increase performance, give options on how to package and deploy, optimize costs for faster interactions, and simplify service integrations. Looking at some of the updates from re:Invent 2020, our yearly learning conference, we introduce the reasoning behind the new features, and how to use them to reduce architecture complexity, including real world examples of what AWS customers are doing, so that you can focus on creating value for YOUR customers.

Danilo Poccia

February 04, 2021
Tweet

More Decks by Danilo Poccia

Other Decks in Programming

Transcript

  1. © 2021, Amazon Web Services, Inc. or its Affiliates. What

    Can You Do with Serverless Danilo Poccia Chief Evangelist (EMEA) @danilop in 2021
  2. © 2021, Amazon Web Services, Inc. or its Affiliates. ©

    2021, Amazon Web Services, Inc. or its Affiliates. Photo by Jeremy Bishop on Unsplash
  3. © 2021, Amazon Web Services, Inc. or its Affiliates. ©

    2021, Amazon Web Services, Inc. or its Affiliates. We have an idea for a new web/mobile app! How can we build it quickly and put it in the hands of customers?
  4. © 2021, Amazon Web Services, Inc. or its Affiliates. ©

    2021, Amazon Web Services, Inc. or its Affiliates. I want to build a mobile app that helps my customers store and analyze videos taken with their smartphone. You can use a serverless architecture to focus on the features you want to build. It’ll be much easier to scale up if needed. You’ll also be driven to think about security as you build it. Serverless Com puting
  5. © 2021, Amazon Web Services, Inc. or its Affiliates. ©

    2021, Amazon Web Services, Inc. or its Affiliates. Serverless function API Call File uploaded Database updated Your code Your business logic Its own permissions Something happens Event Serverless function Serverless function Serverless function Serverless Com puting
  6. © 2021, Amazon Web Services, Inc. or its Affiliates. ©

    2021, Amazon Web Services, Inc. or its Affiliates. Analysis Function Videos Results Get Results HTTP API Upload Get Serverless Com puting Event Write Read Event
  7. © 2021, Amazon Web Services, Inc. or its Affiliates. ©

    2021, Amazon Web Services, Inc. or its Affiliates. Many functions used by my app return very quickly, often in less than 20ms. Billing & Cost O ptim ization Billing granularity for Lambda functions has been reduced from 100ms down to 1ms with no minimum duration. This lowers the price for most Lambda functions, more so for short duration functions.
  8. © 2021, Amazon Web Services, Inc. or its Affiliates. ©

    2021, Amazon Web Services, Inc. or its Affiliates. REPORT RequestId: 35a7e0cb-4902-490d-b8d3-eb315dded660 Duration: 27.40 ms Billed Duration: 100 ms Memory Size: 1024 MB Max Memory Used: 472 MB Before With 1ms billing granularity REPORT RequestId: a24d03b5-429d-4ca3-a490-878a52a0182f Duration: 27.55 ms Billed Duration: 28 ms Memory Size: 1024 MB Max Memory Used: 472 MB 1m s Billing Granularity
  9. © 2021, Amazon Web Services, Inc. or its Affiliates. ©

    2021, Amazon Web Services, Inc. or its Affiliates. Lambda functions now can have up to 10 GB of memory and 6 vCPUs. This is more than a 3x increase compared to previous limits. I want to be able to process high resolution videos. Large Functions
  10. © 2021, Amazon Web Services, Inc. or its Affiliates. ©

    2021, Amazon Web Services, Inc. or its Affiliates. Large Functions https://aws.amazon.com/blogs/aws/new-for-aws-lambda-functions-with-up-to-10-gb-of-memory-and-6-vcpus/
  11. © 2021, Amazon Web Services, Inc. or its Affiliates. ©

    2021, Amazon Web Services, Inc. or its Affiliates. https://twitter.com/mooyoul/status/1334205430839472129 FFm peg First Case Study
  12. © 2021, Amazon Web Services, Inc. or its Affiliates. ©

    2021, Amazon Web Services, Inc. or its Affiliates. M L Inference w ith PyTorch https://aws.amazon.com/blogs/aws/new-for-aws-lambda-functions-with-up-to-10-gb-of-memory-and-6-vcpus/ Same Costs 5x Faster +20% Costs 7x Faster
  13. © 2021, Amazon Web Services, Inc. or its Affiliates. ©

    2021, Amazon Web Services, Inc. or its Affiliates. Ffm peg Second Case Study https://www.sentiatechblog.com/aws-re-invent-2020-day-3-optimizing-lambda-cost-with-multi-threading Costs Duration
  14. © 2021, Amazon Web Services, Inc. or its Affiliates. ©

    2021, Amazon Web Services, Inc. or its Affiliates. I want to process videos faster. It’ll give a better customer experience, and with a serverless architecture will also be cheaper! AVX2 support AWS Lambda now supports Advanced Vector Extensions 2 (AVX2), an extension to the x86 instruction set architecture that enables running a set of highly parallelizable operations simultaneously.
  15. © 2021, Amazon Web Services, Inc. or its Affiliates. ©

    2021, Amazon Web Services, Inc. or its Affiliates. Source: https://unsplash.com/photos/IMXhx6qhvf0. Photo credit: Daniel Seßler. Bicubic filter Bilinear filter Lanczos filter Im age Resizing U sing AVX2 https://aws.amazon.com/blogs/compute/creating-faster-aws-lambda-functions-with-avx2/
  16. © 2021, Amazon Web Services, Inc. or its Affiliates. ©

    2021, Amazon Web Services, Inc. or its Affiliates. Im age Resizing U sing AVX2 Filter Without AVX2 With AVX2 Performance improvement Bilinear 105 ms 71 ms 32% Bicubic 122 ms 73 ms 40% Lanczos 136 ms 77 ms 43% https://aws.amazon.com/blogs/compute/creating-faster-aws-lambda-functions-with-avx2/
  17. © 2021, Amazon Web Services, Inc. or its Affiliates. ©

    2021, Amazon Web Services, Inc. or its Affiliates. The Lambda functions analyzing videos need many large dependencies. For example, I want to use a custom machine learning model to extract more information. Packaging & Deploym ent AWS Lambda now supports container images as a packaging format with an image size up to 10 GB. This also helps if you invested in container tooling for your development workflows.
  18. © 2021, Amazon Web Services, Inc. or its Affiliates. ©

    2021, Amazon Web Services, Inc. or its Affiliates. FROM public.ecr.aws/lambda/nodejs:latest COPY app.js package*.json ./ RUN npm install CMD [ "app.lambdaHandler" ] Dockerfile Container Im age Support https://aws.amazon.com/blogs/aws/new-for-aws-lambda-container-image-support/ You can use base container images prepared by AWS and shared via Docker Hub and Amazon Elastic Container Registry (ECR) Public.
  19. © 2021, Amazon Web Services, Inc. or its Affiliates. ©

    2021, Amazon Web Services, Inc. or its Affiliates. With serverless I can use small functions that react to events. But now my main function is becoming too big, mixing different capabilities such as video resizing and using a custom machine learning model. O rchestration & Choreography You can decompose a large function is small tasks that you can execute (and retry) independently from each other. AWS Step Functions now supports Synchronous Express Workflows.
  20. © 2021, Amazon Web Services, Inc. or its Affiliates. ©

    2021, Amazon Web Services, Inc. or its Affiliates. Synchronous Express W orkflow s https://aws.amazon.com/blogs/compute/new-synchronous-express-workflows-for-aws-step-functions/
  21. © 2021, Amazon Web Services, Inc. or its Affiliates. ©

    2021, Amazon Web Services, Inc. or its Affiliates. I built an asynchronous architecture, with message producers and consumers, but I have too many invocations while processing messages from a message queue. O rchestration & Choreography AWS Lambda now supports for functions with Amazon SQS as an event source batch windows of up to 5 minutes and up to 10,000 messages in a single invocation. This option is ideal for workloads that are not time-sensitive, and can choose to wait to optimize cost.
  22. © 2021, Amazon Web Services, Inc. or its Affiliates. ©

    2021, Amazon Web Services, Inc. or its Affiliates. O rchestration & Coreography
  23. © 2021, Amazon Web Services, Inc. or its Affiliates. ©

    2021, Amazon Web Services, Inc. or its Affiliates. I want to understand better what my functions are doing in production. Observability is key! To help you with that, Amazon CloudWatch Lambda Insights is now generally available. Also, have a look a the AWS Distro for OpenTelemetry. O bservability & Governance
  24. © 2021, Amazon Web Services, Inc. or its Affiliates. ©

    2021, Amazon Web Services, Inc. or its Affiliates. CloudW atch Lam bda Insights https://aws.amazon.com/blogs/aws/using-amazon-cloudwatch-lambda-insights-to-improve-operational-visibility/
  25. © 2021, Amazon Web Services, Inc. or its Affiliates. ©

    2021, Amazon Web Services, Inc. or its Affiliates. I appreciate the integration with CloudWatch Logs, but I want to process my logs with the solution I am already using. O bservability & Governance AWS Lambda Extensions allows for new ways to integrate Lambda with operational tools. For example, Lambda functions now can easily send logs to custom destinations.
  26. © 2021, Amazon Web Services, Inc. or its Affiliates. ©

    2021, Amazon Web Services, Inc. or its Affiliates. Lam bda Runtim e Logs API
  27. © 2021, Amazon Web Services, Inc. or its Affiliates. ©

    2021, Amazon Web Services, Inc. or its Affiliates. I'd like to use my app with a new use case for a regulated industry, such as finance or healthcare. Security There are many security features and documentation that can help you with compliance. You can now also use Code Signing, a trust and integrity control for AWS Lambda.
  28. © 2021, Amazon Web Services, Inc. or its Affiliates. ©

    2021, Amazon Web Services, Inc. or its Affiliates. Security
  29. © 2021, Amazon Web Services, Inc. or its Affiliates. ©

    2021, Amazon Web Services, Inc. or its Affiliates. I want to use S3 as the source of truth while processing videos and extracting metadata. Isn’t S3 eventually consistent while updating objects? I have the same issue with my data lake where I store and analyze my logs and application data. Storage Amazon S3 now delivers strong read-after-write consistency automatically for all applications.
  30. © 2021, Amazon Web Services, Inc. or its Affiliates. ©

    2021, Amazon Web Services, Inc. or its Affiliates. Storage
  31. © 2021, Amazon Web Services, Inc. or its Affiliates. ©

    2021, Amazon Web Services, Inc. or its Affiliates. I want to keep my data at rest encrypted. Storage Amazon S3 Bucket Keys reduce the costs of Server-Side Encryption with AWS Key Management Service (SSE-KMS)
  32. © 2021, Amazon Web Services, Inc. or its Affiliates. ©

    2021, Amazon Web Services, Inc. or its Affiliates. Storage
  33. © 2021, Amazon Web Services, Inc. or its Affiliates. ©

    2021, Amazon Web Services, Inc. or its Affiliates. I want to use DynamoDB for its low latency and on-demand scalability, but I am not familiar with NoSQL and its syntax. Database You now can use a SQL-compatible query language to query, insert, update, and delete table data in Amazon DynamoDB. Also, the NoSQL Workbench can help you design your data model and build your operations.
  34. © 2021, Amazon Web Services, Inc. or its Affiliates. ©

    2021, Amazon Web Services, Inc. or its Affiliates. N oSQ L W orkbench
  35. © 2021, Amazon Web Services, Inc. or its Affiliates. ©

    2021, Amazon Web Services, Inc. or its Affiliates. I still want to use a relational database for financial data, such as account subscriptions and payments. Database AWS is introducing the next version of Amazon Aurora Serverless in preview. It provides ability to scale database workloads to hundreds of thousands of transactions in a fraction of a second.
  36. © 2021, Amazon Web Services, Inc. or its Affiliates. ©

    2021, Amazon Web Services, Inc. or its Affiliates. I want to replicate my application in another AWS Region. For the database, I am using DynamoDB Global Tables. What about unstructured data? M ulti-Region Amazon S3 Replication now supports two-way replication and multiple destinations in the same, or different AWS Regions.
  37. © 2021, Amazon Web Services, Inc. or its Affiliates. ©

    2021, Amazon Web Services, Inc. or its Affiliates. For a new feature, I want to extract text from images of documents such as receipts and forms. N atural Language Support Cool! Amazon Textract supports handwriting and five new languages (Spanish, German, Italian, Portuguese, and French).
  38. © 2021, Amazon Web Services, Inc. or its Affiliates. ©

    2021, Amazon Web Services, Inc. or its Affiliates. H andw ritten Inform ation
  39. © 2021, Amazon Web Services, Inc. or its Affiliates. ©

    2021, Amazon Web Services, Inc. or its Affiliates. I want to create a chatbot to simplify customer interactions and give access to customer support. I’d like each customer to use their native language. N atural Language Support Amazon Lex has added language support for French, Spanish, Italian, Canadian French, German, and Latin American Spanish.
  40. © 2021, Amazon Web Services, Inc. or its Affiliates. ©

    2021, Amazon Web Services, Inc. or its Affiliates. M ulti-Language Chatbot
  41. © 2021, Amazon Web Services, Inc. or its Affiliates. ©

    2021, Amazon Web Services, Inc. or its Affiliates. I want to use the chatbot from my contact center. N atural Language Support Amazon Connect now supports Amazon Lex chatbots for French, Spanish, Italian and Canadian French, Latin American Spanish, and German.
  42. © 2021, Amazon Web Services, Inc. or its Affiliates. ©

    2021, Amazon Web Services, Inc. or its Affiliates. Sentiment Analysis & User Insights Cloud-native Contact Center Reference Architecture for Multilingual IT Service Desk This reference architecture provides an omnichannel experience for end users calling the IT Service Desk (SD) using one or more support channels of their choice, such as a landline phone using public switched telephone network (PSTN), a softphone from their client device, or from their smartphone using an internet connection. The SD agent, working from a corporate office, uses a web-based softphone (CCP) from an internet browser to connect to Amazon Connect and interact with end users by answering calls, performing web chats, or setting their status in the CCP UI. SD agents can also use a traditional telephone service using the PSTN. SD agents can also connect to Amazon Connect remotely through internet connectivity from their home office. All data exchanged with Amazon Connect is protected in transit between the user’s web browser and Amazon Connect using TLS 1.2 or above encryption standards. Amazon Connect provides inbound/outbound voice channel, web, and mobile chat capabilities with skills-based routing. As part of the initial configuration, Amazon Connect enables you to claim the phone number and define the support queues, contact flows, and routing profiles, which can notify users through email or SMS about the status of the ticket. Using Connect Tasks, SD agents and managers can automate manual tasks such as user follow-ups, setup reminders, and more. Amazon Connect integrates with customers’ customer relationship management (CRM) or any business intelligence (BI) applications hosted in AWS or an on-premise location, or any of the existing IT Service Management (ITSM) ticketing tools like ServiceNow to pull caller information. This is achieved either by using connectors developed by the AWS Partner ecosystem, or by creating a custom integration connector using AWS Lambda. Further integrating Amazon Connect with Amazon Lex, you can create intelligent conversational chatbots to automate high volume user contacts without increasing the number of SD agents, and without compromising end users experience. End users are able perform self-service tasks such as password change, procurement of IT accessories, or scheduling meetings using natural conversation language with Amazon Lex. In conjunction with the contact flows feature in Amazon Connect, businesses can turn automated interactions into natural conversations to improve end-user experience. To improve the efficiency and quality of the contact handling, IT SD can gain end-user insights using Amazon Transcribe and Amazon Translate to convert speech to text from the voice recording stored in Amazon S3. By leveraging Amazon Comprehend, SD agents can then analyze the key topics and relationships in any given text using Amazon Athena. Amazon Macie can be used to protect sensitive data stored in the call recording, and focus on the incident or problem context. With this analysis, the IT SD can identify user sentiments, and address the common issue or a trend that impacts end users’ productivity or satisfaction. Amazon Connect enables the SD agents to see real-time metrics such as SD agents logged in, call abandon rates, number of calls handled, SD agent activity status, and so on. This is done by analyzing contact trace records (CTRs) using Amazon Kinesis Data Streams and Lambda functions, storing them in Amazon Redshift, and viewing them on the Amazon Quicksight dashboard. © 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Use AWS building blocks for modernizing the IT service desk with an intelligent, omnichannel-based contact center capability using Amazon Connect. This reference architecture supports voice, web, mobile, and conversational chatbot channels, including end user sentiment analysis, automation, real-time analytics dashboard, and reporting. Phone, Speech Assistant, Web and Chat Voice & Chat Support Channel Inbound & Outbound Voice Analytics & Reporting Internet Amazon Kinesis Data Firehose Amazon Kinesis Data Streams Mobile client End Users Client Client Service Desk Agents Office Contact Control Pane (CCP) Customer GW (Primary) Remote Service Desk Agents Internet GW Customer GW (Backup) Contact Control Pane (CCP) CRM System BI System Internet Conversational Bot Support Channel NLP based Bots capability Amazon Lex Amazon DynamoDB Amazon Lex Validation Lambda function Amazon SMS Events AWS Lambda Amazon Connect Contact Flows Amazon Redshift AWS Lambda Amazon S3 Amazon QuickSight Amazon Transcribe Amazon Comprehend Amazon Macie Amazon S3 (stores call recording) Amazon Athena Metrics Call Recordings Amazon Translate Amazon QuickSight Amazon S3 Machine Learning capabilities PSTN AWS S2S VPN AWS Direct Connect 1 2 4 3 5 6 7 Integration with 3rd party systems (A) A. Amazon Connect is an open platform, providing out-of-the-box integrations for leading CRM tools such as Salesforce and Zendesk, Workforce Management (WFM) tools, and analytics tools. Using Lambda, customers can create their own integration to their existing ITSM or CRM products. To learn more about various APN partners who have created a custom integration connector with their product to leverage Amazon Connect, see Amazon Connect Partners. B. Amazon Connect Integration offers a Quick Start guide to organizations using ServiceNow as their ticketing tool. Organizations can use Lambda functions to jumpstart their integration of ServiceNow and Amazon Connect, resulting in one unified ITSM UI for SD agents and end users. 1 2 3 4 5 6 7 AWS Reference Architecture (B) E-mail notification Text messages Amazon Connect Tasks for automation AWS Lambda Customer Workloads Customer Location APN Partners ServiceNow Contact Center Reference Architecture
  43. © 2021, Amazon Web Services, Inc. or its Affiliates. ©

    2021, Amazon Web Services, Inc. or its Affiliates. Photo by veeterzy on Unsplash
  44. © 2021, Amazon Web Services, Inc. or its Affiliates. Thank

    you! Please give me your feeback J Danilo Poccia Chief Evangelist (EMEA) @danilop