AWS Lambda, Good for the little things Some use...

33
AWS Lambda, Good for the little things Some use cases Carl Simpson Technical Architect Zen Internet Limited

Transcript of AWS Lambda, Good for the little things Some use...

Page 1: AWS Lambda, Good for the little things Some use casesfiles.meetup.com/2155511/AWS_Lambda_Good_For_The_Little_Thin… · CloudFormation – Inconsistent Lambda triggers S3 Team AWS::S3::Bucket

AWS Lambda, Good for the little things – Some use cases

Carl Simpson

Technical Architect – Zen Internet Limited

Page 2: AWS Lambda, Good for the little things Some use casesfiles.meetup.com/2155511/AWS_Lambda_Good_For_The_Little_Thin… · CloudFormation – Inconsistent Lambda triggers S3 Team AWS::S3::Bucket

V1.0 AWS Lambda, Good for the little things

8/09/2016

Components

The Use Cases

Gotcha’s

Questions(?)

Agenda

Page 3: AWS Lambda, Good for the little things Some use casesfiles.meetup.com/2155511/AWS_Lambda_Good_For_The_Little_Thin… · CloudFormation – Inconsistent Lambda triggers S3 Team AWS::S3::Bucket

V1.0 AWS Lambda, Good for the little things

8/09/2016

Components

Page 4: AWS Lambda, Good for the little things Some use casesfiles.meetup.com/2155511/AWS_Lambda_Good_For_The_Little_Thin… · CloudFormation – Inconsistent Lambda triggers S3 Team AWS::S3::Bucket

V1.0 AWS Lambda, Good for the little things

8/09/2016

• You write the code, Lambda runs it

• Node.js / Java / Python

• 100ms of CPU @128MB RAM = $0.000000208

Components - AWS Lambda

Page 5: AWS Lambda, Good for the little things Some use casesfiles.meetup.com/2155511/AWS_Lambda_Good_For_The_Little_Thin… · CloudFormation – Inconsistent Lambda triggers S3 Team AWS::S3::Bucket

V1.0 AWS Lambda, Good for the little things

8/09/2016

Components – Lambda’s friends

Page 6: AWS Lambda, Good for the little things Some use casesfiles.meetup.com/2155511/AWS_Lambda_Good_For_The_Little_Thin… · CloudFormation – Inconsistent Lambda triggers S3 Team AWS::S3::Bucket

V1.0 AWS Lambda, Good for the little things

8/09/2016

Use Cases

Page 7: AWS Lambda, Good for the little things Some use casesfiles.meetup.com/2155511/AWS_Lambda_Good_For_The_Little_Thin… · CloudFormation – Inconsistent Lambda triggers S3 Team AWS::S3::Bucket

V1.0 AWS Lambda, Good for the little things

8/09/2016

Use case 1

Page 8: AWS Lambda, Good for the little things Some use casesfiles.meetup.com/2155511/AWS_Lambda_Good_For_The_Little_Thin… · CloudFormation – Inconsistent Lambda triggers S3 Team AWS::S3::Bucket

V1.0 AWS Lambda, Good for the little things

8/09/2016

Use Case 1: Take Regular EBS snapshots of important volumes

Important

Important

Reliable:

Page 9: AWS Lambda, Good for the little things Some use casesfiles.meetup.com/2155511/AWS_Lambda_Good_For_The_Little_Thin… · CloudFormation – Inconsistent Lambda triggers S3 Team AWS::S3::Bucket

V1.0 AWS Lambda, Good for the little things

8/09/2016

Use Case 1: Regular EBS volume snapshots

Page 10: AWS Lambda, Good for the little things Some use casesfiles.meetup.com/2155511/AWS_Lambda_Good_For_The_Little_Thin… · CloudFormation – Inconsistent Lambda triggers S3 Team AWS::S3::Bucket

V1.0 AWS Lambda, Good for the little things

8/09/2016

Use Case 1: Regular EBS volume snapshots

Page 11: AWS Lambda, Good for the little things Some use casesfiles.meetup.com/2155511/AWS_Lambda_Good_For_The_Little_Thin… · CloudFormation – Inconsistent Lambda triggers S3 Team AWS::S3::Bucket

V1.0 AWS Lambda, Good for the little things

8/09/2016

Use case 2

