lemon-salesclerk-6224
01/11/2022, 10:07 PMaws.lambda.Function()
that name gets used exactly when the lambda is spun up, but when I pass a name to aws.lambda.CallbackFunction()
a hash is appended to the end of the name? For example if I pass test-callback
to the callback function, the lambda spun up from the callback function will be something like test-callback-9283a32
great-queen-39697
01/12/2022, 4:02 PM-9283a32
) to avoid a collision on resource names unless you explicitly pass in a name
value alongside the id
; that name
value will override the physical name. So I'm guessing that the name
property isn't available for the callback function resource where it is available for the function resource. I'll be able to point to specific spots if you've got a snippet to share.lemon-salesclerk-6224
01/13/2022, 9:37 PMlet callback = new aws.lambda.CallbackFunction(name, {
memorySize: 128 /*MB*/,
timeout: 60,
runtime: "nodejs14.x",
callback: async (e) => {
},
role: this.lambdaExecRole,
});
and for the function I do
let createdFunction = new aws.lambda.Function(physicalName, lambdaConfig, {
dependsOn: [cloudwatchGroup],
});
name
would be what you're mentioning. We do pass in names in both cases. If i pass in a name+hash to the function
call, it uses it as is, but in the callbackfunction
it appends another hash as well