I'm using the AWS Java SDK 2 with Java 17 on Windows 10. I have my AWS credentials configured correctly for the CLI/SDK/etc. On my local machine I'm testing sending an event to EventBridge. Using the EventBridge examples using SDK for Java 2.x I created extremely simple code like this:
Region region = Region.…; //matches my AWS configuration default region
EventBridgeClient eventBridgeClient = EventBridgeClient.builder().region(region).build();
String json = "{\"Message\": \"This event was generated by example code.\"}";
PutEventsRequestEntry entry = PutEventsRequestEntry.builder()
.source(MyEmitter.class.getSimpleName())
.detail(json)
.detailType(MyDAO.class.getSimpleName())
.build();
Notice that I forgot to even indicate an event bus name. And because I didn't specify an endpoint, I expected it to fail (thinking that I had to point it to a local EventBridge instance, not considering that it might just connect to the real AWS by default).
I ran this and it succeeded! But where did the event go? Did it go to the account default EventBridge bus? I logged into the AWS console and went to CloudTrail, but I don't see any EventBridge events. According to Log and monitor in Amazon EventBridge:
CloudTrail is enabled on your AWS account when you create your account. When an event occurs in EventBridge, CloudTrail records the event in Event history.
This sounds like logging of EventBridge events happens automatically, but I don't see any of them. Am I looking in the right place?
Where did the AWS Java SDK send the EventBridge event which apparently succeeded, and where can I find a record of this?