an experiment with aws lambda

16
An experiment with AWS Lambda EBI Skills Mapper Daniel Vaughan @DanielVaughan www.ebi.ac.uk

Upload: daniel-vaughan

Post on 22-Feb-2017

94 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: An experiment with AWS Lambda

An experiment with AWS LambdaEBI Skills Mapper

Daniel [email protected]

Page 2: An experiment with AWS Lambda

The Problem• Map the skills and interests of our developers

• Easy to interact with and no registration

• Enable finding patterns in the data

Page 3: An experiment with AWS Lambda

The Graph Database

Amazon EC2t2.micro with

8GB SSD

+ +

Page 4: An experiment with AWS Lambda

AWS Lambda

Lambda

• Language runtime vs. container or VM

• Functions are unit of deployment

• Java 8, Node.js or Python 2.7

• Linux containers + packing algorithm

• Scaling handling for you

• Stateless – permanent storage is

elsewhere

• Pay per request

Page 5: An experiment with AWS Lambda

Getting email in

SES(Simple Email Service)

Lambda SNS(Simple Notification Service)

To: [email protected]: nodejs aws-lambda

Page 6: An experiment with AWS Lambda

Processing email

SNS(Simple Notification Service)

Lambda Graph Database

Lambda

DynamoDB

Page 7: An experiment with AWS Lambda

Gathering more information

SNS(Simple Notification Service)

Graph Database

Lambda

Stack Overflow API

EBI Intranet

Page 8: An experiment with AWS Lambda

Getting information out

API Gateway Lambda Graph Database

Page 9: An experiment with AWS Lambda

Serving the UI

Route 53(gcscc.site)

Webpages on S3 API Gateway

Page 10: An experiment with AWS Lambda

The Result

Page 11: An experiment with AWS Lambda

The Graph

Page 12: An experiment with AWS Lambda

What I liked• Low costs

• Very nearly free and will be even with thousands of users

• Clean architecture• Forced to have independent functions that do one

thing• Hugely powerful and flexible toolkit• Feels productive as a developer

• ~1 feature per hour (40 hours total)

Page 13: An experiment with AWS Lambda

What I didn’t like• Tools are still emerging

• node-lambda used for local execution, testing and deployment

• Can see managing many functions and will get tricky

• Setting up plumbing like SNS events and permissions not automated (for me)

• A slight delay in cold start of Node.js functions but better than Java

• Error handling needs a bit of thought

Page 14: An experiment with AWS Lambda

Future plans• Cloud Formation for Lambda• API Caching (very small $ cost)• Tuning (turn up the dial)• Editing web frontend with login and API

authentication• I am optimistic Lambda will become production

ready

Page 15: An experiment with AWS Lambda

Thanks to

Jenny ChamUX, prototyping and testing

Ken HawkinsVisual design and styling