An experiment with AWS Lambda

Preview:

Citation preview

An experiment with AWS LambdaEBI Skills Mapper

Daniel Vaughan@DanielVaughanwww.ebi.ac.uk

The Problem• Map the skills and interests of our developers

• Easy to interact with and no registration

• Enable finding patterns in the data

The Graph Database

Amazon EC2t2.micro with

8GB SSD

+ +

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

Getting email in

SES(Simple Email Service)

Lambda SNS(Simple Notification Service)

To: i.am.using@gcscc.siteSubject: nodejs aws-lambda

Processing email

SNS(Simple Notification Service)

Lambda Graph Database

Lambda

DynamoDB

Gathering more information

SNS(Simple Notification Service)

Graph Database

Lambda

Stack Overflow API

EBI Intranet

Getting information out

API Gateway Lambda Graph Database

Serving the UI

Route 53(gcscc.site)

Webpages on S3 API Gateway

The Result

The Graph

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)

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

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

Thanks to

Jenny ChamUX, prototyping and testing

Ken HawkinsVisual design and styling

Try it out

To: i.learned.from@gcscc.siteSubject: dvaughan@ebi.ac.uk aws-lambda