Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'Lambda handler classified event as reSolve event',
lambdaEvent
)
executorResult = await handleResolveEvent(lambdaEvent, resolve)
}
// API gateway event
else if (lambdaEvent.headers != null && lambdaEvent.httpMethod != null) {
resolveLog(
'debug',
'Lambda handler classified event as API gateway',
lambdaEvent.httpMethod,
lambdaEvent.headers
)
const getCustomParameters = async () => ({ resolve })
const executor = wrapApiHandler(mainHandler, getCustomParameters)
executorResult = await executor(lambdaEvent, lambdaContext)
}
// DynamoDB trigger event
else if (lambdaEvent.Records != null) {
resolveLog(
'debug',
'Lambda handler classified event as Dynamo stream',
lambdaEvent.Records
)
const applicationPromises = []
const events = lambdaEvent.Records.map(record =>
Converter.unmarshall(record.dynamodb.NewImage)
)
for (const event of events) {
const eventDescriptor = {
const apiGatewayHandler = async (lambdaEvent, lambdaContext, resolve) => {
const executor = wrapApiHandler(
mainHandler,
getCustomParameters.bind(null, resolve)
)
return await executor(lambdaEvent, lambdaContext)
}