Page 12: AWS Lambda, Good for the little things Some use casesfiles.meetup.com/2155511/AWS_Lambda_Good_For_The_Little_Thin… · CloudFormation – Inconsistent Lambda triggers S3 Team AWS::S3::Bucket

V1.0 AWS Lambda, Good for the little things

8/09/2016

Use Case 2: Development Database

Developers

Page 13: AWS Lambda, Good for the little things Some use casesfiles.meetup.com/2155511/AWS_Lambda_Good_For_The_Little_Thin… · CloudFormation – Inconsistent Lambda triggers S3 Team AWS::S3::Bucket

V1.0 AWS Lambda, Good for the little things

8/09/2016

Use Case 2: Development Database

Page 14: AWS Lambda, Good for the little things Some use casesfiles.meetup.com/2155511/AWS_Lambda_Good_For_The_Little_Thin… · CloudFormation – Inconsistent Lambda triggers S3 Team AWS::S3::Bucket

V1.0 AWS Lambda, Good for the little things

8/09/2016

Use Case 2: Development Database

Page 15: AWS Lambda, Good for the little things Some use casesfiles.meetup.com/2155511/AWS_Lambda_Good_For_The_Little_Thin… · CloudFormation – Inconsistent Lambda triggers S3 Team AWS::S3::Bucket

V1.0 AWS Lambda, Good for the little things

8/09/2016

Use Case 2: Development Database

Page 16: AWS Lambda, Good for the little things Some use casesfiles.meetup.com/2155511/AWS_Lambda_Good_For_The_Little_Thin… · CloudFormation – Inconsistent Lambda triggers S3 Team AWS::S3::Bucket

V1.0 AWS Lambda, Good for the little things

8/09/2016

Use Case 2: Development Database

Page 17: AWS Lambda, Good for the little things Some use casesfiles.meetup.com/2155511/AWS_Lambda_Good_For_The_Little_Thin… · CloudFormation – Inconsistent Lambda triggers S3 Team AWS::S3::Bucket

V1.0 AWS Lambda, Good for the little things

8/09/2016

Use Case 2: Development Database

Page 18: AWS Lambda, Good for the little things Some use casesfiles.meetup.com/2155511/AWS_Lambda_Good_For_The_Little_Thin… · CloudFormation – Inconsistent Lambda triggers S3 Team AWS::S3::Bucket

V1.0 AWS Lambda, Good for the little things

8/09/2016

Use case 3

Page 19: AWS Lambda, Good for the little things Some use casesfiles.meetup.com/2155511/AWS_Lambda_Good_For_The_Little_Thin… · CloudFormation – Inconsistent Lambda triggers S3 Team AWS::S3::Bucket

V1.0 AWS Lambda, Good for the little things

8/09/2016

• Lock down environment access to trusted IP addresses

• Allow AWS Services access for monitoring

• Not to worry about AWS Service IPs changing

• This was provided by AWS on their blog: https://blogs.aws.amazon.com/security (but I did help fix it )

Use Case 3: Auto-updating Security Group

Page 20: AWS Lambda, Good for the little things Some use casesfiles.meetup.com/2155511/AWS_Lambda_Good_For_The_Little_Thin… · CloudFormation – Inconsistent Lambda triggers S3 Team AWS::S3::Bucket

V1.0 AWS Lambda, Good for the little things

8/09/2016

Use Case 3: Auto-updating Security Group

Page 21: AWS Lambda, Good for the little things Some use casesfiles.meetup.com/2155511/AWS_Lambda_Good_For_The_Little_Thin… · CloudFormation – Inconsistent Lambda triggers S3 Team AWS::S3::Bucket

V1.0 AWS Lambda, Good for the little things

8/09/2016

Use Case 3: Auto-updating Security Group

Page 22: AWS Lambda, Good for the little things Some use casesfiles.meetup.com/2155511/AWS_Lambda_Good_For_The_Little_Thin… · CloudFormation – Inconsistent Lambda triggers S3 Team AWS::S3::Bucket

V1.0 AWS Lambda, Good for the little things

8/09/2016

Use Case 3: Auto-updating Security Group

Page 23: AWS Lambda, Good for the little things Some use casesfiles.meetup.com/2155511/AWS_Lambda_Good_For_The_Little_Thin… · CloudFormation – Inconsistent Lambda triggers S3 Team AWS::S3::Bucket

V1.0 AWS Lambda, Good for the little things

