Skip to content
This repository has been archived by the owner on Jul 20, 2024. It is now read-only.

Commit

Permalink
v1.0.1 - update templates to accomadate aws sdk changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve Higgs committed Oct 13, 2017
1 parent d576c51 commit 3254512
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
6 changes: 5 additions & 1 deletion example/mynicefunction/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import {Handler} from 'aws-lambda';

const func: Handler = (event, context, callback) => {
return callback(undefined, `key1: ${event.key1}`); // Echo back the first key value
if (!callback) {
return;
}

callback(null, { key1: `${event.key1}`}); // Echo back the value in the property key1
};

export default func;
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aws-lambda-typescript",
"version": "1.0.0",
"version": "1.0.1",
"description": "simple build pipeline for creating lambda functions in typescript",
"main": "index.js",
"scripts": {
Expand Down
10 changes: 7 additions & 3 deletions templates/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import {Callback, Handler} from 'aws-lambda';
import {Handler} from 'aws-lambda';

const func: Handler = (event, context, callback: Callback) => {
return callback(undefined, `key1: ${event.key1}`); // Echo back the value in the property key1
const func: Handler = (event, context, callback) => {
if (!callback) {
return;
}

callback(null, { key1: `${event.key1}`}); // Echo back the value in the property key1
};

export default func;

0 comments on commit 3254512

Please sign in to comment.