Slide 1

Slide 1 text

Managing Serverless Development Paul Johnston – Senior Developer Advocate – Serverless © 2018 Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Slide 2

Slide 2 text

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.

Slide 3

Slide 3 text

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.

Slide 4

Slide 4 text

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

Slide 5

Slide 5 text

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

Slide 6

Slide 6 text

© 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

Slide 7

Slide 7 text

© 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

Slide 8

Slide 8 text

© 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

Slide 9

Slide 9 text

© 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

Slide 10

Slide 10 text

How can serverless applications help manage development? © 2018 Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Slide 11

Slide 11 text

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

Slide 12

Slide 12 text

AWS Event Sources AWS provided information © 2018 Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Slide 13

Slide 13 text

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

Slide 14

Slide 14 text

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

Slide 15

Slide 15 text

Internal Processes Organisational specifics © 2018 Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Slide 16

Slide 16 text

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

Slide 17

Slide 17 text

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)

Slide 18

Slide 18 text

External Web Hooks Third party and external events © 2018 Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Slide 19

Slide 19 text

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

Slide 20

Slide 20 text

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

Slide 21

Slide 21 text

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

Slide 22

Slide 22 text

What are the take aways? © 2018 Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Slide 23

Slide 23 text

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

Slide 24

Slide 24 text

aws.amazon.com/serverless © 2018 Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Slide 25

Slide 25 text

Thank you Paul Johnston Senior Developer Advocate – Serverless [email protected] @PaulDJohnston © 2018 Amazon Web Services, Inc. or its Affiliates. All rights reserved.