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

Managing Serverless Development

padajo
February 16, 2018

Managing Serverless Development

How can AWS Lambda serverless applications help manage development and businesses through event sources, internal processes and external web hooks

padajo

February 16, 2018
Tweet

Other Decks in Technology

Transcript

  1. Managing Serverless Development Paul Johnston – Senior Developer Advocate –

    Serverless © 2018 Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  2. About me: Paul Johnston – [email protected] @pauldjohnston • AWS Senior

    Developer Advocate – Serverless • EMEA based • Obsessed with serverless • Previously CTO of Movivo and former Consulting CTO to several startups • Blogger and Tweeter • Co-Founder of JeffConf and originator of Jeff meme © 2018 Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  3. The CTO perspective • The perspective is different from a

    developer • Not a coder, but still an engineer • Is a pragmatist – Keep it Simple • Is a strategist – Business directs the technology © 2018 Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  4. Serverless means… © 2018 Amazon Web Services, Inc. or its

    Affiliates. All rights reserved. No server management Flexible Scaling No idle capacity High availability
  5. Serverless means… © 2018 Amazon Web Services, Inc. or its

    Affiliates. All rights reserved. Zero to 100 and back to zero… …without changing anything
  6. © 2018 Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. Serverless Applications EVENT SOURCE FUNCTION SERVICES (ANYTHING) Changes in data state Requests to endpoints Changes in Resource state Node Python Java C# Go Triggers an invocation
  7. © 2018 Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. Common Serverless Use Cases Web Applications • Static websites • Complex web apps • Packages for Flask and Express Data Processing • Real time • MapReduce • Batch Chatbots • Powering chatbot logic Backends • Apps & services • Mobile • IoT </> </> Amazon Alexa • Powering voice- enabled apps • Alexa Skills Kit IT Automation • Policy engines • Extending AWS services • Infrastructure management
  8. © 2018 Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. Lambda Functions FUNCTION In this talk, we are not going to talk about how to create a Lambda function
  9. © 2018 Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. Lambda Event Sources Amazon S3 Amazon DynamoDB Amazon Kinesis AWS CloudFormation AWS CloudTrail Amazon CloudWatch Amazon Cognito Amazon SNS Amazon SES Cron events DATA STORES ENDPOINTS DEVELOPMENT AND MANAGEMENT TOOLS EVENT/MESSAGE SERVICES … and more! AWS CodeCommit Amazon API Gateway Amazon Alexa AWS IoT AWS Step Functions
  10. How can serverless applications help manage development? © 2018 Amazon

    Web Services, Inc. or its Affiliates. All rights reserved.
  11. 3 simple ways © 2018 Amazon Web Services, Inc. or

    its Affiliates. All rights reserved. AWS EVENT SOURCES INTERNAL PROCESSES EXTERNAL WEB HOOKS AWS Account Events Step Functions And CloudWatch Scheduled Events API Gateway
  12. AWS Event Sources AWS provided information © 2018 Amazon Web

    Services, Inc. or its Affiliates. All rights reserved.
  13. Management Event Sources © 2018 Amazon Web Services, Inc. or

    its Affiliates. All rights reserved. AWS CodeCommit AWS CloudTrail AWS Config Events • Push to Branch (all or named branch) • Create Branch • Delete Branch e.g. on push to a specified branch, setup a new test environment with sample data by triggering Amazon CloudFormation to build your infrastructure Events • Amazon S3 event trigger (CloudTrail records all data to an S3 bucket) • Or scheduled CloudWatch Event (cron) e.g. regularly check for out of hours API activity from your development team Events • AWS Custom configuration rules • Periodic or Configuration changes e.g. create rule that no Lambda function role should have delete permissions on a Amazon DynamoDB table Useful for Compliance
  14. Amazon CloudWatch Events © 2018 Amazon Web Services, Inc. or

    its Affiliates. All rights reserved. Event Sources • Can trigger off multiple different AWS events • E.g. AWS console sign in events or CloudFormation events • Can trigger a Lambda function to run on event CloudWatch Event Patterns AWS Events
  15. AWS Step Functions © 2018 Amazon Web Services, Inc. or

    its Affiliates. All rights reserved. Step Functions Task Choice Failure capture Parallel Tasks Build distributed applications using visual workflows • Automation of your organisational processes • Most management processes are multi-step so Step Functions is often a good fit • Multi-step processes can include manual approvals
  16. Amazon CloudWatch Events © 2018 Amazon Web Services, Inc. or

    its Affiliates. All rights reserved. Scheduled Events (cron) • Can run events from 1 minute up to yearly • Can run a Step Function or a Lambda function as well as many other options • Useful for things like automation and process including backup, archiving and analytics CloudWatch Scheduled Events (cron)
  17. External Web Hooks Third party and external events © 2018

    Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  18. Amazon API Gateway © 2018 Amazon Web Services, Inc. or

    its Affiliates. All rights reserved. Create, publish, maintain, monitor, and secure APIs at any scale • API Gateway endpoint call can trigger a Lambda function* • Easy way to connect a third party webhook into a Lambda function • Simple webhook integration • External event triggers *API Gateway can connect to many other services, not just Lambda Amazon API Gateway HTTP API Frontend for your Backend Services
  19. Example: Slackbot © 2018 Amazon Web Services, Inc. or its

    Affiliates. All rights reserved. Amazon API Gateway “webhook” Slack Custom /slash command Sends HTTP POST Custom Lambda Function
  20. Starling Bank © 2018 Amazon Web Services, Inc. or its

    Affiliates. All rights reserved. Startup Digital only, mobile only Bank in UK • Slackbot to Automate Privilege management across accounts • Multiple AWS accounts, single user account • Slackbot to request change in privileges (e.g. in prod account) • Lambda function updates IAM privileges Amazon API Gateway Slackbot AWS Lambda AWS IAM
  21. What are the take aways? © 2018 Amazon Web Services,

    Inc. or its Affiliates. All rights reserved.
  22. Managing Serverless Development © 2018 Amazon Web Services, Inc. or

    its Affiliates. All rights reserved. • Identify AWS events that can provide your organisation with greater insight • Develop workflows and automate around your organisations existing patterns using Step Functions and CloudWatch Scheduled Events • Utilise incoming webhooks e.g. Slackbots to allow third party tools to generate events inside your AWS environment
  23. Thank you Paul Johnston Senior Developer Advocate – Serverless [email protected]

    @PaulDJohnston © 2018 Amazon Web Services, Inc. or its Affiliates. All rights reserved.