Back to home

aws-lambda/

node

Version: 0.1.2

Last Updated: Unknown


Module files

1const AWS = require('aws-sdk');
2const S3 = new AWS.S3();
3const EXAMPLE_ENV_VAR = process.env.EXAMPLE_ENV_VAR || '';
4
5exports.handler = async function (event, context) {
6 try {
7 // We got something besides a GET, POST, or DELETE
8 return {
9 statusCode: 200,
10 headers: {},
11 body: 'Success',
12 };
13 } catch (error) {
14 var body = error.stack || JSON.stringify(error, null, 2);
15 return {
16 statusCode: 400,
17 headers: {},
18 body: body,
19 };
20 }
21};

Install


Lift generate


Repository

https://github.com/okeeffed/pkg-lift-aws-lambda

Sections