8/09/2016

Use Case 3: Auto-updating Security Group

Page 24: AWS Lambda, Good for the little things Some use casesfiles.meetup.com/2155511/AWS_Lambda_Good_For_The_Little_Thin… · CloudFormation – Inconsistent Lambda triggers S3 Team AWS::S3::Bucket

V1.0 AWS Lambda, Good for the little things

8/09/2016

Use case 4

Page 25: AWS Lambda, Good for the little things Some use casesfiles.meetup.com/2155511/AWS_Lambda_Good_For_The_Little_Thin… · CloudFormation – Inconsistent Lambda triggers S3 Team AWS::S3::Bucket

V1.0 AWS Lambda, Good for the little things

8/09/2016

• Maintain customised, patched (Windows) AMIs

• Share AMIs with customer accounts

• Low operational overhead

Use Case 4: Custom AMI builds (Windows)

Page 26: AWS Lambda, Good for the little things Some use casesfiles.meetup.com/2155511/AWS_Lambda_Good_For_The_Little_Thin… · CloudFormation – Inconsistent Lambda triggers S3 Team AWS::S3::Bucket

V1.0 AWS Lambda, Good for the little things

8/09/2016

Use Case 4: Automated Custom Windows AMI builds

Page 27: AWS Lambda, Good for the little things Some use casesfiles.meetup.com/2155511/AWS_Lambda_Good_For_The_Little_Thin… · CloudFormation – Inconsistent Lambda triggers S3 Team AWS::S3::Bucket

V1.0 AWS Lambda, Good for the little things

8/09/2016

Gotcha’s

Page 28: AWS Lambda, Good for the little things Some use casesfiles.meetup.com/2155511/AWS_Lambda_Good_For_The_Little_Thin… · CloudFormation – Inconsistent Lambda triggers S3 Team AWS::S3::Bucket

V1.0 AWS Lambda, Good for the little things

8/09/2016

CloudFormation – Inconsistent Lambda triggers

S3 Team

AWS::S3::Bucket

(“NotificationConfiguration”)

SNS Team

AWS::Lambda::Permission

CloudWatch Team

AWS::Events::Rule

Page 29: AWS Lambda, Good for the little things Some use casesfiles.meetup.com/2155511/AWS_Lambda_Good_For_The_Little_Thin… · CloudFormation – Inconsistent Lambda triggers S3 Team AWS::S3::Bucket

V1.0 AWS Lambda, Good for the little things

8/09/2016

SNS – AWS Managed Notifications

Page 30: AWS Lambda, Good for the little things Some use casesfiles.meetup.com/2155511/AWS_Lambda_Good_For_The_Little_Thin… · CloudFormation – Inconsistent Lambda triggers S3 Team AWS::S3::Bucket

V1.0 AWS Lambda, Good for the little things

8/09/2016

SNS Topics I’ve come across:

– arn:aws:sns:us-east-1:806199016981:AmazonIpSpaceChanged

– arn:aws:sns:us-east-1:801119661308:ec2-windows-ami-update

– arn:aws:sns:us-east-1:801119661308:ec2-windows-ami-private

– arn:aws:sns:us-east-1:801119661308:ec2-windows-ec2config

SNS – AWS Managed Notifications

Page 31: AWS Lambda, Good for the little things Some use casesfiles.meetup.com/2155511/AWS_Lambda_Good_For_The_Little_Thin… · CloudFormation – Inconsistent Lambda triggers S3 Team AWS::S3::Bucket

V1.0 AWS Lambda, Good for the little things

8/09/2016

SNS – AWS Managed Notifications

Page 32: AWS Lambda, Good for the little things Some use casesfiles.meetup.com/2155511/AWS_Lambda_Good_For_The_Little_Thin… · CloudFormation – Inconsistent Lambda triggers S3 Team AWS::S3::Bucket

V1.0 AWS Lambda, Good for the little things

8/09/2016

• Lambda’s also good for little things too!

• Give it a go

• Ask me about it later

Summary

Page 33: AWS Lambda, Good for the little things Some use casesfiles.meetup.com/2155511/AWS_Lambda_Good_For_The_Little_Thin… · CloudFormation – Inconsistent Lambda triggers S3 Team AWS::S3::Bucket

V1.0 AWS Lambda, Good for the little things

8/09/2016

Questions?