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

A Serverless new world

A Serverless new world

AWSGeorge

April 02, 2019
Tweet

Other Decks in Technology

Transcript

  1. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. A Serverless new world: Using Serverless to Accelerate Innovation 4 / 2 / 2 0 1 9
  2. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. About Me George Mao • Currently: AWS Serverless Specialist • Experience: • Software Engineer • Open Source Contributor [email protected] @georgemao (Twitter) @georgemao (Slack #awsdevelopers) Serverless Specialist George Mao
  3. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Development transformation: Early 2000s monolithic application + teams 2001 Lesson learned: decompose for agility 2002 microservices + 2 pizza teams
  4. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Monoliths vs Microservices Monolith Does everything Microservices Does one thing
  5. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. What do businesses & developers want? Move Faster Focus on innovation
  6. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. The AWS Serverless Platform
  7. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Why did AWS build the Serverless platform? No infrastructure provisioning, no management Automatic scaling Pay for value Highly available and secure
  8. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 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 Amazon Kinesis
  9. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. MICROSERVICE API API MICROSERVICE MICROSERVICE EVENT API MICROSERVICE EVENT API MICROSERVICE APPLICATION Mobile client Client IoT PERSISTENCE PERSISTENCE
  10. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Isn’t all of this very hard now that we have lots of pieces to operate?
  11. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. AWS operational responsibility models On-Premises Cloud More Customer management Less Customer Management Compute Virtual Machine EC2 Elastic Beanstalk AWS Lambda Fargate Databases MySQL MySQL on EC2 RDS MySQL RDS Aurora Aurora Serverless DynamoDB Storage Storage S3 Messaging ESBs Amazon MQ Kinesis SQS / SNS Analytics Hadoop Hadoop on EC2 EMR Elasticsearch Service Athena
  12. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Let’s focus on compute for now Serverless event-driven code execution Short-lived All language runtimes Data source integrations AWS Lambda
  13. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Serverless applications SERVICES (ANYTHING) Changes in data state Requests to endpoints Changes in resource state EVENT SOURCE FUNCTION Node.js Python Java C#/Powershell Go Ruby
  14. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Using AWS Lambda Bring your own code • Node.js, Java, Python, C#, Go, Ruby • 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
  15. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Handler() function Function to be executed upon invocation Event object Data sent during Lambda Function Invocation Context object Methods available to interact with runtime information (request ID, log group, etc.) public String handleRequest(Event checkout, Context context) { processCheckout(checkout); return checkout.getName() + " has checked out!"; } Anatomy of a Lambda function
  16. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Manage APIs with Amazon API Gateway Mobile apps Websites Services Internet Amazon CloudFront Amazon CloudWatch monitoring API Gateway cache Any other AWS service All publicly accessible endpoints AWS Lambda functions Endpoints in your VPC Regional API Endpoints AWS Lambda functions Endpoints on Amazon EC2 Your VPC AWS
  17. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. New: Serverless WebSockets with API Gateway Real-time two-way communications Managed persistence Event-based triggers Mobile apps Chat Dashboards IoT devices Amazon API Gateway WebSockets API Stateful connection Stateless connection Lambda Functions Public Endpoints on Amazon EC2 Amazon Kinesis Any other AWS service All publicly accessible endpoints
  18. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. New: App Load Balancer Integration with Lambda Enables easier transition from existing compute stacks to Lambda Mix and match compute options to build your backends Robust load balancer controls (health checks, programmable rules engine ,traffic shaping)
  19. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. New: Lambda Layers Lets functions easily share code: Upload layer once, reference within any function Promote separation of responsibilities, lets developers iterate faster on writing business logic Built in support for secure sharing by ecosystem Custom Runtimes
  20. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. AWS AppSync: Realtime and offline with GraphQL Real-time WebSockets Fine-grained access control Offline programming model with sync Multiple data sources HTTP Data Source
  21. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. What is GraphQL? Declarative data-fetching specification Flexible syntax REST data-fetching GraphQL data-fetching /contacts /contactInfo /contactsByState /contactsByCompany /contactNameStartsWithX
  22. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. getContact(contactId: 111 ){ contactId info{ name email location } } Now in GraphQL getContact(contactId: 111){ info{ name } }
  23. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Alexa tell me … Cards Speech Recognition Machine Learning Natural Language Understanding Text to speech Request Response Your Service Audio
  24. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. “Serverful” comparison Network VM / Host OS & Patching Web / App Server Load balancing & Scaling Language Frameworks Code!
  25. Thank you! © 2019, Amazon Web Services, Inc. or its

    affiliates. All rights reserved. George Mao [email protected] @georgemao (Twitter) @georgemao (Slack #awsdevelopers)