petr ferschmann: aws lambda aneb ať žije funkce jako služba

Post on 12-Apr-2017

24 Views

Category:

Internet

7 Downloads

Preview:

Click to see full reader

TRANSCRIPT

ODSERVERUJTE SE S LAMBDOU PETR FERSCHMANN

VIDEOPODCASTnejen pro vývojáře

Vysoká dostupnost

AWS Lambda

export default function (event, context, callback) { console.log(event); const response = { statusCode: 200, headers: { "x-custom-header":"My Header Value” }, body: JSON.stringify({"message":"Hello World!"}) }; callback(null, response); };

Cena

▸ $0.20 za 1 mil. spuštění

▸ 1000 ms x 1 GiB = $0.0000166760 * 60 * 24 s x 1 GiB = $1,44

Typy událostí pro spuštění Lambda

1. HTTP Request / API Gateway2. Přímé zavolání 3. Události v platformě

AWS Lambda

export default function (event, context, callback) { console.log(event); const response = { statusCode: 200, headers: { "x-custom-header":"My Header Value” }, body: JSON.stringify({"message":"Hello World!"}) }; callback(null, response); };

8

Petr Ferschmann

@fersman

petr@ferschmann.cz

www.ferschmann.cz

top related