

# Create an AWS Transit Gateway SSE connect attachment

Create an SSE connect attachment to send traffic from the networks attached to your transit gateway through SSE connect to a provider-managed security service edge (SSE) for access control and security inspection, without deploying inspection infrastructure in your VPCs. You create an SSE connect attachment from the SSE connect, not from the transit gateway. You specify the SSE connect and the Amazon Resource Name (ARN) of the transit gateway to attach it to. After SSE connect creates the attachment, it appears on the transit gateway as an attachment with a resource type of `sse-connect`.

Before you begin, make sure that you meet the following prerequisites:
+ You own an SSE connect.
+ You have a transit gateway that has encryption support, 1:1 NAT, and policy-based routing disabled.
+ If a different account owns the transit gateway, the transit gateway owner has shared it with your account using AWS Resource Access Manager (AWS RAM). For more information about sharing a transit gateway, see [Shared transit gateways](working-with-transit-gateways.md#transit-gateway-share).

**To create an SSE connect attachment using the console**

1. Open the Network Manager console at [https://console.aws.amazon.com/networkmanager/home/](https://console.aws.amazon.com/networkmanager/home).

1. In the navigation pane, choose **SSE connects**.

1. Select the SSE connect. The SSE connect must be in the **Available** state.

1. On the **Attachments** tab, choose **Add attachment**.

1. For **Attachment type**, choose **Transit Gateway**.

1. For **Transit gateways**, choose the transit gateway. The list includes available transit gateways in all of your Regions, including transit gateways that are shared with you.

1. (Optional) Under **Tags**, add tags to the attachment.

1. Choose **Add attachment**.

In the following commands, replace the example values in italics with your own.

**To create an SSE connect attachment using the AWS CLI**

1. To create the attachment, run the following AWS CLI [create-sse-connect-transit-gateway-attachment](https://docs.aws.amazon.com/cli/latest/reference/networkmanager/create-sse-connect-transit-gateway-attachment.html) command.

   ```bash
   aws networkmanager create-sse-connect-transit-gateway-attachment \
     --sse-connect-id {{sse-connect-1234567890abcdef0}} \
     --transit-gateway-arn {{arn:aws:ec2:us-east-1:555555555555:transit-gateway/tgw-1234567890abcdef0}} \
     --tags Key=Name,Value={{my-sse-connect-attachment}}
   ```

   The command returns the attachment in the `CREATING` state. Note the `SseConnectTransitGatewayAttachmentId` in the output.

1. To check the state of the attachment, run the following AWS CLI [get-sse-connect-transit-gateway-attachment](https://docs.aws.amazon.com/cli/latest/reference/networkmanager/get-sse-connect-transit-gateway-attachment.html) command.

   ```bash
   aws networkmanager get-sse-connect-transit-gateway-attachment \
     --sse-connect-transit-gateway-attachment-id {{sse-connect-tgw-attach-1234567890abcdef0}}
   ```

   After SSE connect creates the attachment on the transit gateway, the output also includes the transit gateway attachment ID (`TransitGatewayAttachmentId`).

**Tip**  
If the attachment is still in the `CREATING` state, wait a few minutes and run the command again. If the attachment becomes `FAILED`, verify that the transit gateway exists and is shared with your account.

What happens next depends on who owns the transit gateway:
+ If you own the transit gateway, AWS accepts the attachment automatically, and the attachment becomes `AVAILABLE`.
+ If a different account owns the transit gateway, the attachment stays in the `PENDING_ATTACHMENT_ACCEPTANCE` state until the transit gateway owner accepts or rejects it. If the owner accepts it, the attachment becomes `AVAILABLE`. If the owner rejects it, the attachment becomes `REJECTED` with the state reason `TRANSIT_GATEWAY_OWNER_REJECTED`. For more information about accepting and rejecting SSE connect attachments, see [Accept or reject a transit gateway SSE connect attachment](accept-reject-sse-connect-attachment.md).
+ If the transit gateway doesn't exist or isn't shared with your account, the attachment becomes `FAILED`.

**Next steps**  
After the attachment is available, the transit gateway owner associates it with a transit gateway route table and enables route propagation. For more information about routing traffic through an SSE connect attachment, see [Route traffic through a transit gateway SSE connect attachment](route-traffic-sse-connect-attachment.md).