aws_ecr: repository.on_event() creates an event that never fires #29815
Labels
@aws-cdk/aws-ecr
Related to Amazon Elastic Container Registry
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
Describe the bug
The event created by the method
.on_event()
of an ecr.Repository does not fire. And I suspect this is because the event behavior filters forresources
which is not specified in the ecr event.Expected Behavior
When a new image is pushed to the repository, an event should fire.
Current Behavior
No event is fired.
Reproduction Steps
We are creating the rule like this:
In the console, that creates the following event pattern:
And the event is never fired. But if instead I create the event like this:
The following event pattern is created:
And events fire as expected
Possible Solution
The event that is sent to the lambda has an empty array for
resources
. That could be why the event is not fired, if it tries to match for this property.Additional Information/Context
No response
CDK CLI Version
2.131.0 (build 92b912d)
Framework Version
aws-cdk-lib==2.131.0
Node.js Version
v18.19.0
OS
MacOS
Language
Python
Language Version
Python 3.10.10
Other information
No response
The text was updated successfully, but these errors were encountered: