Slide 1

Slide 1 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Rob Sutter GoDays Berlin – 23 January 2020 Serverless Ops Bye-bye Bash, Hello Go!

Slide 2

Slide 2 text

© 2020, Amazon Web Services, Inc. or its Affiliates. What’s in it for you? • Use the power of serverless to keep the rest of your resources running • Example of testing your apps ops • A pattern for orchestrating IT operations workflows in the cloud • A complete serverless IT operations workflow with code in Go • Q&A

Slide 3

Slide 3 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Agenda • Where’s my shell?! • But there are still servers! • Why serverless for ops? • Why choose Go for ops? • Testing our apps ops • General pattern • Example – AWS Backup DynamoDB rotator • Q&A

Slide 4

Slide 4 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Who am I? Rob Sutter – [email protected], @rts_rob • Senior Developer Advocate – Serverless • Gopher (and Scala type – shhh…) • Previously: • Co-founded WorkFone, a SaaS startup • Infrastructure at Le Tote, an e-commerce startup • Consulting, government, odd jobs here and there • The Florida State University, Management Information Systems ‘05

Slide 5

Slide 5 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Where’s my shell?!

Slide 6

Slide 6 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Where’s my shell?! • Instances are hidden behind bastion servers and SSH tunnels • Containers are even trickier with sidecars and other workarounds • With managed services the shell concept doesn’t even exist! Photo by Ahmed Sobah on Unsplash

Slide 7

Slide 7 text

© 2020, Amazon Web Services, Inc. or its Affiliates. But there are still servers!

Slide 8

Slide 8 text

© 2020, Amazon Web Services, Inc. or its Affiliates. No infrastructure provisioning, no management Automatic scaling Pay for value Highly available and secure What is serverless?

Slide 9

Slide 9 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Why serverless for ops?

Slide 10

Slide 10 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Comparison of operational responsibility AWS Lambda Serverless functions AWS Fargate Serverless containers ECS/EKS Container-management as a service EC2 Infrastructure-as-a-Service More opinionated Less opinionated AWS manages Customer manages • Data source integrations • Physical hardware, software, networking, and facilities • Provisioning • Application code • Container orchestration, provisioning • Cluster scaling • Physical hardware, host OS/kernel, networking, and facilities • Application code • Data source integrations • Security config and updates, network config, management tasks • Container orchestration control plane • Physical hardware software, networking, and facilities • Application code • Data source integrations • Work clusters • Security config and updates, network config, firewall, management tasks • Physical hardware software, networking, and facilities • Application code • Data source integrations • Scaling • Security config and updates, network config, management tasks • Provisioning, managing scaling and patching of servers

Slide 11

Slide 11 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Why serverless for ops? • Operations and automation tasks are irregularly executed • Runs in same the platform as your infrastructure • Takes advantage of service integrations • Fine-grained access permissions • Logging

Slide 12

Slide 12 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Why choose Go for ops?

Slide 13

Slide 13 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Why choose Go for ops? • Long support life • Concurrency • Type safety • Developer joy!

Slide 14

Slide 14 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Testing our apps ops

Slide 15

Slide 15 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Write real tests • Use dependency injection to mock cloud services

Slide 16

Slide 16 text

© 2020, Amazon Web Services, Inc. or its Affiliates. General pattern

Slide 17

Slide 17 text

© 2020, Amazon Web Services, Inc. or its Affiliates. State machine-based workflow management Initiate ops event, e.g., backup, restore, scale Check for completion Sleep for a defined period with back-off Return to sleep state or notify on completion

Slide 18

Slide 18 text

© 2020, Amazon Web Services, Inc. or its Affiliates. AWS Step Functions • Coordinate multiple services into serverless workflows • Like the func main() of a procedural serverless app • Error handling • Retries and backoff

Slide 19

Slide 19 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Example AWS Backup DynamoDB rotator

Slide 20

Slide 20 text

© 2020, Amazon Web Services, Inc. or its Affiliates. AWS Backup DynamoDB rotator

Slide 21

Slide 21 text

© 2020, Amazon Web Services, Inc. or its Affiliates. AWS Backup DynamoDB rotator https://github.com/awslabs/aws-backup-dynamodb-rotator AWS Cloud AWS Step Functions AWS Lambda Lambda function Amazon DynamoDB AWS Backup Amazon Simple Notification Service Amazon DynamoDB

Slide 22

Slide 22 text

© 2020, Amazon Web Services, Inc. or its Affiliates. AWS Backup DynamoDB rotator https://github.com/awslabs/aws-backup-dynamodb-rotator

Slide 23

Slide 23 text

© 2020, Amazon Web Services, Inc. or its Affiliates. AWS Backup DynamoDB rotator https://github.com/awslabs/aws-backup-dynamodb-rotator

Slide 24

Slide 24 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Q&A Rob Sutter @rts_rob

Slide 25

Slide 25 text

© 2020, Amazon Web Services, Inc. or its Affiliates. Thank you!