mirror of
https://github.com/serverless/serverless.git
synced 2025-12-08 19:46:03 +00:00
15 lines
317 B
JavaScript
15 lines
317 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,
|
|
}),
|
|
}
|
|
}
|