Using AWS .NET SDK, I tried to put event with EventBridge and then track it with CloudWatch.
How I put event:
using (var eventClient = new AmazonEventBridgeClient(credentials, RegionEndpoint.USEast1))
{
PutEventsResponse result = await eventClient.PutEventsAsync( new PutEventsRequest
{
Entries = new List<PutEventsRequestEntry>
{
new PutEventsRequestEntry
{
DetailType = "TestEvent",
EventBusName = "default",
Source = "mySource",
Detail = JsonConvert.SerializeObject(new TestClass{ Message = "myMessage"}),
Time = DateTime.UtcNow
}
}
});
}
And what I see in logs
Can somebody explain me, why I don't see the Detail and DetailType I defined? Maybe I do something wrong?
Thank you in advance
Okey, I finally found solution. All, what I need, was to configure input to my rule target
Here I chose Part of the matched event and defined what I want to receive. But, this variant isn't available for CloudWatch Logs Target, so this answer isn't complete at all.