Skip to content

Get Transit Gateway Status changes via Amazon EventBridge

0

Hello I am trying to find a way to create a rule in EventBridge that will changes in a Transit Gateway, such as a transit gateway attachment pending. Ultimately will use SNS to email that pending notification to someone.

My problem is I can't seem to find the correct event pattern that matches Transit Gateway events. I've even been trying to create a custom Pattern, but can't seem to find what the source would be for the Transit Gateway and what detail-types are available for it. Looking for any docs that specifically help me find the source and detail types could be to create the event pattern, or if there is a better way to make this work.

Event Pattern { "source": ["aws.?"], "detail-type": [" ? State Change"] }

Any suggestions?

1 Answer
1

Hello.

I think "aws.ec2" is the event source for TransitGateway events.
If you want to change attachment settings, etc., you can get it using the "ModifyTransitGatewayVpcAttachment" event.
However, as far as I can see from the document below, it seems that the status of the TransitGateway attachment is not delivered as an event.
https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonec2.html

Therefore, I don't think it is possible to obtain the TransitGateway attachment status with EventBridge.
As another method, how about linking the EventBridge scheduler with Lambda, etc., and periodically executing describe_transit_gateway_attachments() to obtain the status?
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2/client/describe_transit_gateway_attachments.html#

EXPERT
answered 2 years ago
EXPERT
reviewed 2 years ago
EXPERT
reviewed 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.