Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Introduction to the Serverless Cloud

201 views

Published on

Introduction to the Serverless Cloud

  • Sex in your area is here: www.bit.ly/sexinarea
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Dating for everyone is here: www.bit.ly/2AJerkH
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Sex in your area for one night is there tinyurl.com/hotsexinarea Copy and paste link in your browser to visit a site)
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Girls for sex are waiting for you https://bit.ly/2TQ8UAY
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Meetings for sex in your area are there: https://bit.ly/2TQ8UAY
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Introduction to the Serverless Cloud

  1. 1. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Serverless: State of the Union Ric Harvey Technical Developer Evangelist rjh@amazon.com @ric__harvey richarvey
  2. 2. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. A typical day for a developer… Manager “We need an app to let our customers update preference settings – our competitors just launched the same thing, so I need it fast. I don’t want to pay a lot for it, especially when no one is using it. But remember that we’re growing, so make sure it scales great and is easy to manage and operate. And you’re on your own – sorry!” Developer “Not a problem. I’ll make it serverless…”
  3. 3. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Serverless means… No Server Management The picture can't be displayed. Flexible Scaling No Idle Costs $ High Availability
  4. 4. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Serverless Benefits • Never pay for idle, request-based pricing • No infrastructure to provision, monitor, or manage • Scaling and fault-tolerance built in • Easy to author, deploy, and secure • Enables best practices (events, stateless functions)
  5. 5. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Joe promised his boss an app. Now what? Step 1: Find a working example! Serverless web app with …an API hosted on Amazon API Gateway …access to existing data stored in Amazon DynamoDB …static content served by Amazon S3 and Amazon CloudFront …dynamic content/business logic encoded as Lambda functions What we need
  6. 6. • Java • Python 2/3 • NodeJS • C# (.net) • Go Serverless languages © 2017, Amazon Web Services, Inc. or its Affiliates.All rights reserved. 8.10
  7. 7. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  8. 8. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  9. 9. • Search and browse ready-made apps and samples • Customize open source apps to get started quickly • Share apps privately or publically •Monetize APIs using theAWS Marketplace • Powered by AWS Serverless Application Model (AWS SAM)! AWS Serverless Application Repository © 2017, Amazon Web Services, Inc. or its Affiliates.All rights reserved.
  10. 10. Lambda Function Editor © 2017, Amazon Web Services, Inc. or its Affiliates.All rights reserved. • Edit multiple files at once! • Create new files for existing packages • Run tests and view results and logs without leaving the editor • Save test inputs and reuse them later
  11. 11. Serverless app benefits © 2017, Amazon Web Services, Inc. or its Affiliates.All rights reserved. Go from concept to working code in under 5 minutes. And your app isn’t just a prototype… • 1,000 concurrent executions by default. • Every account in good standing is automatically approved to 3X the default!
  12. 12. • 1,000 concurrent executions (10K TPS) by default. Auto-approvals for everyone to triple. Faster perf with cold-start optimization! Up to 80% reduction in start times for larger functions Serverless app benefits © 2017, Amazon Web Services, Inc. or its Affiliates.All rights reserved.
  13. 13. • 1,000 concurrent executions (10K TPS) by default. Auto-approvals for everyone to triple. • Up to 80% faster cold start times Built-in logging and monitoring, now with: “grab-n-go” logs in the Lambda console Serverless app benefits © 2017, Amazon Web Services, Inc. or its Affiliates.All rights reserved.
  14. 14. • 1,000 concurrent executions (10K TPS) by default. Auto-approvals for everyone to triple. • Up to 80% faster cold start times • Find Lambda logs instantly 1.5GB Serverless app benefits 3GB © 2017, Amazon Web Services, Inc. or its Affiliates.All rights reserved. Top memory size of…
  15. 15. • 1,000 concurrent executions (10K TPS) by default. Auto-approvals for everyone to triple. • Up to 80% faster cold start times • Find Lambda logs instantly • Top memory size of 3GB Go Serverless! Serverless app benefits © 2017, Amazon Web Services, Inc. or its Affiliates.All rights reserved.
  16. 16. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Next, Joe needs to make some changes. Step 2: Customize and share Need an IDE for local dev/test/debug Customize the app we deployed in step 1 Set up a CI/CD pipeline for the team Deploy (safely!) What we need to do
  17. 17. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Easy-to-use IDE in the cloud Builtin GitHub support Builtin Lambda blueprint support Builtin SAM Local: Local testing! IDE debugging! Deploy directly to Lambda and/or push updates to GitHub AWS Cloud9
  18. 18. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Automated CI/CD process Git push your changes from Cloud9 when ready to share… Set up an AWS CodePipeline to build automatically on updates Local Testing
  19. 19. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. I need to deploy Lambda functions safely and incrementally. Customer feedback How can I deploy multiple functions and APIs in a coordinated way? How do I roll back automatically? How can I shape traffic between two versions of an API?
  20. 20. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Safe, incremental serverless deployment Lambda: Weighted aliases • Set percentage of traffic between two versions of the same function API Gateway: Sub-stages for incremental deployments • Share traffic between two stages AWS CodeDeploy: Automated support for safe serverless deployments • Amazon CloudWatch metrics-driven rollout/rollback
  21. 21. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  22. 22. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  23. 23. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  24. 24. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  25. 25. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  26. 26. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  27. 27. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  28. 28. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Another typical day… Manager: “That app you built is working great, but now we need to include data from a relational DB and one of our legacy services in our VPC. Is your serverless architecture going to handle that?” Developer “Not a problem.”
  29. 29. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Next up: Deal with legacy stuff. Step 3: Connect to enterprise systems Monitor concurrency Limit concurrency for legacy connectivity Hook up APIs to VPC-based services Audit and log all invocations What we need to do
  30. 30. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. I need a way to protect the capacity of a Lambda function from others running in the same account. Customer feedback I want to temporarily disable a function. Can you create a “dev mode” for functions? Lambda can overwhelm my legacy systems with too many calls
  31. 31. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. I need a way to protect the capacity of a Lambda function from others running in the same account. Customer Feedback I want to temporarily disable a function. Can you create a “dev mode” for functions? Lambda can overwhelm my legacy systems with too many calls Insight: Concurrency control is a key element of managing functions in a serverless app.
  32. 32. Lambda: Concurrency metric Lambda: Per-function concurrency throttles Enterprise connectivity What you can do with it 1. Limit concurrency to legacy systems 2. Protect serverless production services from other functions in the same account 3. Temporarily disable a function 4. Develop functions with limited billing and “runaway” protection © 2017, Amazon Web Services, Inc. or its Affiliates.All rights reserved.
  33. 33. VPC (PrivateLink) integrations Access services and data in your VPC from an API Regional endpoints Fast, region-specific API endpoints Enterprise connectivity: API Gateway © 2017, Amazon Web Services, Inc. or its Affiliates.All rights reserved.
  34. 34. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  35. 35. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Log and audit Structured logging for APIs AWS CloudTrail support for Lambda functions
  36. 36. Serverless for the enterprise: checklist Uptime Scale Performance Management Safe deploys Concurrency controls © 2017, Amazon Web Services, Inc. or its Affiliates.All rights reserved.
  37. 37. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. What about GraphQL?
  38. 38. GraphQL Open, declarative data-fetching specification != Graph database Use NoSQL, Relational, HTTP, etc. Traditional data-fetching GraphQL /posts /postInfo /postJustTitle /postsByAuthor /postNameStartsWithX /commentsOnPost
  39. 39. How does GraphQL work? { "id": "1", "name": "Get Milk", “priority": "1" }, { "id": “2", "name": “Go to gym", “priority": “5" },… type Query { getTodos: [Todo] } type Todo { id: ID! name: String description: String priority: Int duedate: String } query { getTodos { id name priority } } Model data with application schema Client requests what it needs Only that data is returned
  40. 40. GraphQL Schema type Event { id: ID! name: String where: String when: String description: String comments: [Comment] } type Comment { commentId: String! eventId: ID! content: String! createdAt: String! }
  41. 41. GraphQL Schema Mutation type Mutation { createEvent( name: String!, when: String!, where: String!, description: String! ): Event deleteEvent(id: ID!): Event commentOnEvent( eventId: ID!, content: String!, createdAt: String! ): Comment }
  42. 42. GraphQL Schema Mutation Query type Query { getEvent(id: ID!): Event listEvents( limit: Int, nextToken: String ): EventConnection }
  43. 43. GraphQL Schema Mutation Query Subscription type Subscription { subscribeToEventComments(eventId: String!): Comment @aws_subscribe(mutations: ["commentOnEvent"]) }
  44. 44. GraphQL Schema Mutation Query Subscription Realtime? YES Batching? YES Pagination? YES Relations? YES Aggregations? YES Search? YES Offline? YES
  45. 45. AWS AppSync DynamoDB Table Lambda Function Elasticsearch Service GraphQL Schema Upload Schema GraphQL Query Mutation Subscription Real-time Offline AppSync API Cognito User Pool
  46. 46. AWS AppSync DynamoDB Table Lambda Function Elasticsearch Service GraphQL Schema Upload Schema GraphQL Query Mutation Subscription Real-time Offline AppSync API Cognito User Pool Legacy Application
  47. 47. AWS AppSync DynamoDB Table Lambda Function Elasticsearch Service GraphQL Schema Upload Schema GraphQL Query Mutation Subscription Real-time Offline DynamoDB to Elasticsearch Sync Function AppSync API Cognito User Pool
  48. 48. AWS AppSync DynamoDB Table Lambda Function Elasticsearch Service GraphQL Schema Autogenerate Schema GraphQL Query Mutation Subscription Real-time Offline AppSync API Cognito User Pool
  49. 49. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Serverless Aurora
  50. 50. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Serverless Aurora Automatically scales capacity up and down Pay per second and only for the database capacity you use Starts up on demand and shuts down when not in use No need to provision instances On-demand, auto-scaling database for applications with unpredictable or cyclical workloads In preview today
  51. 51. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Serverless for everything Lambda and API Gateway in every commercial AWS Region + AWS GovCloud Lambda@Edge new features: • Content-based Dynamic Origin Selection • Network Calls from Viewer Events • Advanced Response Generation
  52. 52. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Serverless for everything • Faster cold start performance • Assurance programs: ISO, PCI, HIPAA • …and now SOC 1, SOC 2, and SOC 3 • Lambda for devices (AWS Greengrass, AWS Snowball Edge) • Lambda for Windows – CoreCLR 2.0
  53. 53. An expanding Serverless ecosystem Build and CI/CD Logging and MonitoringApplications and Deployment Chalice Framework Serverless Java Container © 2017, Amazon Web Services, Inc. or its Affiliates.All rights reserved.
  54. 54. • Turn any Go program into a Lambda function by adding 2 lines • Open source connector • Now available! Golang in Lambda © 2017, Amazon Web Services, Inc. or its Affiliates.All rights reserved.
  55. 55. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Serverless: State of the Union Ric Harvey Technical Developer Evangelist rjh@amazon.com @ric__harvey richarvey

×