AWS Lambda in Practice

32
λ in Practice or how i learned to stop worrying and love not having servers

Transcript of AWS Lambda in Practice

Page 1: AWS Lambda in Practice

λ in Practice or how i learned to stop worrying and love not having servers

Page 2: AWS Lambda in Practice

@tobyhede

Toby Hede

OH HAI

100%

Technology LeadDigital Transformation OfficeTeh GOvernment

************

Page 3: AWS Lambda in Practice
Page 4: AWS Lambda in Practice

BackgroundWhat is it?

Why λ?

Page 5: AWS Lambda in Practice

——————————————————————————————

All-of-Gov Performance Dashboard

Measure the performance of government services against metrics defined in the Digital Service Standard.

Page 6: AWS Lambda in Practice

——————————————————————————————

All-of-Gov Performance Dashboard

Measure the performance of government services against metrics defined in the Digital Service Standard.

Drive the continuous improvement of government services for users and increase government transparency.

Page 7: AWS Lambda in Practice

——————————————————————————————

Data๏ Multiple data sources๏ Disparate data sources๏ We don’t actually know what they all are yet๏ We don’t know how much of it we will have

Page 8: AWS Lambda in Practice

Obligatory GIF

Page 9: AWS Lambda in Practice
Page 10: AWS Lambda in Practice

——————————————————————————————

Data๏ Connect all the moving pieces๏ Transform data from many different sources๏ Move fast๏ Adapt quickly

Page 11: AWS Lambda in Practice

ArchitectureHow are we using λ?

Page 12: AWS Lambda in Practice

——————————————————————————————

Caveats

We are just finishing AlphaProduction this week, pending approvalsGoing into Beta phaseExpanding our usage of λ

Page 13: AWS Lambda in Practice
Page 14: AWS Lambda in Practice

YOUR SHIPMENT OF CLOUD HAS ARRIVED

Page 15: AWS Lambda in Practice
Page 16: AWS Lambda in Practice
Page 17: AWS Lambda in Practice
Page 18: AWS Lambda in Practice

Serverless Framework

Configuration

Environments

Deployment

Page 19: AWS Lambda in Practice

——————————————————————————————

Random Thoughts

Vendor Lock InDependenciesSecurityTestingWhat about other Amazon products and/or servicesZero infrastructure and a surprising amount of configuration

Page 20: AWS Lambda in Practice

——————————————————————————————

Vendor Lock In• Meh

Page 21: AWS Lambda in Practice

Businesswoman with question marks behind her, hard decision

Page 22: AWS Lambda in Practice

What about vendor lock-in!!!!?

Page 23: AWS Lambda in Practice

Convert to an express function

Page 24: AWS Lambda in Practice

——————————————————————————————

An aside

Page 25: AWS Lambda in Practice
Page 26: AWS Lambda in Practice
Page 27: AWS Lambda in Practice

——————————————————————————————

Security and IAM• AmazonAPIGatewayAdministrator• AWSLambdaFullAccess• AWSLambdaVPCAccessExecutionRole• ec2:DescribeSecurityGroups• ec2:DescribeSubnets• Built-in Serverless Policy

Page 28: AWS Lambda in Practice

——————————————————————————————

Dependencies• Requires some planning• Nest packages with npm• Favour reimplementation of simple helpers rather

then pull in a dependency

Page 29: AWS Lambda in Practice

——————————————————————————————

Testing• Unit test functions• If testing a function is hard, you are doing it wrong• ava is good• Can run Serverless locally using a plugin

Page 30: AWS Lambda in Practice

——————————————————————————————

What about other AWS products• Possible for future development• We’ve played it safe on the database tier• Some limitations to what Gov can support• Contenders:

• Kinesis• Elastic search

Page 31: AWS Lambda in Practice

——————————————————————————————

Configuration

Serverless means replying infrastructure with configurationDon’t underestimate the complexity

Page 32: AWS Lambda in Practice

THE END

100%

@tobyhedetobyhede.com

************