Hi,
I'm using a cloudformation file to create my test setup. The scenario is simple: put an event, use a rule to move that event to SQS, and use an InputTransformer to change the event a bit.
When loading the CFT, all is good, except that the target is not identified, and therefore the event is not present in the queue.
When I add a target using boto3 code (same target from the CFT), I can see the event in the queue (although it is not transformed - not sure if I did something wrong, or if it doesn't work as well)
using python 3.12.2
moto[all]==5.0.2
boto3==1.34.55
cfn-flip==1.3.0
pytest==8.0.2
(running on windows, I suspect it shouldn't matter, but just in case)
Full details below, but the important part is this:
Before I run events_client.put_targets
the result of events_client.list_targets_by_rule(EventBusName=event_bus_name,Rule=events_client.list_rules(EventBusName=event_bus_name)['Rules'][0]['Name']) the target list is empty (and a message is not put in SQS).
After I run events_client.put_targets, using the same data parsed from the CFT (had to manually replace the ARN, as the function was not accepted by moto, which makes sense to me) - the target is present, and events are getting to SQS.
Hi, I'm using a cloudformation file to create my test setup. The scenario is simple: put an event, use a rule to move that event to SQS, and use an InputTransformer to change the event a bit. When loading the CFT, all is good, except that the target is not identified, and therefore the event is not present in the queue. When I add a target using boto3 code (same target from the CFT), I can see the event in the queue (although it is not transformed - not sure if I did something wrong, or if it doesn't work as well)
using python 3.12.2 moto[all]==5.0.2 boto3==1.34.55 cfn-flip==1.3.0 pytest==8.0.2 (running on windows, I suspect it shouldn't matter, but just in case)
Full details below, but the important part is this: Before I run
events_client.put_targets
the result ofevents_client.list_targets_by_rule(EventBusName=event_bus_name,Rule=events_client.list_rules(EventBusName=event_bus_name)['Rules'][0]['Name'])
the target list is empty (and a message is not put in SQS). After I runevents_client.put_targets
, using the same data parsed from the CFT (had to manually replace the ARN, as the function was not accepted by moto, which makes sense to me) - the target is present, and events are getting to SQS.I'm using the following CFT:
my test: