WarsawJS Slides: Writing your first Amazon lambda using JS

We talk about JavaScript. Each month in Warsaw, Poland.


Piotr Zientara

"Writing your first Amazon lambda using JS"



About me

Today morning...

This presentation plan

What is an AWS Lambda?

How to start?

Other tutorials

Here is a good one, but huge!


How to start?

Example lambda in Node.js

            'use strict';
            console.log('Loading event');

            exports.handler = function(event, context) {
              var hello = { "Hello":"World" }
              // SUCCESS with message
              context.done(null, hello);

Another example with params

                console.log('Loading event');

                exports.myHandler = function(event, context, callback) {
                    console.log("value1 = " + event.key1);
                    console.log("value2 = " + event.key2);
                    callback(null, "some success message");
                    // or
                    // callback("some error type");

What year do we have?


Let's follow this idea!

Simple function with API Gateway (1/2)

Simple function with API Gateway (2/2)

Hold up! Live coding session!

What can go wrong? ;-)

Is coding like philosophy?

Philosophy is like trying to open a safe with a combination lock: each little adjustment of the dials seems to achieve nothing, only when everything is in place does the door open.

Ludwig Wittgenstein

What might go wrong?

What I was expecting to be different?

Examples of using

My case on production project

Strong sides of Amazon Lambda

Thanks for watching!




Social Networks


Most popular talks this year!

This year organizers

See you next month at WarsawJS#26 (second Wednesday of October)