(events): configureAsyncInvoke not called #19703
Replies: 3 comments
-
I don't think this is a bug - this seems out of the scope of what the The props (with the same names) that you're passing in to this construct are for configuring your event rule resource. If you want to configure lambda infrastructure, you'll have to create an |
Beta Was this translation helpful? Give feedback.
-
@peterwoodworth I appreciate the response. That flow wasn't clear to me from the documentation, but I can handle that. Thank you! |
Beta Was this translation helpful? Give feedback.
-
Do you have any specific suggestions on how we could improve clarity here @thomasstep? I'm not sure exactly where you got tripped up |
Beta Was this translation helpful? Give feedback.
-
What is the problem?
Whenever a Lambda is added as a target to an
event.Rule
thefunction.configureAsyncInvoke()
function needs to be called.If select props (
retryAttempts
,maxEventAge
, etc.) are included duringFunction
creation, then anAWS::Lambda::EventInvokeConfig
resource is created. If those same props are added during arule.addTarget()
call throughevents-targets.LambdaFunctionProps
, then thefunction.configureAsyncInvoke()
function is never called resulting in theAWS::Lambda::EventInvokeConfig
resource not being created.Reproduction Steps
What did you expect to happen?
I expect a
AWS::Lambda::EventInvokeConfig
resource to be created wheneverrule.addTarget()
is called.What actually happened?
No
AWS::Lambda::EventInvokeConfig
resource is created.CDK CLI Version
2.17.0 (build f9cd009)
Framework Version
No response
Node.js Version
v16.13.1
OS
MacOS 11.6.4
Language
Typescript
Language Version
TypeScript (Version 4.5.2)
Other information
No response
Beta Was this translation helpful? Give feedback.
All reactions