Theo Ferreira
09/22/2021, 4:52 AMFrank
Frank
Invoking the secondary lambda from a lambda attached to API Gateway works 100%Do you mean the first Lambda makes an http request to the Api endpoint, and that works?
Theo Ferreira
09/22/2021, 6:02 AMTheo Ferreira
09/22/2021, 6:14 AMFrank
Frank
Theo Ferreira
09/22/2021, 6:19 AMexport default {
handler: `${__dirname.split(process.cwd())[1].substring(1).replace(/\\/g, '/')}/handler.main`,
timeout: 900,
events: [
{
eventBridge: {
eventBus: "${self:provider.environment.RESOURCE_PREFIX}-${self:provider.environment.EVENT_BRIDGE_BUS}",
pattern: {
source: ['post.INSERT','post.MODIFY','post.REMOVE'],
}
}
}
],
iamRoleStatements: [ ... (permissions to invoke a lambda) ...],
};
is this what you meant ?Theo Ferreira
09/22/2021, 6:21 AMTheo Ferreira
09/22/2021, 6:22 AMFrank
Theo Ferreira
09/22/2021, 6:26 AMFrank
Theo Ferreira
09/22/2021, 6:28 AMFrank
Theo Ferreira
09/22/2021, 6:29 AMTheo Ferreira
09/23/2021, 12:14 PMFrank