mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
15 lines
321 B
JavaScript
15 lines
321 B
JavaScript
'use strict';
|
|
|
|
module.exports.handler = async (event, context) => {
|
|
if (event && event.shouldFail) throw new Error('Failed on request');
|
|
return {
|
|
statusCode: 200,
|
|
body: JSON.stringify({
|
|
message: 'Invoked',
|
|
event,
|
|
clientContext: context.clientContext,
|
|
env: process.env,
|
|
}),
|
|
};
|
|
};
|