Skip to content

Latest commit

 

History

History
85 lines (50 loc) · 1.93 KB

README.md

File metadata and controls

85 lines (50 loc) · 1.93 KB

Demo for Serverless@Devcon

License: CC BY-NC 4.0

This repository contains the demos for the Serverless@Devcon presentation.

Other relevant demos are related to the Alexa, S3-React and Polly conference schedule:

Simple 'Hello world' lambda. No frameworks no nothing.

$ npm run create.lambda && npm run invoke.lambda

Introduces SAM local for the 'Hello world' lambda. Requires a local installation of SAM local.

Excecute the following command to test the lambda using SAM.

$ npm run test.lambda

Extends the lambda with a REST proxy API gateway, without any frameworks.

First of all create the API gateway:

$ create_api.sh

Then create the lambda and test the gateway:

$ npm run create.lambda && npm run test.lambda.api

Shows how easy an API gateway can be created using Claudia.JS.

Create the gateway using:

$ npm run claudia.create

Test it with

$ npm test

General hints

This section offers some general tool tips and hints for dealing with aws lambda.

Add X-Ray

Amazon X-Ray can be added to lambdas easily.

TODO:

Fetching logs

(awslogs)[https://github.com/jorgebastida/awslogs] is a very useful convinience tool for retrieving CloudWatch logs.

$ awslogs get /aws/lambda/DevconScheduleApi

fetches the log stream of the lambda function DevconScheduleApi.