Skip to content

Instantly share code, notes, and snippets.

@mlevkovsky
Created July 3, 2019 22:05
Show Gist options
  • Save mlevkovsky/aa3236ae01c76cc18e5a7524a6b08fbc to your computer and use it in GitHub Desktop.
Save mlevkovsky/aa3236ae01c76cc18e5a7524a6b08fbc to your computer and use it in GitHub Desktop.
controller file
import {Callback, Context, Handler, S3Event} from 'aws-lambda';
export const s3Handler: Handler = async (event: S3Event, context: Context, cb: Callback) => {
console.log('the event that triggered is ', event);
cb(null, {message: 'S3 Handler execution completed'});
} catch (error) {
cb(error, {message: 'S3 Handler execution failed'});
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment