id
stringlengths 8
78
| source
stringclasses 743
values | chunk_id
int64 1
5.05k
| text
stringlengths 593
49.7k
|
---|---|---|---|
vpc-pg-003 | vpc-pg.pdf | 3 | the requester VPC for 2 days, and visible to the owner of the accepter VPC for 2 hours. If the request was created within the same AWS account, the rejected request remains visible for 2 hours. • Provisioning: The VPC peering connection request has been accepted, and will soon be in the active state. • Active: The VPC peering connection is active, and traffic can flow between the VPCs (provided that your security groups and route tables allow the flow of traffic). While in this state, either of the VPC owners can delete the VPC peering connection, but cannot reject it. VPC peering connection lifecycle 4 Amazon Virtual Private Cloud VPC Peering Note If an event in a Region in which a VPC resides prevents the flow of traffic, the status of the VPC peering connection remains Active. • Deleting: Applies to an inter-Region VPC peering connection that is in the process of being deleted. The owner of either VPC has submitted a request to delete an active VPC peering connection, or the owner of the requester VPC has submitted a request to delete a pending- acceptance VPC peering connection request. • Deleted: An active VPC peering connection has been deleted by either of the VPC owners, or a pending-acceptance VPC peering connection request has been deleted by the owner of the requester VPC. While in this state, the VPC peering connection cannot be accepted or rejected. The VPC peering connection remains visible to the party that deleted it for 2 hours, and visible to the other party for 2 days. If the VPC peering connection was created within the same AWS account, the deleted request remains visible for 2 hours. Multiple VPC peering connections A VPC peering connection is a one to one relationship between two VPCs. You can create multiple VPC peering connections for each VPC that you own, but transitive peering relationships are not supported. You do not have any peering relationship with VPCs that your VPC is not directly peered with. The following diagram is an example of one VPC peered to two different VPCs. There are two VPC peering connections: VPC A is peered with both VPC B and VPC C. VPC B and VPC C are not peered, and you cannot use VPC A as a transit point for peering between VPC B and VPC C. If you want to enable routing of traffic between VPC B and VPC C, you must create a unique VPC peering connection between them. Multiple VPC peering connections 5 Amazon Virtual Private Cloud VPC Peering VPC peering limitations Consider the following limitations for VPC peering connections. In some cases, you can use a transit gateway attachment instead of a VPC peering connection. For more information, see Example transit gateway scenarios in Amazon VPC Transit Gateways. Connections • There is a quota on the number of active and pending VPC peering connections per VPC. For more information, see Quotas. • You cannot have more than one VPC peering connection between two VPCs at the same time. • Any tags that you create for your VPC peering connection are only applied in the account or Region in which you create them. • You cannot connect to or query the Amazon DNS server in a peer VPC. • If the IPv4 CIDR block of a VPC in a VPC peering connection falls outside of the private IPv4 address ranges specified by RFC 1918, private DNS hostnames for that VPC cannot be resolved to private IP addresses. To resolve private DNS hostnames to private IP addresses, you can enable DNS resolution support for the VPC peering connection. For more information, see Enable DNS resolution for a VPC peering connection. • You can enable resources on either side of a VPC peering connection to communicate over IPv6. You must associate an IPv6 CIDR block with each VPC, enable the instances in the VPCs for IPv6 communication, and route IPv6 traffic intended for the peer VPC to the VPC peering connection. • Unicast reverse path forwarding in VPC peering connections is not supported. For more information, see Routing for response traffic. Overlapping CIDR blocks • You cannot create a VPC peering connection between VPCs that have matching or overlapping IPv4 or IPv6 CIDR blocks. • If you have multiple IPv4 CIDR blocks, you can't create a VPC peering connection if any of the CIDR blocks overlap, even if you intend to use only the non-overlapping CIDR blocks or only IPv6 CIDR blocks. VPC peering limitations 6 Amazon Virtual Private Cloud Transitive peering VPC Peering • VPC peering does not support transitive peering relationships. For example, if there are VPC peering connections between VPC A and VPC B, and between VPC A and VPC C, you can't route traffic from VPC B to VPC C |
vpc-pg-004 | vpc-pg.pdf | 4 | that have matching or overlapping IPv4 or IPv6 CIDR blocks. • If you have multiple IPv4 CIDR blocks, you can't create a VPC peering connection if any of the CIDR blocks overlap, even if you intend to use only the non-overlapping CIDR blocks or only IPv6 CIDR blocks. VPC peering limitations 6 Amazon Virtual Private Cloud Transitive peering VPC Peering • VPC peering does not support transitive peering relationships. For example, if there are VPC peering connections between VPC A and VPC B, and between VPC A and VPC C, you can't route traffic from VPC B to VPC C through VPC A. To route traffic between VPC B and VPC C, you must create a VPC peering connection between them. For more information, see Three VPCs peered together. Edge to edge routing through a gateway or private connection • If VPC A has an internet gateway, resources in VPC B can't use the internet gateway in VPC A to access the internet. • If VPC A has an NAT device that provides internet access to subnets in VPC A, resources in VPC B can't use the NAT device in VPC A to access the internet. • If VPC A has a VPN connection to a corporate network, resources in VPC B can't use the VPN connection to communicate with the corporate network. • If VPC A has an AWS Direct Connect connection to a corporate network, resources in VPC B can't use the AWS Direct Connect connection to communicate with the corporate network. • If VPC A has a gateway endpoint that provides connectivity to Amazon S3 to private subnets in VPC A, resources in VPC B can't use the gateway endpoint to access Amazon S3. Inter-Region VPC peering connections • For jumbo frames, the Maximum Transmission Unit (MTU) between VPC peering connections within the same Region is 9001 bytes. The MTU for inter-region VPC peering connections is 8500 bytes. For more information about jumbo frames, see Jumbo frames (9001 MTU) in the Amazon EC2 User Guide. • You must enable DNS resolution support for the VPC peering connection to resolve private DNS hostnames of the peered VPC to private IP addresses, even if the IPv4 CIDR for the VPC falls into the private IPv4 address ranges specified by RFC 1918. Shared VPCs and subnets • Only VPC owners can work with (describe, create, accept, reject, modify, or delete) peering connections. Participants cannot work with peering connections. For more information see, Share your VPC with other accounts in the Amazon VPC User Guide. VPC peering limitations 7 Amazon Virtual Private Cloud VPC Peering VPC peering connections VPC peering enables you to connect two VPCs in the same or different AWS Regions. This enables instances in one VPC to communicate with instances in the other VPC as if they were all part of the same network. VPC peering creates a direct network route between the two VPCs using private IPv4 addresses or IPv6 addresses. Traffic sent between the connected VPCs does not traverse the internet, a VPN connection, or an AWS Direct Connect connection. This makes VPC peering a secure way to share resources, such as databases or web servers, across VPC boundaries. To establish a VPC peering connection, you create a peering connection request from one VPC and the owner of the other VPC accepts the request. After the connection is established, you can update your route tables to route traffic between the VPCs. This allows instances in one VPC to access resources in the other VPC. VPC peering is an important tool for building multi-VPC architectures and sharing resources across organizational boundaries in AWS. It provides a simple, low-latency way to connect VPCs without the complexity of configuring a VPN or other networking service. Use the following procedures to create and work with VPC peering connections. Tasks • Create a VPC peering connection • Accept or reject a VPC peering connection • Update your route tables for a VPC peering connection • Update your security groups to reference peer security groups • Enable DNS resolution for a VPC peering connection • Delete a VPC peering connection • Troubleshoot a VPC peering connection Create a VPC peering connection To create a VPC peering connection, first create a request to peer with another VPC. To activate the request, the owner of the accepter VPC must accept the request. The following peering connections are supported: Create 8 Amazon Virtual Private Cloud VPC Peering • Between VPCs in the same account and Region • Between VPCs in the same account and different Regions • Between VPCs in different accounts and the same Region • Between VPCs in different accounts and Regions For an inter-Region VPC peering connection, the request must be made from the Region of the requester VPC, and the request |
vpc-pg-005 | vpc-pg.pdf | 5 | create a VPC peering connection, first create a request to peer with another VPC. To activate the request, the owner of the accepter VPC must accept the request. The following peering connections are supported: Create 8 Amazon Virtual Private Cloud VPC Peering • Between VPCs in the same account and Region • Between VPCs in the same account and different Regions • Between VPCs in different accounts and the same Region • Between VPCs in different accounts and Regions For an inter-Region VPC peering connection, the request must be made from the Region of the requester VPC, and the request must be accepted from the Region of the accepter VPC. For more information, see the section called “Accept or reject”. Tasks • Prerequisites • Create a peering connection using the console • Create a peering connection using the command line Prerequisites • Review the limitations for VPC peering connections. • Ensure that the VPCs do not have overlapping IPv4 CIDR blocks. If they overlap, the status of the VPC peering connection immediately goes to failed. This limitation applies even if the VPCs have unique IPv6 CIDR blocks. Create a peering connection using the console Use the following procedure to create a VPC peering connection. To create a peering connection using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. In the navigation pane, choose Peering connections. 3. Choose Create peering connection. 4. (Optional) For Name, specify a name the VPC peering connection. This creates a tag with a key of Name and the value that you specify. 5. For VPC ID (Requester), select a VPC from the current account. 6. Under Select another VPC to peer with, do the following: Prerequisites 9 Amazon Virtual Private Cloud VPC Peering a. b. For Account, to peer with a VPC in another account, choose Another account and enter the account ID . Otherwise, keep My account. For Region, to peer with a VPC in another Region, choose Another Region and choose the Region . Otherwise, keep This Region. c. For VPC ID (Accepter), select a VPC from the specified account and Region. 7. (Optional) To add a tag, choose Add new tag and enter the tag key and tag value. 8. Choose Create peering connection. 9. The owner of the accepter account must accept the peering connection. For more information, see the section called “Accept or reject”. 10. Update the route tables for both VPCs to enable communication between them. For more information, see the section called “Update route tables”. Create a peering connection using the command line You can create a VPC peering connection using the following commands: • create-vpc-peering-connection (AWS CLI) • New-EC2VpcPeeringConnection (AWS Tools for Windows PowerShell) Accept or reject a VPC peering connection A VPC peering connection that's in the pending-acceptance state must be accepted by the owner of the accepter VPC to be activated. For more information about the Deleted peering connection status, see VPC peering connection lifecycle. You can't accept a VPC peering connection request that you sent to another AWS account. To create a VPC peering connection between VPCs in the same AWS account, you can both create and accept the request yourself. You can reject any VPC peering connection request that you've received that's in the pending- acceptance state. You should only accept VPC peering connections from AWS accounts that you know and trust; you can reject any unwanted requests. For more information about the Rejected peering connection status, see VPC peering connection lifecycle. Create a peering connection using the command line 10 Amazon Virtual Private Cloud VPC Peering Important Do not accept VPC peering connections from unknown AWS accounts. A malicious user may have sent you a VPC peering connection request to gain unauthorized network access to your VPC. This is known as peer phishing. You can safely reject unwanted VPC peering connection requests without any risk of the requester gaining access to any information about your AWS account or your VPC. For more information, see Accept or reject a VPC peering connection. You can also ignore the request and let it expire; by default, requests expire after 7 days. To accept or reject a peering connection using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. Use the Region selector to choose the Region of the accepter VPC. 3. 4. In the navigation pane, choose Peering connections. To reject a peering connection, select the VPC peering connection, and choose Actions, Reject request. When prompted for confirmation, choose Reject request. 5. To accept a peering connection, select the pending VPC peering connection (the status is pending-acceptance), and choose Actions, Accept request. For more information about peering connection lifecycle statuses, see VPC peering connection lifecycle. If there is no pending VPC peering connection, verify that you selected the Region of the |
vpc-pg-006 | vpc-pg.pdf | 6 | the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. Use the Region selector to choose the Region of the accepter VPC. 3. 4. In the navigation pane, choose Peering connections. To reject a peering connection, select the VPC peering connection, and choose Actions, Reject request. When prompted for confirmation, choose Reject request. 5. To accept a peering connection, select the pending VPC peering connection (the status is pending-acceptance), and choose Actions, Accept request. For more information about peering connection lifecycle statuses, see VPC peering connection lifecycle. If there is no pending VPC peering connection, verify that you selected the Region of the accepter VPC. 6. When prompted for confirmation, choose Accept request. 7. Choose Modify my route tables now to add a route to the VPC route table so that you can send and receive traffic across the peering connection. For more information, see Update your route tables for a VPC peering connection. To accept a peering connection using the command line • accept-vpc-peering-connection (AWS CLI) • Approve-EC2VpcPeeringConnection (AWS Tools for Windows PowerShell) Accept or reject 11 Amazon Virtual Private Cloud VPC Peering To reject a peering connection using the command line • reject-vpc-peering-connection (AWS CLI) • Deny-EC2VpcPeeringConnection (AWS Tools for Windows PowerShell) Update your route tables for a VPC peering connection To enable private IPv4 traffic between instances in peered VPCs, you must add a route to the route tables associated with the subnets for both instances. The route destination is the CIDR block (or portion of the CIDR block) of the peer VPC and the target is the ID of the VPC peering connection. For more information, see Configure route tables in the Amazon VPC User Guide. The following is an example of the route tables that enables communication between instances in two peered VPCs, VPC A and VPC B. Each table has a local route and a route that sends traffic for the peer VPC to the VPC peering connection. Route table Destination VPC A CIDR Target Local VPC A VPC B VPC B CIDR pcx-11112222 VPC B CIDR Local VPC A CIDR pcx-11112222 Similarly, if the VPCs in the VPC peering connection have associated IPv6 CIDR blocks, you can add routes that enable communication with the peer VPC over IPv6. For more information about supported route table configurations for VPC peering connections, see Common VPC peering connection configurations. Considerations • If you have a VPC peered with multiple VPCs that have overlapping or matching IPv4 CIDR blocks, ensure that your route tables are configured to avoid sending response traffic from your VPC to the incorrect VPC. AWS currently does not support unicast reverse path forwarding in Update route tables 12 Amazon Virtual Private Cloud VPC Peering VPC peering connections that checks the source IP of packets and routes reply packets back to the source. For more information, see Routing for response traffic. • Your account has a quota on the number of entries you can add per route table. If the number of VPC peering connections in your VPC exceeds the route table entry quota for a single route table, consider using multiple subnets that are each associated with a custom route table. • You can add a route for a VPC peering connection that's in the pending-acceptance state. However, the route has a state of blackhole, and has no effect until the VPC peering connection is in the active state. To add an IPv4 route for a VPC peering connection 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. 3. In the navigation pane, choose Route tables. Select the check box next to the route table that's associated with the subnet in which your instance resides. If you do not have a route table explicitly associated with that subnet, the main route table for the VPC is implicitly associated with the subnet. 4. Choose Actions, Edit routes. 5. Choose Add route. 6. For Destination, enter the IPv4 address range to which the network traffic in the VPC peering connection must be directed. You can specify the entire IPv4 CIDR block of the peer VPC, a specific range, or an individual IPv4 address, such as the IP address of the instance with which to communicate. For example, if the CIDR block of the peer VPC is 10.0.0.0/16, you can specify a portion 10.0.0.0/24, or a specific IP address 10.0.0.7/32. 7. For Target, select the VPC peering connection. 8. Choose Save changes. The owner of the peer VPC must also complete these steps to add a route to direct traffic back to your VPC through the VPC peering connection. If you have resources in different AWS Regions that use IPv6 addresses, you can create an inter- Region peering connection. You can then add an IPv6 route for communication between the resources. Update route tables 13 Amazon Virtual Private Cloud |
vpc-pg-007 | vpc-pg.pdf | 7 | the CIDR block of the peer VPC is 10.0.0.0/16, you can specify a portion 10.0.0.0/24, or a specific IP address 10.0.0.7/32. 7. For Target, select the VPC peering connection. 8. Choose Save changes. The owner of the peer VPC must also complete these steps to add a route to direct traffic back to your VPC through the VPC peering connection. If you have resources in different AWS Regions that use IPv6 addresses, you can create an inter- Region peering connection. You can then add an IPv6 route for communication between the resources. Update route tables 13 Amazon Virtual Private Cloud VPC Peering To add an IPv6 route for a VPC peering connection 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. 3. In the navigation pane, choose Route tables. Select the check box next to the route table that's associated with the subnet in which your instance resides. Note If you do not have a route table associated with that subnet, select the main route table for the VPC, as the subnet then uses this route table by default. 4. Choose Actions, Edit routes. 5. Choose Add route. 6. For Destination, enter the IPv6 address range for the peer VPC. You can specify the entire IPv6 CIDR block of the peer VPC, a specific range, or an individual IPv6 address. For example, if the CIDR block of the peer VPC is 2001:db8:1234:1a00::/56, you can specify a portion 2001:db8:1234:1a00::/64, or a specific IP address 2001:db8:1234:1a00::123/128. 7. For Target, select the VPC peering connection. 8. Choose Save changes. For more information, see Route tables in the Amazon VPC User Guide. To add or replace a route using the command line • create-route and replace-route(AWS CLI) • New-EC2Route and Set-EC2Route(AWS Tools for Windows PowerShell) Update your security groups to reference peer security groups You can update the inbound or outbound rules for your VPC security groups to reference security groups for peered VPCs. Doing so allows traffic to flow to and from instances that are associated with the referenced security group in the peered VPC. Reference peer security groups 14 Amazon Virtual Private Cloud VPC Peering Note Security groups in a peer VPC are not displayed in the console for you to select. Requirements • To reference a security group in a peer VPC, the VPC peering connection must be in the active state. • The peer VPC can be a VPC in your account, or a VPC in another AWS account. To reference a security group that is in another AWS account but the same Region, include the account number with the ID of the security group. For example, 123456789012/sg-1a2b3c4d. • You can't reference the security group of a peer VPC that's in a different Region. Instead, use the CIDR block of the peer VPC. • If you configure routes to forward the traffic between two instances in different subnets through a middlebox appliance, you must ensure that the security groups for both instances allow traffic to flow between the instances. The security group for each instance must reference the private IP address of the other instance, or the CIDR range of the subnet that contains the other instance, as the source. If you reference the security group of the other instance as the source, this does not allow traffic to flow between the instances. To update your security group rules using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. 3. 4. In the navigation pane, choose Security groups. Select the security group, and do one of the following: • • To modify the inbound rules, choose Actions, Edit inbound rules. To modify the outbound rules, choose Actions, Edit outbound rules. To add a rule, choose Add rule and specify the type, protocol, and port range. For Source (inbound rule) or Destination (outbound rule), do one of the following: • • • For a peer VPC in same account and Region, enter the ID of the security group. For a peer VPC in a different account but the same Region, enter the account ID and security group ID, separated by a forward slash (for example, 123456789012/ sg-1a2b3c4d). For a peer VPC in a different Region, enter the CIDR block of the peer VPC. Reference peer security groups 15 Amazon Virtual Private Cloud VPC Peering 5. 6. To edit an existing rule, change its values (for example, the source or the description). To delete a rule, choose Delete next to the rule. 7. Choose Save rules. To update inbound rules using the command line • authorize-security-group-ingress and revoke-security-group-ingress (AWS CLI) • Grant-EC2SecurityGroupIngress and Revoke-EC2SecurityGroupIngress (AWS Tools for Windows PowerShell) For example, to update your security group sg-aaaa1111 to allow inbound access over HTTP from sg-bbbb2222 for a peer VPC, use the following command. If the peer VPC is in the |
vpc-pg-008 | vpc-pg.pdf | 8 | of the peer VPC. Reference peer security groups 15 Amazon Virtual Private Cloud VPC Peering 5. 6. To edit an existing rule, change its values (for example, the source or the description). To delete a rule, choose Delete next to the rule. 7. Choose Save rules. To update inbound rules using the command line • authorize-security-group-ingress and revoke-security-group-ingress (AWS CLI) • Grant-EC2SecurityGroupIngress and Revoke-EC2SecurityGroupIngress (AWS Tools for Windows PowerShell) For example, to update your security group sg-aaaa1111 to allow inbound access over HTTP from sg-bbbb2222 for a peer VPC, use the following command. If the peer VPC is in the same Region but a different account, add --group-owner aws-account-id. aws ec2 authorize-security-group-ingress --group-id sg-aaaa1111 --protocol tcp -- port 80 --source-group sg-bbbb2222 To update outbound rules using the command line • authorize-security-group-egress and revoke-security-group-egress (AWS CLI) • Grant-EC2SecurityGroupEgress and Revoke-EC2SecurityGroupEgress (AWS Tools for Windows PowerShell) After you've updated the security group rules, use the describe-security-groups command to view the referenced security group in your security group rules. Identify your referenced security groups To determine if your security group is being referenced in the rules of a security group in a peer VPC, use one of the following commands for one or more security groups in your account. • describe-security-group-references (AWS CLI) • Get-EC2SecurityGroupReference (AWS Tools for Windows PowerShell) In the following example, the response indicates that security group sg-bbbb2222 is being referenced by a security group in VPC vpc-aaaaaaaa: Identify your referenced security groups 16 Amazon Virtual Private Cloud VPC Peering aws ec2 describe-security-group-references --group-id sg-bbbb2222 { "SecurityGroupsReferenceSet": [ { "ReferencingVpcId": "vpc-aaaaaaaa", "GroupId": "sg-bbbb2222", "VpcPeeringConnectionId": "pcx-b04deed9" } ] } If the VPC peering connection is deleted, or if the owner of the peer VPC deletes the referenced security group, the security group rule becomes stale. View and delete with stale security group rules A stale security group rule is a rule that references a deleted security group in the same VPC or in a peer VPC, or that references a security group in a peer VPC for which the VPC peering connection has been deleted. When a security group rule becomes stale, it's not automatically removed from your security group—you must manually remove it. If a security group rule is stale because the VPC peering connection was deleted, the rule will no longer be marked as stale if you create a new VPC peering connection with the same VPCs. You can view and delete the stale security group rules for a VPC using the Amazon VPC console. To view and delete stale security group rules 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. In the navigation pane, choose Security groups. 3. Choose Actions, Manage stale rules. 4. For VPC, choose the VPC with the stale rules. 5. Choose Edit. 6. Choose the Delete button next to the rule that you want to delete. Choose Preview changes, Save rules. View and delete with stale security group rules 17 Amazon Virtual Private Cloud VPC Peering To describe your stale security group rules using the command line • describe-stale-security-groups (AWS CLI) • Get-EC2StaleSecurityGroup (AWS Tools for Windows PowerShell) In the following example, VPC A (vpc-aaaaaaaa) and VPC B were peered, and the VPC peering connection was deleted. Your security group sg-aaaa1111 in VPC A references sg-bbbb2222 in VPC B. When you run the describe-stale-security-groups command for your VPC, the response indicates that security group sg-aaaa1111 has a stale SSH rule that references sg- bbbb2222. aws ec2 describe-stale-security-groups --vpc-id vpc-aaaaaaaa { "StaleSecurityGroupSet": [ { "VpcId": "vpc-aaaaaaaa", "StaleIpPermissionsEgress": [], "GroupName": "Access1", "StaleIpPermissions": [ { "ToPort": 22, "FromPort": 22, "UserIdGroupPairs": [ { "VpcId": "vpc-bbbbbbbb", "PeeringStatus": "deleted", "UserId": "123456789101", "GroupName": "Prod1", "VpcPeeringConnectionId": "pcx-b04deed9", "GroupId": "sg-bbbb2222" } ], "IpProtocol": "tcp" } ], "GroupId": "sg-aaaa1111", "Description": "Reference remote SG" } ] View and delete with stale security group rules 18 Amazon Virtual Private Cloud } VPC Peering After you've identified the stale security group rules, you can delete them using the revoke- security-group-ingress or revoke-security-group-egress commands. Enable DNS resolution for a VPC peering connection The DNS settings for a VPC peering connection determine how public DNS hostnames are resolved for requests that traverse the VPC peering connection. If an EC2 instance on one side of a VPC peering connection sends a request to an EC2 instance on the other side using the public IPv4 DNS hostname of the instance, the DNS hostname is resolved as follows. DNS resolution disabled (default) The public IPv4 DNS hostname resolves to the public IPv4 address of the instance. DNS resolution enabled The public IPv4 DNS hostname resolves to the private IPv4 address of the instance. Requirements • Both VPCs must be enabled for DNS hostnames and DNS resolution. For more information, see DNS attributes for your VPC in the Amazon VPC User Guide. • The peering connection must be in the active state. |
vpc-pg-009 | vpc-pg.pdf | 9 | sends a request to an EC2 instance on the other side using the public IPv4 DNS hostname of the instance, the DNS hostname is resolved as follows. DNS resolution disabled (default) The public IPv4 DNS hostname resolves to the public IPv4 address of the instance. DNS resolution enabled The public IPv4 DNS hostname resolves to the private IPv4 address of the instance. Requirements • Both VPCs must be enabled for DNS hostnames and DNS resolution. For more information, see DNS attributes for your VPC in the Amazon VPC User Guide. • The peering connection must be in the active state. You can't enable DNS resolution when you create a peering connection. • The owner of the requester VPC must modify the requester VPC peering options, and the owner of the accepter VPC must modify the accepter VPC peering options. If the VPCs are in the same account and Region, you can enable DNS resolution for the requester and accepter VPCs at the same time. To enable DNS resolution for a peering connection using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. 3. In the navigation pane, choose Peering connections. Select the VPC peering connection. 4. Choose Actions, Edit DNS settings. Enable DNS resolution for a VPC peering connection 19 Amazon Virtual Private Cloud VPC Peering 5. 6. To enable DNS resolution for requests from the requester VPC, select Requester DNS resolution, Allow accepter VPC to resolve the DNS of requester VPC. To ensure DNS resolution for requests from the accepter VPC, select Accepter DNS resolution, Allow requester VPC to resolve the DNS of accepter VPC. 7. Choose Save changes. To enable DNS resolution using the command line • modify-vpc-peering-connection-options (AWS CLI) • Edit-EC2VpcPeeringConnectionOption (AWS Tools for Windows PowerShell) To describe VPC peering connection options using the command line • describe-vpc-peering-connections (AWS CLI) • Get-EC2VpcPeeringConnection (AWS Tools for Windows PowerShell) Delete a VPC peering connection Either owner of a VPC in a peering connection can delete the VPC peering connection at any time. You can also delete a VPC peering connection that you've requested that is still in the pending- acceptance state. You cannot delete the VPC peering connection when the VPC peering connection is in the rejected state. We automatically delete the connection for you. Deleting a VPC in the Amazon VPC console that's part of an active VPC peering connection also deletes the VPC peering connection. If you have requested a VPC peering connection with a VPC in another account, and you delete your VPC before the other party has accepted the request, the VPC peering connection is also deleted. You cannot delete a VPC for which you have a pending- acceptance request from a VPC in another account. You must first reject the VPC peering connection request. When you delete a peering connection, the status is set to Deleting and then Deleted. After you delete a connection, it can't be accepted, rejected, or edited. For more information about how long the peering connection remains visible, see VPC peering connection lifecycle. Delete 20 Amazon Virtual Private Cloud VPC Peering To delete a VPC peering connection 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. 3. In the navigation pane, choose Peering connections. Select the VPC peering connection. 4. Choose Actions, Delete peering connection. 5. When prompted for confirmation, enter delete and then choose Delete. To delete a VPC peering connection using the command line • delete-vpc-peering-connection (AWS CLI) • Remove-EC2VpcPeeringConnection (AWS Tools for Windows PowerShell) Troubleshoot a VPC peering connection If you're having trouble connecting to a resource in a VPC from a resource in a peer VPC, do the following: • For each resource in each VPC, verify that the route table for its subnet contains a route that sends traffic destined for the peer VPC to the VPC peering connection. This ensures network traffic can properly flow between the two VPCs. For more information, see Update route tables. • For any EC2 instances involved, verify that the security groups for those instances allow inbound and outbound traffic from the peer VPC. Security group rules control which traffic is permitted to access your EC2 instances. For more information, see Reference peer security groups. • Check that the network ACLs for the subnets containing your resources allow the necessary traffic from the peer VPC. Network ACLs are an additional layer of security that filter traffic at the subnet level. If you're still having issues, you can leverage Reachability Analyzer. Reachability Analyzer can help identify the specific component - whether a route table, security group, or network ACL - that is causing the connectivity problem between the two VPCs. For more information, see the Reachability Analyzer Guide. Thoroughly verifying your VPC networking configurations is key to troubleshooting and resolving any VPC peering connection issues you may encounter. |
vpc-pg-010 | vpc-pg.pdf | 10 | that the network ACLs for the subnets containing your resources allow the necessary traffic from the peer VPC. Network ACLs are an additional layer of security that filter traffic at the subnet level. If you're still having issues, you can leverage Reachability Analyzer. Reachability Analyzer can help identify the specific component - whether a route table, security group, or network ACL - that is causing the connectivity problem between the two VPCs. For more information, see the Reachability Analyzer Guide. Thoroughly verifying your VPC networking configurations is key to troubleshooting and resolving any VPC peering connection issues you may encounter. Troubleshoot 21 Amazon Virtual Private Cloud VPC Peering Common VPC peering connection configurations This section describes two common types of VPC peering configurations that you can implement: • VPC peering configurations with routes to an entire VPC: In this configuration, you create a route in each VPC's route table that sends all traffic destined for the peer VPC to the VPC peering connection. This allows any resource in one VPC to communicate with any resource in the peer VPC, simplifying management. However, it also means that all traffic between the VPCs will flow through the peering connection, which could become a bottleneck if the traffic volume is high. • VPC peering configurations with specific routes: Alternatively, you can create more granular routes in each VPC's route table that only send traffic to specific subnets or resources in the peer VPC. This allows you to limit the traffic flowing through the peering connection to only what is necessary, which can be more efficient. However, it also requires more maintenance, as you'll need to update the route tables any time you add new resources in the peer VPC that need to communicate. The best approach depends on factors like the size and complexity of your VPC architecture, the volume of traffic expected between the VPCs, and your organizational needs around security and resource access. Many enterprises use a hybrid approach, with broad routes for common traffic patterns and specific routes for more sensitive or bandwidth-intensive use cases. Configurations • VPC peering configurations with routes to an entire VPC • VPC peering configurations with specific routes VPC peering configurations with routes to an entire VPC You can configure VPC peering connections so that your route tables have access to the entire CIDR block of the peer VPC. For more information about scenarios in which you might need a specific VPC peering connection configuration, see VPC peering connection networking scenarios. For more information about creating and working with VPC peering connections, see VPC peering connections. For more information about updating your route tables, see Update your route tables for a VPC peering connection. Route to a VPC CIDR block 22 Amazon Virtual Private Cloud Configurations • Two VPCs peered together • One VPC peered with two VPCs • Three VPCs peered together • Multiple VPCs peered together Two VPCs peered together VPC Peering In this configuration, there is a peering connection between VPC A and VPC B (pcx-11112222). The VPCs are in the same AWS account and their CIDR blocks do not overlap. You might use this configuration when you have two VPCs that require access to each others' resources. For example, you set up VPC A for your accounting records and VPC B for your financial records, and these each VPC must be able to access resources from the other VPC without restriction. Single VPC CIDR Update the route table for each VPC with a route that sends traffic for the CIDR block of the peer VPC to the VPC peering connection. Route table Destination VPC A VPC B VPC A CIDR VPC B CIDR VPC B CIDR VPC A CIDR Multiple IPv4 VPC CIDRs Target Local pcx-11112222 Local pcx-11112222 Two VPCs peered together 23 Amazon Virtual Private Cloud VPC Peering If VPC A and VPC B have multiple associated IPv4 CIDR blocks, you can update the route table for each VPC with routes for some or all of the IPv4 CIDR blocks of the peer VPC. Route table Destination VPC A VPC B VPC A CIDR 1 VPC A CIDR 2 Target Local Local VPC B CIDR 1 pcx-11112222 VPC B CIDR 2 pcx-11112222 VPC B CIDR 1 VPC B CIDR 2 Local Local VPC A CIDR 1 pcx-11112222 VPC A CIDR 2 pcx-11112222 IPv4 and IPv6 VPC CIDRs If VPC A and VPC B have associated IPv6 CIDR blocks, you can update the route table for each VPC with routes for both the IPv4 and IPv6 CIDR blocks of the peer VPC. Route table Destination VPC A VPC A IPv4 CIDR VPC A IPv6 CIDR Target Local Local VPC B IPv4 CIDR pcx-11112222 VPC B IPv6 CIDR pcx-11112222 VPC B VPC B IPv4 CIDR VPC B IPv6 CIDR Local Local Two |
vpc-pg-011 | vpc-pg.pdf | 11 | 2 pcx-11112222 VPC B CIDR 1 VPC B CIDR 2 Local Local VPC A CIDR 1 pcx-11112222 VPC A CIDR 2 pcx-11112222 IPv4 and IPv6 VPC CIDRs If VPC A and VPC B have associated IPv6 CIDR blocks, you can update the route table for each VPC with routes for both the IPv4 and IPv6 CIDR blocks of the peer VPC. Route table Destination VPC A VPC A IPv4 CIDR VPC A IPv6 CIDR Target Local Local VPC B IPv4 CIDR pcx-11112222 VPC B IPv6 CIDR pcx-11112222 VPC B VPC B IPv4 CIDR VPC B IPv6 CIDR Local Local Two VPCs peered together 24 Amazon Virtual Private Cloud VPC Peering Route table Destination Target VPC A IPv4 CIDR pcx-11112222 VPC A IPv6 CIDR pcx-11112222 One VPC peered with two VPCs In this configuration, there is a central VPC (VPC A), a peering connection between VPC A and VPC B (pcx-12121212), and a peering connection between VPC A and VPC C (pcx-23232323). All three VPCs are in the same AWS account and their CIDR blocks do not overlap. VPC B and VPC C can't send traffic directly to each other through a VPC A, because VPC peering does not support transitive peering relationships. You can create a VPC peering connection between VPC B and VPC C, as shown in Three VPCs peered together. For more information about unsupported peering scenarios, see the section called “VPC peering limitations”. You might use this configuration when you have resources on a central VPC, such as a repository of services, that other VPCs need to access. The other VPCs do not need access to each others' resources; they only need to access resources in the central VPC. Update the route table for each VPC as follows to implement this configuration using one CIDR block per VPC. Route table Destination VPC A VPC A CIDR VPC B CIDR VPC C CIDR Target Local pcx-12121212 pcx-23232323 One VPC peered with two VPCs 25 Amazon Virtual Private Cloud VPC Peering Route table Destination VPC B VPC C VPC B CIDR VPC A CIDR VPC C CIDR VPC A CIDR Target Local pcx-12121212 Local pcx-23232323 You can extend this configuration to additional VPCs. For example, VPC A is peered with VPC B through VPC G using both IPv4 and IPv6 CIDRs, but the other VPCs are not peered to each other. In this diagram, the lines represent VPC peering connections. Update the route table as follows. Route table Destination VPC A VPC A IPv4 CIDR Target Local One VPC peered with two VPCs 26 Amazon Virtual Private Cloud VPC Peering Route table Destination VPC A IPv6 CIDR Target Local VPC B IPv4 CIDR pcx-aaaabbbb VPC B IPv6 CIDR pcx-aaaabbbb VPC C IPv4 CIDR pcx-aaaacccc VPC C IPv6 CIDR pcx-aaaacccc VPC D IPv4 CIDR pcx-aaaadddd VPC D IPv6 CIDR pcx-aaaadddd VPC E IPv4 CIDR pcx-aaaaeeee VPC E IPv6 CIDR pcx-aaaaeeee VPC F IPv4 CIDR pcx-aaaaffff VPC F IPv6 CIDR pcx-aaaaffff VPC G IPv4 CIDR pcx-aaaagggg VPC G IPv6 CIDR pcx-aaaagggg VPC B VPC B IPv4 CIDR VPC B IPv6 CIDR Local Local VPC A IPv4 CIDR pcx-aaaabbbb VPC A IPv6 CIDR pcx-aaaabbbb VPC C VPC C IPv4 CIDR VPC C IPv6 CIDR Local Local VPC A IPv4 CIDR pcx-aaaacccc One VPC peered with two VPCs 27 Amazon Virtual Private Cloud VPC Peering Route table Destination Target VPC A IPv6 CIDR pcx-aaaacccc VPC D VPC D IPv4 CIDR VPC D IPv6 CIDR Local Local VPC A IPv4 CIDR pcx-aaaadddd VPC A IPv6 CIDR pcx-aaaadddd VPC E VPC E IPv4 CIDR VPC E IPv6 CIDR Local Local VPC A IPv4 CIDR pcx-aaaaeeee VPC A IPv6 CIDR pcx-aaaaeeee VPC F VPC F IPv4 CIDR VPC F IPv6 CIDR Local Local VPC A IPv4 CIDR pcx-aaaaffff VPC A IPv6 CIDR pcx-aaaaffff VPC G VPC G IPv4 CIDR VPC G IPv6 CIDR Local Local VPC A IPv4 CIDR pcx-aaaagggg VPC A IPv6 CIDR pcx-aaaagggg Three VPCs peered together In this configuration, there are three VPCs in the same AWS account with CIDR blocks that do not overlap. The VPCs are peered in a full mesh as follows: Three VPCs peered together 28 Amazon Virtual Private Cloud VPC Peering • VPC A is peered to VPC B through VPC peering connection pcx-aaaabbbb • VPC A is peered to VPC C through VPC peering connection pcx-aaaacccc • VPC B is peered to VPC C through VPC peering connection pcx-bbbbcccc You might use this configuration when you have VPCs that need to share resources with each other without restriction. For example, as a file sharing system. Update the route table for each VPC as follows to implement this configuration. Route table Destination VPC A VPC B VPC C VPC A CIDR VPC B CIDR VPC C CIDR VPC B CIDR VPC A CIDR VPC C CIDR VPC C |
vpc-pg-012 | vpc-pg.pdf | 12 | B through VPC peering connection pcx-aaaabbbb • VPC A is peered to VPC C through VPC peering connection pcx-aaaacccc • VPC B is peered to VPC C through VPC peering connection pcx-bbbbcccc You might use this configuration when you have VPCs that need to share resources with each other without restriction. For example, as a file sharing system. Update the route table for each VPC as follows to implement this configuration. Route table Destination VPC A VPC B VPC C VPC A CIDR VPC B CIDR VPC C CIDR VPC B CIDR VPC A CIDR VPC C CIDR VPC C CIDR VPC A CIDR VPC B CIDR Target Local pcx-aaaabbbb pcx-aaaacccc Local pcx-aaaabbbb pcx-bbbbcccc Local pcx-aaaacccc pcx-bbbbcccc Three VPCs peered together 29 Amazon Virtual Private Cloud VPC Peering If VPC A and VPC B have both IPv4 and IPv6 CIDR blocks, but VPC C does not have an IPv6 CIDR block, update the route tables as follows. Resources in VPC A and VPC B can communicate using IPv6 over the VPC peering connection. However, VPC C cannot communicate with either VPC A or VPC B using IPv6. Route tables Destination VPC A VPC A IPv4 CIDR VPC A IPv6 CIDR Target Local Local VPC B IPv4 CIDR pcx-aaaabbbb VPC B IPv6 CIDR pcx-aaaabbbb VPC C IPv4 CIDR pcx-aaaacccc VPC B VPC B IPv4 CIDR VPC B IPv6 CIDR Local Local VPC A IPv4 CIDR pcx-aaaabbbb VPC A IPv6 CIDR pcx-aaaabbbb VPC C IPv4 CIDR pcx-bbbbcccc VPC C VPC C IPv4 CIDR Local VPC A IPv4 CIDR pcx-aaaacccc VPC B IPv4 CIDR pcx-bbbbcccc Multiple VPCs peered together In this configuration, there are seven VPCs peered in a full mesh configuration. The VPCs are in the same AWS account and their CIDR blocks do not overlap. Multiple VPCs peered together 30 Amazon Virtual Private Cloud VPC Peering VPC VPC VPC peering connection A A A A A A B B B B B C C C C D D D E E B C D E F G C D E F G D E F G E F G F G pcx-aaaabbbb pcx-aaaacccc pcx-aaaadddd pcx-aaaaeeee pcx-aaaaffff pcx-aaaagggg pcx-bbbbcccc pcx-bbbbdddd pcx-bbbbeeee pcx-bbbbffff pcx-bbbbgggg pcx-ccccdddd pcx-cccceeee pcx-ccccffff pcx-ccccgggg pcx-ddddeeee pcx-ddddffff pcx-ddddgggg pcx-eeeeffff pcx-eeeegggg Multiple VPCs peered together 31 Amazon Virtual Private Cloud VPC Peering VPC F VPC G VPC peering connection pcx-ffffgggg You might use this configuration when you have multiple VPCs that must be able to access each others' resources without restriction. For example, as a file sharing network. In this diagram, the lines represent VPC peering connections. Update the route table for each VPC as follows to implement this configuration. Route table Destination VPC A VPC A CIDR VPC B CIDR VPC C CIDR VPC D CIDR Target Local pcx-aaaabbbb pcx-aaaacccc pcx-aaaadddd Multiple VPCs peered together 32 Amazon Virtual Private Cloud VPC Peering Route table Destination Target VPC B VPC C VPC D VPC E CIDR VPC F CIDR VPC G CIDR VPC B CIDR VPC A CIDR VPC C CIDR VPC D CIDR VPC E CIDR VPC F CIDR VPC G CIDR VPC C CIDR VPC A CIDR VPC B CIDR VPC D CIDR VPC E CIDR VPC F CIDR VPC G CIDR VPC D CIDR VPC A CIDR VPC B CIDR pcx-aaaaeeee pcx-aaaaffff pcx-aaaagggg Local pcx-aaaabbbb pcx-bbbbcccc pcx-bbbbdddd pcx-bbbbeeee pcx-bbbbffff pcx-bbbbgggg Local pcx-aaaacccc pcx-bbbbcccc pcx-ccccdddd pcx-cccceeee pcx-ccccffff pcx-ccccgggg Local pcx-aaaadddd pcx-bbbbdddd Multiple VPCs peered together 33 Amazon Virtual Private Cloud VPC Peering Route table Destination Target VPC C CIDR VPC E CIDR VPC F CIDR VPC G CIDR VPC E CIDR VPC A CIDR VPC B CIDR VPC C CIDR VPC D CIDR VPC F CIDR VPC G CIDR VPC F CIDR VPC A CIDR VPC B CIDR VPC C CIDR VPC D CIDR VPC E CIDR VPC G CIDR VPC G CIDR VPC A CIDR pcx-ccccdddd pcx-ddddeeee pcx-ddddffff pcx-ddddgggg Local pcx-aaaaeeee pcx-bbbbeeee pcx-cccceeee pcx-ddddeeee pcx-eeeeffff pcx-eeeegggg Local pcx-aaaaffff pcx-bbbbffff pcx-ccccffff pcx-ddddffff pcx-eeeeffff pcx-ffffgggg Local pcx-aaaagggg VPC E VPC F VPC G Multiple VPCs peered together 34 Amazon Virtual Private Cloud VPC Peering Route table Destination Target VPC B CIDR VPC C CIDR VPC D CIDR VPC E CIDR VPC F CIDR pcx-bbbbgggg pcx-ccccgggg pcx-ddddgggg pcx-eeeegggg pcx-ffffgggg If all VPCs have associated IPv6 CIDR blocks, update the route tables as follows. Route table Destination VPC A VPC A IPv4 CIDR VPC A IPv6 CIDR Target Local Local VPC B IPv4 CIDR pcx-aaaabbbb VPC B IPv6 CIDR pcx-aaaabbbb VPC C IPv4 CIDR pcx-aaaacccc VPC C IPv6 CIDR pcx-aaaacccc VPC D IPv4 CIDR pcx-aaaadddd VPC D IPv6 CIDR pcx-aaaadddd VPC E IPv4 CIDR pcx-aaaaeeee VPC E IPv6 CIDR pcx-aaaaeeee VPC F IPv4 CIDR pcx-aaaaffff VPC F IPv6 CIDR pcx-aaaaffff Multiple VPCs peered together 35 Amazon Virtual Private Cloud VPC Peering Route table Destination Target VPC G IPv4 CIDR pcx-aaaagggg VPC G |
vpc-pg-013 | vpc-pg.pdf | 13 | VPCs have associated IPv6 CIDR blocks, update the route tables as follows. Route table Destination VPC A VPC A IPv4 CIDR VPC A IPv6 CIDR Target Local Local VPC B IPv4 CIDR pcx-aaaabbbb VPC B IPv6 CIDR pcx-aaaabbbb VPC C IPv4 CIDR pcx-aaaacccc VPC C IPv6 CIDR pcx-aaaacccc VPC D IPv4 CIDR pcx-aaaadddd VPC D IPv6 CIDR pcx-aaaadddd VPC E IPv4 CIDR pcx-aaaaeeee VPC E IPv6 CIDR pcx-aaaaeeee VPC F IPv4 CIDR pcx-aaaaffff VPC F IPv6 CIDR pcx-aaaaffff Multiple VPCs peered together 35 Amazon Virtual Private Cloud VPC Peering Route table Destination Target VPC G IPv4 CIDR pcx-aaaagggg VPC G IPv6 CIDR pcx-aaaagggg VPC B VPC B IPv4 CIDR VPC B IPv6 CIDR Local Local VPC A IPv4 CIDR pcx-aaaabbbb VPC A IPv6 CIDR pcx-aaaabbbb VPC C IPv4 CIDR pcx-bbbbcccc VPC C IPv6 CIDR pcx-bbbbcccc VPC D IPv4 CIDR pcx-bbbbdddd VPC D IPv6 CIDR pcx-bbbbdddd VPC E IPv4 CIDR pcx-bbbbeeee VPC E IPv6 CIDR pcx-bbbbeeee VPC F IPv4 CIDR pcx-bbbbffff VPC F IPv6 CIDR pcx-bbbbffff VPC G IPv4 CIDR pcx-bbbbgggg VPC G IPv6 CIDR pcx-bbbbgggg VPC C VPC C IPv4 CIDR VPC C IPv6 CIDR Local Local VPC A IPv4 CIDR pcx-aaaacccc VPC A IPv6 CIDR pcx-aaaacccc Multiple VPCs peered together 36 Amazon Virtual Private Cloud VPC Peering Route table Destination Target VPC B IPv4 CIDR pcx-bbbbcccc VPC B IPv6 CIDR pcx-bbbbcccc VPC D IPv4 CIDR pcx-ccccdddd VPC D IPv6 CIDR pcx-ccccdddd VPC E IPv4 CIDR pcx-cccceeee VPC E IPv6 CIDR pcx-cccceeee VPC F IPv4 CIDR pcx-ccccffff VPC F IPv6 CIDR pcx-ccccffff VPC G IPv4 CIDR pcx-ccccgggg VPC G IPv6 CIDR pcx-ccccgggg VPC D VPC D IPv4 CIDR VPC D IPv6 CIDR Local Local VPC A IPv4 CIDR pcx-aaaadddd VPC A IPv6 CIDR pcx-aaaadddd VPC B IPv4 CIDR pcx-bbbbdddd VPC B IPv6 CIDR pcx-bbbbdddd VPC C IPv4 CIDR pcx-ccccdddd VPC C IPv6 CIDR pcx-ccccdddd VPC E IPv4 CIDR pcx-ddddeeee VPC E IPv6 CIDR pcx-ddddeeee Multiple VPCs peered together 37 Amazon Virtual Private Cloud VPC Peering Route table Destination Target VPC F IPv4 CIDR pcx-ddddffff VPC F IPv6 CIDR pcx-ddddffff VPC G IPv4 CIDR pcx-ddddgggg VPC G IPv6 CIDR pcx-ddddgggg VPC E VPC E IPv4 CIDR VPC E IPv6 CIDR Local Local VPC A IPv4 CIDR pcx-aaaaeeee VPC A IPv6 CIDR pcx-aaaaeeee VPC B IPv4 CIDR pcx-bbbbeeee VPC B IPv6 CIDR pcx-bbbbeeee VPC C IPv4 CIDR pcx-cccceeee VPC C IPv6 CIDR pcx-cccceeee VPC D IPv4 CIDR pcx-ddddeeee VPC D IPv6 CIDR pcx-ddddeeee VPC F IPv4 CIDR pcx-eeeeffff VPC F IPv6 CIDR pcx-eeeeffff VPC G IPv4 CIDR pcx-eeeegggg VPC G IPv6 CIDR pcx-eeeegggg VPC F VPC F IPv4 CIDR VPC F IPv6 CIDR Local Local Multiple VPCs peered together 38 Amazon Virtual Private Cloud VPC Peering Route table Destination Target VPC A IPv4 CIDR pcx-aaaaffff VPC A IPv6 CIDR pcx-aaaaffff VPC B IPv4 CIDR pcx-bbbbffff VPC B IPv6 CIDR pcx-bbbbffff VPC C IPv4 CIDR pcx-ccccffff VPC C IPv6 CIDR pcx-ccccffff VPC D IPv4 CIDR pcx-ddddffff VPC D IPv6 CIDR pcx-ddddffff VPC E IPv4 CIDR pcx-eeeeffff VPC E IPv6 CIDR pcx-eeeeffff VPC G IPv4 CIDR pcx-ffffgggg VPC G IPv6 CIDR pcx-ffffgggg VPC G VPC G IPv4 CIDR VPC G IPv6 CIDR Local Local VPC A IPv4 CIDR pcx-aaaagggg VPC A IPv6 CIDR pcx-aaaagggg VPC B IPv4 CIDR pcx-bbbbgggg VPC B IPv6 CIDR pcx-bbbbgggg VPC C IPv4 CIDR pcx-ccccgggg VPC C IPv6 CIDR pcx-ccccgggg Multiple VPCs peered together 39 Amazon Virtual Private Cloud VPC Peering Route table Destination Target VPC D IPv4 CIDR pcx-ddddgggg VPC D IPv6 CIDR pcx-ddddgggg VPC E IPv4 CIDR pcx-eeeegggg VPC E IPv6 CIDR pcx-eeeegggg VPC F IPv4 CIDR pcx-ffffgggg VPC F IPv6 CIDR pcx-ffffgggg VPC peering configurations with specific routes You can configure route tables for a VPC peering connection to restrict access to a subnet CIDR block, a specific CIDR block (if the VPC has multiple CIDR blocks), or a specific resource in the peer VPC. In these examples, a central VPC is peered to at least two VPCs that have overlapping CIDR blocks. For examples of scenarios in which you might need a specific VPC peering connection configuration, see VPC peering connection networking scenarios. For more information about working with VPC peering connections, see VPC peering connections. For more information about updating your route tables, see Update your route tables for a VPC peering connection. Configurations • Two VPCs that access specific subnets in one VPC • Two VPCs that access specific CIDR blocks in one VPC • One VPC that accesses specific subnets in two VPCs • Instances in one VPC that access specific instances in two VPCs • One VPC that accesses two VPCs using longest prefix matches • Multiple VPC configurations Route to specific addresses 40 Amazon Virtual Private Cloud VPC Peering Two VPCs that access specific subnets in one VPC In this configuration, there is a central VPC with two subnets (VPC A), |
vpc-pg-014 | vpc-pg.pdf | 14 | your route tables for a VPC peering connection. Configurations • Two VPCs that access specific subnets in one VPC • Two VPCs that access specific CIDR blocks in one VPC • One VPC that accesses specific subnets in two VPCs • Instances in one VPC that access specific instances in two VPCs • One VPC that accesses two VPCs using longest prefix matches • Multiple VPC configurations Route to specific addresses 40 Amazon Virtual Private Cloud VPC Peering Two VPCs that access specific subnets in one VPC In this configuration, there is a central VPC with two subnets (VPC A), a peering connection between VPC A and VPC B (pcx-aaaabbbb), and a peering connection between VPC A and VPC C (pcx-aaaacccc). Each VPC requires access to the resources in only one of the subnets in VPC A. The route table for subnet 1 uses VPC peering connection pcx-aaaabbbb to access the entire CIDR block of VPC B. The route table for VPC B uses pcx-aaaabbbb to access the CIDR block of subnet 1 in VPC A. The route table for subnet 2 uses VPC peering connection pcx-aaaacccc to access the entire CIDR block of VPC C. The route table for VPC C table uses pcx-aaaacccc to access the CIDR block of subnet 2 in VPC A. Route table Destination Subnet 1 (VPC A) VPC A CIDR Target Local VPC B CIDR pcx-aaaabbbb Subnet 2 (VPC A) VPC A CIDR Local VPC C CIDR pcx-aaaacccc Two VPCs that access specific subnets in one VPC 41 Amazon Virtual Private Cloud VPC Peering Route table Destination VPC B CIDR Target Local VPC B VPC C Subnet 1 CIDR pcx-aaaabbbb VPC C CIDR Local Subnet 2 CIDR pcx-aaaacccc You can extend this configuration to multiple CIDR blocks. Suppose that VPC A and VPC B have both IPv4 and IPv6 CIDR blocks, and that subnet 1 has an associated IPv6 CIDR block. You can enable VPC B to communicate with subnet 1 in VPC A over IPv6 using the VPC peering connection. To do this, add a route to the route table for VPC A with a destination of the IPv6 CIDR block for VPC B, and a route to the route table for VPC B with a destination of the IPv6 CIDR of subnet 1 in VPC A. Route table Destination Target Notes Subnet 1 in VPC A VPC A IPv4 CIDR Local VPC A IPv6 CIDR Local VPC B IPv4 CIDR pcx-aaaabbbb VPC B IPv6 CIDR pcx-aaaabbbb Subnet 2 in VPC A VPC A IPv4 CIDR Local VPC A IPv6 CIDR Local Local route that's automatically added for IPv6 communica tion within the VPC. Route to the IPv6 CIDR block of VPC B. Local route that's automatically added for IPv6 communica tion within the VPC. Two VPCs that access specific subnets in one VPC 42 Amazon Virtual Private Cloud VPC Peering Route table Destination Target Notes VPC C IPv4 CIDR pcx-aaaacccc VPC B VPC B IPv4 CIDR Local VPC B IPv6 CIDR Local Local route that's automatically added for IPv6 communica tion within the VPC. Subnet 1 IPv4 pcx-aaaabbbb CIDR Subnet 1 IPv6 pcx-aaaabbbb CIDR Route to the IPv6 CIDR block of VPC A. VPC C VPC C IPv4 CIDR Local Subnet 2 IPv4 pcx-aaaacccc CIDR Two VPCs that access specific CIDR blocks in one VPC In this configuration, there is a central VPC (VPC A), a peering connection between VPC A and VPC B (pcx-aaaabbbb), and a peering connection between VPC A and VPC C (pcx-aaaacccc). VPC A has one CIDR block for each peering connection. Route table Destination VPC A VPC B VPC A CIDR 1 VPC A CIDR 2 VPC B CIDR VPC C CIDR VPC B CIDR Target Local Local pcx-aaaabbbb pcx-aaaacccc Local Two VPCs that access specific CIDR blocks in one VPC 43 Amazon Virtual Private Cloud VPC Peering Route table Destination Target VPC A CIDR 1 pcx-aaaabbbb VPC C VPC C CIDR Local VPC A CIDR 2 pcx-aaaacccc One VPC that accesses specific subnets in two VPCs In this configuration, there is a central VPC (VPC A) with one subnet, a peering connection between VPC A and VPC B (pcx-aaaabbbb), and a peering connection between VPC A and VPC C (pcx- aaaacccc). VPC B and VPC C each have two subnets. The peering connection between VPC A and VPC B uses only one of the subnets in VPC B. The peering connection between VPC A and VPC C uses only one of the subnets in VPC C. One VPC that accesses specific subnets in two VPCs 44 Amazon Virtual Private Cloud VPC Peering Use this configuration when you have a central VPC that has a single set of resources, such as Active Directory services, that other VPCs need to access. The central VPC does not require full |
vpc-pg-015 | vpc-pg.pdf | 15 | and VPC C (pcx- aaaacccc). VPC B and VPC C each have two subnets. The peering connection between VPC A and VPC B uses only one of the subnets in VPC B. The peering connection between VPC A and VPC C uses only one of the subnets in VPC C. One VPC that accesses specific subnets in two VPCs 44 Amazon Virtual Private Cloud VPC Peering Use this configuration when you have a central VPC that has a single set of resources, such as Active Directory services, that other VPCs need to access. The central VPC does not require full access to the VPCs that it's peered with. The route table for VPC A uses the peering connections to access only specific subnets in the peered VPCs. The route table for subnet 1 uses the peering connection with VPC A to access the subnet in VPC A. The route table for subnet 2 uses the peering connection with VPC A to access the subnet in VPC A. Route table Destination VPC A VPC A CIDR Target Local Subnet 1 CIDR pcx-aaaabbbb Subnet 2 CIDR pcx-aaaacccc Subnet 1 (VPC B) VPC B CIDR Local Subnet in VPC A CIDR pcx-aaaabbbb Subnet 2 (VPC C) VPC C CIDR Local Subnet in VPC A CIDR pcx-aaaacccc Routing for response traffic If you have a VPC peered with multiple VPCs that have overlapping or matching CIDR blocks, ensure that your route tables are configured to avoid sending response traffic from your VPC to the incorrect VPC. AWS does not support unicast reverse path forwarding in VPC peering connections that checks the source IP of packets and routes reply packets back to the source. For example, VPC A is peered with VPC B and VPC C. VPC B and VPC C have matching CIDR blocks, and their subnets have matching CIDR blocks. The route table for subnet 2 in VPC B points to the VPC peering connection pcx-aaaabbbb to access the VPC A subnet. The VPC A route table is configured to send traffic destined for the VPC CIDR to peering connection pcx-aaaaccccc. One VPC that accesses specific subnets in two VPCs 45 Amazon Virtual Private Cloud VPC Peering Route table Destination Subnet 2 (VPC B) VPC B CIDR Target Local VPC A Subnet in VPC A CIDR pcx-aaaabbbb VPC A CIDR VPC C CIDR Local pcx-aaaacccc Suppose that an instance in subnet 2 in VPC B sends traffic to the Active Directory server in VPC A using VPC peering connection pcx-aaaabbbb. VPC A sends the response traffic to Active Directory server. However, the VPC A route table is configured to send all traffic within the VPC CIDR range to VPC peering connection pcx-aaaacccc. If subnet 2 in VPC C has an instance with the same IP address as the instance in subnet two of VPC B, it receives the response traffic from VPC A. The instance in subnet 2 in VPC B does not receive a response to its request to VPC A. To prevent this, you can add a specific route to the VPC A route table with the CIDR of subnet 2 in VPC B as the destination and a target of pcx-aaaabbbb. The new route is more specific, therefore traffic destined for the subnet 2 CIDR is routed to the VPC peering connection pcx-aaaabbbb Alternatively, in the following example, the VPC A route table has a route for each subnet for each VPC peering connection. VPC A can communicate with subnet 2 in VPC B and with subnet 1 in VPC C. This scenario is useful if you need to add another VPC peering connection with another subnet that falls within the same address range as VPC B and VPC C —you can simply add another route for that specific subnet. Destination VPC A CIDR Subnet 2 CIDR Subnet 1 CIDR Target Local pcx-aaaabbbb pcx-aaaacccc One VPC that accesses specific subnets in two VPCs 46 Amazon Virtual Private Cloud VPC Peering Alternatively, depending on your use case, you can create a route to a specific IP address in VPC B to ensure that traffic routed back to the correct server (the route table uses longest prefix match to prioritize the routes): Destination VPC A CIDR Target Local Specific IP address in subnet 2 pcx-aaaabbbb VPC B CIDR pcx-aaaacccc Instances in one VPC that access specific instances in two VPCs In this configuration, there is a central VPC (VPC A) with one subnet, a peering connection between VPC A and VPC B (pcx-aaaabbbb), and a peering connection between VPC A and VPC C (pcx- aaaacccc). VPC A has a subnet with one instance for each peering connection. You can use this configuration to limit peering traffic to specific instances. Instances in one VPC that access specific instances in two VPCs 47 Amazon |
vpc-pg-016 | vpc-pg.pdf | 16 | Destination VPC A CIDR Target Local Specific IP address in subnet 2 pcx-aaaabbbb VPC B CIDR pcx-aaaacccc Instances in one VPC that access specific instances in two VPCs In this configuration, there is a central VPC (VPC A) with one subnet, a peering connection between VPC A and VPC B (pcx-aaaabbbb), and a peering connection between VPC A and VPC C (pcx- aaaacccc). VPC A has a subnet with one instance for each peering connection. You can use this configuration to limit peering traffic to specific instances. Instances in one VPC that access specific instances in two VPCs 47 Amazon Virtual Private Cloud VPC Peering Each VPC route table points to the relevant VPC peering connection to access a single IP address (and therefore a specific instance) in the peer VPC. Route table Destination VPC A VPC A CIDR Target Local VPC B VPC C Instance 3 IP address pcx-aaaabbbb Instance 4 IP address pcx-aaaacccc VPC B CIDR Local Instance 1 IP address pcx-aaaabbbb VPC C CIDR Local Instance 2 IP address pcx-aaaacccc One VPC that accesses two VPCs using longest prefix matches In this configuration, there is a central VPC (VPC A) with one subnet, a peering connection between VPC A and VPC B (pcx-aaaabbbb), and a peering connection between VPC A and VPC C (pcx- aaaacccc). VPC B and VPC C have matching CIDR blocks. You use VPC peering connection pcx- aaaabbbb to route traffic between VPC A and a specific instance in VPC B. All other traffic destined for the CIDR address range shared by VPC B and VPC C is routed to VPC C through pcx-aaaacccc. One VPC that accesses two VPCs using longest prefix matches 48 Amazon Virtual Private Cloud VPC Peering VPC route tables use longest prefix match to select the most specific route across the intended VPC peering connection. All other traffic is routed through the next matching route, in this case, across the VPC peering connection pcx-aaaacccc. Route table Destination VPC A VPC A CIDR block Target Local Instance X IP address pcx-aaaabbbb VPC C CIDR block pcx-aaaacccc VPC B CIDR block Local VPC A CIDR block pcx-aaaabbbb VPC C CIDR block Local VPC B VPC C One VPC that accesses two VPCs using longest prefix matches 49 Amazon Virtual Private Cloud VPC Peering Route table Destination Target VPC A CIDR block pcx-aaaacccc Important If an instance other than instance X in VPC B sends traffic to VPC A, the response traffic might be routed to VPC C instead of VPC B. For more information, see Routing for response traffic. Multiple VPC configurations In this configuration, there is a central VPC (VPC A) is peered with multiple VPCs in a spoke configuration. You also have three VPCs (VPCs X, Y, and Z) peered in a full mesh configuration. VPC D also has a VPC peering connection with VPC X (pcx-ddddxxxx). VPC A and VPC X have overlapping CIDR blocks. This means that peering traffic between VPC A and VPC D is limited to a specific subnet (subnet 1) in VPC D. This is to ensure that if VPC D receives a request from VPC A or VPC X, it sends the response traffic to the correct VPC. AWS does not support unicast reverse path forwarding in VPC peering connections that checks the source IP of packets and routes reply packets back to the source. For more information, see Routing for response traffic. Similarly, VPC D and VPC Z have overlapping CIDR blocks. Peering traffic between VPC D and VPC X is limited to subnet 2 in VPC D, and peering traffic between VPC X and VPC Z is limited to subnet 1 in VPC Z. This is to ensure that if VPC X receives peering traffic from VPC D or VPC Z, it sends the response traffic back to the correct VPC. Multiple VPC configurations 50 Amazon Virtual Private Cloud VPC Peering The route tables for VPCs B, C, E, F, and G point to the relevant peering connections to access the full CIDR block for VPC A, and the VPC A route table points to the relevant peering connections for VPCs B, C, E, F, and G to access their full CIDR blocks. For peering connection pcx-aaaadddd, the VPC A route table routes traffic only to subnet 1 in VPC D and the subnet 1 route table in VPC D points to the full CIDR block of VPC A. The VPC Y route table points to the relevant peering connections to access the full CIDR blocks of VPC X and VPC Z, and the VPC Z route table points to the relevant peering connection to access the full CIDR block of VPC Y. The subnet 1 route table in VPC Z points to the relevant peering connection to access the full |
vpc-pg-017 | vpc-pg.pdf | 17 | CIDR blocks. For peering connection pcx-aaaadddd, the VPC A route table routes traffic only to subnet 1 in VPC D and the subnet 1 route table in VPC D points to the full CIDR block of VPC A. The VPC Y route table points to the relevant peering connections to access the full CIDR blocks of VPC X and VPC Z, and the VPC Z route table points to the relevant peering connection to access the full CIDR block of VPC Y. The subnet 1 route table in VPC Z points to the relevant peering connection to access the full CIDR block of VPC Y. The VPC X route table points to the relevant peering connection to access subnet 2 in VPC D and subnet 1 in VPC Z. Route table Destination VPC A VPC A CIDR VPC B CIDR VPC C CIDR Target Local pcx-aaaabbbb pcx-aaaacccc Subnet 1 CIDR in VPC D pcx-aaaadddd VPC E CIDR VPC F CIDR pcx-aaaaeeee pcx-aaaaffff Multiple VPC configurations 51 Amazon Virtual Private Cloud VPC Peering Route table Destination Target VPC B VPC C VPC G CIDR VPC B CIDR VPC A CIDR VPC C CIDR VPC A CIDR pcx-aaaagggg Local pcx-aaaabbbb Local pcx-aaaacccc Subnet 1 in VPC D VPC D CIDR Local VPC A CIDR pcx-aaaadddd Subnet 2 in VPC D VPC D CIDR Local VPC E VPC F VPC G VPC X VPC X CIDR VPC E CIDR VPC A CIDR VPC F CIDR VPC A CIDR VPC G CIDR VPC A CIDR VPC X CIDR pcx-ddddxxxx Local pcx-aaaaeeee Local pcx-aaaaaffff Local pcx-aaaagggg Local Subnet 2 CIDR in VPC D pcx-ddddxxxx VPC Y CIDR pcx-xxxxyyyy Subnet 1 CIDR in VPC Z pcx-xxxxzzzz VPC Y VPC Y CIDR Local Multiple VPC configurations 52 Amazon Virtual Private Cloud VPC Peering Route table Destination Target VPC Z VPC X CIDR VPC Z CIDR VPC Z CIDR VPC Y CIDR VPC X CIDR pcx-xxxxyyyy pcx-yyyyzzzz Local pcx-yyyyzzzz pcx-xxxxzzzz Multiple VPC configurations 53 Amazon Virtual Private Cloud VPC Peering VPC peering connection networking scenarios There are a number of reasons you might need to set up a VPC peering connection between your VPCs, or between a VPC that you own and a VPC in a different AWS account. The following scenarios can help you determine which configuration is best suited to your networking requirements. Scenarios • Peering two or more VPCs to provide full access to resources • Peering to one VPC to access centralized resources Peering two or more VPCs to provide full access to resources In this scenario, you have two or more VPCs that you want to peer to enable full sharing of resources between all VPCs. The following are some examples: • Your company has a VPC for the finance department, and another VPC for the accounting department. The finance department requires access to all resources that are in the accounting department, and the accounting department requires access to all resources in the finance department. • Your company has multiple IT departments, each with their own VPC. Some VPCs are located within the same AWS account, and others in a different AWS account. You want to peer together all VPCs to enable the IT departments to have full access to each others' resources. For more information about how to set up the VPC peering connection configuration and route tables for this scenario, see the following documentation: • Two VPCs peered together • Three VPCs peered together • Multiple VPCs peered together For more information about creating and working with VPC peering connections in the Amazon VPC console, see VPC peering connections. Peering two or more VPCs to provide full access to resources 54 Amazon Virtual Private Cloud VPC Peering Peering to one VPC to access centralized resources In this scenario, you have a central VPC that contains resources that you want to share with other VPCs. Your central VPC may require full or partial access to the peer VPCs, and similarly, the peer VPCs may require full or partial access to the central VPC. The following are some examples: • Your company's IT department has a VPC for file sharing. You want to peer other VPCs to that central VPC, however, you do not want the other VPCs to send traffic to each other. • Your company has a VPC that you want to share with your customers. Each customer can create a VPC peering connection with your VPC, however, your customers cannot route traffic to other VPCs that are peered to yours, nor are they aware of the other customers' routes. • You have a central VPC that is used for Active Directory services. Specific instances in peer VPCs send requests to the Active Directory servers and require full access to the central VPC. The central VPC does not require full access |
vpc-pg-018 | vpc-pg.pdf | 18 | not want the other VPCs to send traffic to each other. • Your company has a VPC that you want to share with your customers. Each customer can create a VPC peering connection with your VPC, however, your customers cannot route traffic to other VPCs that are peered to yours, nor are they aware of the other customers' routes. • You have a central VPC that is used for Active Directory services. Specific instances in peer VPCs send requests to the Active Directory servers and require full access to the central VPC. The central VPC does not require full access to the peer VPCs; it only needs to route response traffic to the specific instances. For more information about creating and working with VPC peering connections in the Amazon VPC console, see VPC peering connections. Peering to one VPC to access centralized resources 55 Amazon Virtual Private Cloud VPC Peering Identity and access management for VPC peering By default, users cannot create or modify VPC peering connections. To grant access to VPC peering resources, attach an IAM policy to an IAM identity, such as a role. Examples • Example: Create a VPC peering connection • Example: Accept a VPC peering connection • Example: Delete a VPC peering connection • Example: Work within a specific account • Example: Manage VPC peering connections using the console For a list of Amazon VPC actions, and the supported resources and conditions keys for each action, see Actions, resources, and condition keys for Amazon EC2 in the Service Authorization Reference. Example: Create a VPC peering connection The following policy grants users permission to create VPC peering connection requests using VPCs that are tagged with Purpose=Peering. The first statement applies a condition key (ec2:ResourceTag) to the VPC resource. Note that the VPC resource for the CreateVpcPeeringConnection action is always the requester VPC. The second statement grants users permission to create the VPC peering connection resources, and therefore uses the * wildcard in place of a specific resource ID. { "Version": "2012-10-17", "Statement":[ { "Effect":"Allow", "Action": "ec2:CreateVpcPeeringConnection", "Resource": "arn:aws:ec2:region:account-id:vpc/*", "Condition": { "StringEquals": { "ec2:ResourceTag/Purpose": "Peering" } Create a VPC peering connection 56 Amazon Virtual Private Cloud VPC Peering } }, { "Effect": "Allow", "Action": "ec2:CreateVpcPeeringConnection", "Resource": "arn:aws:ec2:region:account-id:vpc-peering-connection/*" } ] } The following policy grants users in the specified AWS account permission to create VPC peering connections using any VPC in the specified Region, but only if the VPC that accepts the peering connection is a specific VPC in specific account. { "Version": "2012-10-17", "Statement": [ { "Effect":"Allow", "Action": "ec2:CreateVpcPeeringConnection", "Resource": "arn:aws:ec2:region:account-id-1:vpc/*" }, { "Effect": "Allow", "Action": "ec2:CreateVpcPeeringConnection", "Resource": "arn:aws:ec2:region:account-id-1:vpc-peering-connection/*", "Condition": { "ArnEquals": { "ec2:AccepterVpc": "arn:aws:ec2:region:account-id-2:vpc/vpc-id" } } } ] } Example: Accept a VPC peering connection The following policy grants users permission to accept VPC peering connection requests from a specific AWS account. This helps to prevent users from accepting VPC peering connection requests from unknown accounts. The statement uses the ec2:RequesterVpc condition key to enforce this. Accept a VPC peering connection 57 Amazon Virtual Private Cloud VPC Peering { "Version": "2012-10-17", "Statement":[ { "Effect":"Allow", "Action": "ec2:AcceptVpcPeeringConnection", "Resource": "arn:aws:ec2:region:account-id-1:vpc-peering-connection/*", "Condition": { "ArnEquals": { "ec2:RequesterVpc": "arn:aws:ec2:region:account-id-2:vpc/*" } } } ] } The following policy grants users permission to accept VPC peering requests if the VPC has the tag Purpose=Peering. { "Version": "2012-10-17", "Statement":[ { "Effect": "Allow", "Action": "ec2:AcceptVpcPeeringConnection", "Resource": "arn:aws:ec2:region:account-id:vpc/*", "Condition": { "StringEquals": { "ec2:ResourceTag/Purpose": "Peering" } } } ] } Example: Delete a VPC peering connection The following policy grants users in the specified account permission to delete any VPC peering connection, except those that use the specified VPC, which is in the same account. The policy specifies both the ec2:AccepterVpc and ec2:RequesterVpc condition keys, as the VPC might have been the requester VPC or the peer VPC in the original VPC peering connection request. Delete a VPC peering connection 58 Amazon Virtual Private Cloud VPC Peering { "Version": "2012-10-17", "Statement": [ { "Effect":"Allow", "Action": "ec2:DeleteVpcPeeringConnection", "Resource": "arn:aws:ec2:region:account-id:vpc-peering-connection/*", "Condition": { "ArnNotEquals": { "ec2:AccepterVpc": "arn:aws:ec2:region:account-id:vpc/vpc-id", "ec2:RequesterVpc": "arn:aws:ec2:region:account-id:vpc/vpc-id" } } } ] } Example: Work within a specific account The following policy grants users permission to work with VPC peering connections within a specific account. Users can view, create, accept, reject, and delete VPC peering connections, provided they are all within the same AWS account. The first statement grants users permission to view all VPC peering connections. The Resource element requires a * wildcard in this case, as this API action (DescribeVpcPeeringConnections) currently does not support resource-level permissions. The second statement grants users permission to create VPC peering connections, and access to all VPCs in the specified account in order to do so. The third statement uses a * wildcard as part of the Action element to grant permission for all VPC peering connection actions. The condition keys ensure that the actions can only be performed on VPC peering |
vpc-pg-019 | vpc-pg.pdf | 19 | all within the same AWS account. The first statement grants users permission to view all VPC peering connections. The Resource element requires a * wildcard in this case, as this API action (DescribeVpcPeeringConnections) currently does not support resource-level permissions. The second statement grants users permission to create VPC peering connections, and access to all VPCs in the specified account in order to do so. The third statement uses a * wildcard as part of the Action element to grant permission for all VPC peering connection actions. The condition keys ensure that the actions can only be performed on VPC peering connections with VPCs that are part of the account. For example, a user is cannot delete a VPC peering connection if either the accepter or requester VPC is in a different account. A user cannot create a VPC peering connection with a VPC in a different account. { "Version": "2012-10-17", "Statement": [ { Work within a specific account 59 Amazon Virtual Private Cloud "Effect": "Allow", "Action": "ec2:DescribeVpcPeeringConnections", "Resource": "*" }, { "Effect": "Allow", VPC Peering "Action": ["ec2:CreateVpcPeeringConnection","ec2:AcceptVpcPeeringConnection"], "Resource": "arn:aws:ec2:*:account-id:vpc/*" }, { "Effect": "Allow", "Action": "ec2:*VpcPeeringConnection", "Resource": "arn:aws:ec2:*:account-id:vpc-peering-connection/*", "Condition": { "ArnEquals": { "ec2:AccepterVpc": "arn:aws:ec2:*:account-id:vpc/*", "ec2:RequesterVpc": "arn:aws:ec2:*:account-id:vpc/*" } } } ] } Example: Manage VPC peering connections using the console To view VPC peering connections in the Amazon VPC console, users must have permission to use the ec2:DescribeVpcPeeringConnections action. To use the Create Peering Connection page, users must have permission to use the ec2:DescribeVpcs action. This grants them permission to view and select a VPC. You can apply resource-level permissions to all the ec2:*PeeringConnection actions, except ec2:DescribeVpcPeeringConnections. The following policy grants users permission to view VPC peering connections, and to use the Create VPC Peering Connection dialog box to create a VPC peering connection using a specific requester VPC only. If users try to create a VPC peering connection with a different requester VPC, the request fails. { "Version": "2012-10-17", "Statement": [ { "Effect":"Allow", Manage VPC peering connections in the console 60 Amazon Virtual Private Cloud "Action": [ "ec2:DescribeVpcPeeringConnections", "ec2:DescribeVpcs" ], VPC Peering "Resource": "*" }, { "Effect":"Allow", "Action": "ec2:CreateVpcPeeringConnection", "Resource": [ "arn:aws:ec2:*:*:vpc/vpc-id", "arn:aws:ec2:*:*:vpc-peering-connection/*" ] } ] } Manage VPC peering connections in the console 61 Amazon Virtual Private Cloud VPC Peering VPC peering connection quotas for an account VPC peering allows you to connect two VPCs. This enables resources in one VPC to communicate with resources in the other VPC as if they were in the same network. VPC peering is a useful feature for connecting your VPCs, whether they are in the same AWS Region or different Regions. This section describes the quotas you should be aware of when working with VPC peering connections. The following table lists the quotas, formerly referred to as limits, for VPC peering connections for your AWS account. Unless indicated otherwise, you can request an increase for these quotas. If you find that your current VPC peering connection requirements exceed the default quotas, we encourage you to submit a service limit increase request. We will review your use case and work with you to adjust the quotas accordingly, ensuring your VPC environment can support your growing business needs. Name Default Adjustable Active VPC peering connections per VPC 50 Yes (up to 125) Outstanding VPC peering connection requests 25 Yes Expiry time for an unaccepted VPC peering connection request 1 week (168 hours) No For more information about the rules for using VPC peering connections, see VPC peering limitations. For additional information about quotas for Amazon VPC, see Amazon VPC quotas in the Amazon VPC User Guide. 62 Amazon Virtual Private Cloud VPC Peering Document history for the Amazon VPC Peering Guide The following table describes the documentation releases for the Amazon VPC Peering Guide. Change Description Date Tag on create Inter-Region peering Inter-Region peering You can add tags when you create a VPC peering connection and route table. DNS hostname resolution is supported for inter-Region VPC peering connections in the Asia Pacific (Hong Kong) Region. You can create a VPC peering connection between VPCs in different AWS Regions. July 20, 2020 August 26, 2019 November 29, 2017 DNS resolution support for VPC peering You can enable a local VPC to resolve public DNS hostnames July 28, 2016 Stale security group rules Using ClassicLink over a VPC peering connection to private IP addresses when queried from instances in the peer VPC. You can identify if your security group is being referenced in the rules of a security group in a peer VPC and you can identify stale security group rules. You can modify your VPC peering connection to enable local linked EC2-Classic instances to communicate May 12, 2016 April 26, 2016 63 Amazon Virtual Private Cloud VPC Peering VPC peering with instances in a peer VPC, or vice versa. You can create a VPC peering connection |
vpc-pg-020 | vpc-pg.pdf | 20 | 28, 2016 Stale security group rules Using ClassicLink over a VPC peering connection to private IP addresses when queried from instances in the peer VPC. You can identify if your security group is being referenced in the rules of a security group in a peer VPC and you can identify stale security group rules. You can modify your VPC peering connection to enable local linked EC2-Classic instances to communicate May 12, 2016 April 26, 2016 63 Amazon Virtual Private Cloud VPC Peering VPC peering with instances in a peer VPC, or vice versa. You can create a VPC peering connection between two VPCs, which allows instances in either VPC to communicate with each other using private IP addresses March 24, 2014 64 |
vpc-tgw-001 | vpc-tgw.pdf | 1 | AWS Transit Gateway Amazon VPC Copyright © 2025 Amazon Web Services, Inc. and/or its affiliates. All rights reserved. Amazon VPC AWS Transit Gateway Amazon VPC: AWS Transit Gateway Copyright © 2025 Amazon Web Services, Inc. and/or its affiliates. All rights reserved. Amazon's trademarks and trade dress may not be used in connection with any product or service that is not Amazon's, in any manner that is likely to cause confusion among customers, or in any manner that disparages or discredits Amazon. All other trademarks not owned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected to, or sponsored by Amazon. Amazon VPC Table of Contents AWS Transit Gateway What is Amazon VPC Transit Gateways? ........................................................................................ 1 Transit gateway concepts ........................................................................................................................... 1 How to get started with transit gateways .............................................................................................. 2 Work with transit gateways ....................................................................................................................... 2 Pricing ............................................................................................................................................................. 3 How transit gateways work ............................................................................................................ 4 Example architecture diagram ................................................................................................................... 4 Resource attachments ................................................................................................................................. 5 Equal Cost Multipath routing .................................................................................................................... 6 Availability Zones ......................................................................................................................................... 7 Routing ............................................................................................................................................................ 8 Route tables ............................................................................................................................................. 8 Route table association .......................................................................................................................... 9 Route propagation .................................................................................................................................. 9 Routes for peering attachments .......................................................................................................... 9 Route evaluation order ........................................................................................................................ 10 Example transit gateway scenarios ........................................................................................................ 12 Get started with transit gateways ................................................................................................ 35 Prerequisites ................................................................................................................................................ 35 Step 1: Create the transit gateway ........................................................................................................ 35 Step 2: Attach your VPCs to your transit gateway ............................................................................. 37 Step 3: Add routes between the transit gateway and your VPCs .................................................... 38 Step 4: Test the transit gateway ............................................................................................................ 38 Step 5: Delete the transit gateway ........................................................................................................ 39 Design best practices .................................................................................................................... 40 Work with transit gateways .......................................................................................................... 41 Shared transit gateways ........................................................................................................................... 41 Share your transit gateways ............................................................................................................... 41 Unshare a transit gateway .................................................................................................................. 43 Shared subnets ...................................................................................................................................... 43 Transit gateways ......................................................................................................................................... 43 Create a transit gateway ..................................................................................................................... 44 View a transit gateway ........................................................................................................................ 46 Add or edit transit gateway tags ...................................................................................................... 47 iii Amazon VPC AWS Transit Gateway Modify a transit gateway .................................................................................................................... 47 Accept a resource share ....................................................................................................................... 48 Accept a shared attachment ............................................................................................................... 48 Delete a transit gateway ..................................................................................................................... 49 VPC attachments ........................................................................................................................................ 49 VPC attachment lifecycle .................................................................................................................... 50 Appliance mode .................................................................................................................................... 53 Security group referencing ................................................................................................................. 55 Create a VPC attachment .................................................................................................................... 56 Modify a VPC attachment ................................................................................................................... 57 Modify VPC attachment tags ............................................................................................................. 58 View a VPC attachment ...................................................................................................................... 58 Delete a VPC attachment .................................................................................................................... 58 Update security group inbound rules ............................................................................................... 59 Identify referenced security groups .................................................................................................. 60 Remove stale security group rules .................................................................................................... 60 Troubleshoot VPC attachments ......................................................................................................... 61 VPN attachments ....................................................................................................................................... 62 Create a transit gateway attachment to a VPN ............................................................................. 62 View a VPN attachment ...................................................................................................................... 63 Delete a VPN attachment ................................................................................................................... 64 Transit gateway attachments to a Direct Connect gateway .............................................................. 64 Peering attachments ................................................................................................................................. 65 Opt-in AWS Region considerations ................................................................................................... 66 Create a peering attachment ............................................................................................................. 67 Accept or reject a peering request .................................................................................................... 68 Add a route to a transit gateway route table ................................................................................. 69 Delete a peering attachment ............................................................................................................. 69 Connect attachments and Connect peers ............................................................................................. 70 Connect peers ........................................................................................................................................ 71 Requirements and considerations ..................................................................................................... 73 Create a Connect attachment ............................................................................................................ 75 Create a Connect peer ......................................................................................................................... 76 View Connect attachments and Connect peers ............................................................................. 77 Modify Connect attachment and Connect peer tags .................................................................... 77 Delete a Connect peer ......................................................................................................................... 78 iv Amazon VPC AWS Transit Gateway Delete a Connect attachment ............................................................................................................ 78 Transit gateway route tables ................................................................................................................... 79 Create a transit gateway route table ................................................................................................ 80 View transit gateway route tables .................................................................................................... 80 Associate a transit gateway route table .......................................................................................... 81 Disassociate a transit gateway route table ..................................................................................... 81 Enable route propagation ................................................................................................................... 82 Disable route propagation .................................................................................................................. 82 Create a static route ............................................................................................................................ 83 Delete a static route ............................................................................................................................ 84 Replace a static route .......................................................................................................................... 84 Export route tables to Amazon S3 ................................................................................................... 85 Delete a transit gateway route table ............................................................................................... 86 Create a prefix list reference .............................................................................................................. 87 Modify a prefix list reference ............................................................................................................. 88 Delete a prefix list reference .............................................................................................................. 88 Transit gateway policy tables .................................................................................................................. 89 Create a transit gateway policy table .............................................................................................. 89 Delete a transit gateway policy table .............................................................................................. 90 Multicast on transit gateways ................................................................................................................. 90 Multicast concepts .................................................................................................................................. 1 Considerations ....................................................................................................................................... 92 Multicast routing ................................................................................................................................... 93 Multicast domains ................................................................................................................................. 95 Shared multicast domains ................................................................................................................ 100 Register sources with a multicast group ....................................................................................... 105 Register members with a multicast group .................................................................................... 106 Deregister sources from a multicast group ................................................................................... 107 Deregister members from a multicast group ............................................................................... 107 View multicast groups ....................................................................................................................... 108 Set up multicast for Windows Server ............................................................................................ 109 Example: Manage IGMP configurations ......................................................................................... 110 Example: Manage static source configurations ............................................................................ 111 Example: Manage static group member configurations ............................................................. 112 Transit Gateway Flow Logs ......................................................................................................... 113 Limitations ................................................................................................................................................. 114 v Amazon VPC AWS Transit Gateway Transit Gateway Flow Log records ....................................................................................................... |
vpc-tgw-002 | vpc-tgw.pdf | 2 | Multicast routing ................................................................................................................................... 93 Multicast domains ................................................................................................................................. 95 Shared multicast domains ................................................................................................................ 100 Register sources with a multicast group ....................................................................................... 105 Register members with a multicast group .................................................................................... 106 Deregister sources from a multicast group ................................................................................... 107 Deregister members from a multicast group ............................................................................... 107 View multicast groups ....................................................................................................................... 108 Set up multicast for Windows Server ............................................................................................ 109 Example: Manage IGMP configurations ......................................................................................... 110 Example: Manage static source configurations ............................................................................ 111 Example: Manage static group member configurations ............................................................. 112 Transit Gateway Flow Logs ......................................................................................................... 113 Limitations ................................................................................................................................................. 114 v Amazon VPC AWS Transit Gateway Transit Gateway Flow Log records ....................................................................................................... 114 Default format .................................................................................................................................... 115 Custom format .................................................................................................................................... 115 Available fields .................................................................................................................................... 115 Control the use of flow logs ................................................................................................................. 121 Transit Gateway Flow Logs pricing ...................................................................................................... 122 Create or update a flow log IAM role ................................................................................................. 122 CloudWatch Logs ..................................................................................................................................... 123 IAM roles for publishing flow logs to CloudWatch Logs ............................................................ 124 Permissions for IAM users to pass a role ...................................................................................... 125 Create a flow log that publishes to CloudWatch Logs ............................................................... 125 View flow logs records ...................................................................................................................... 127 Process flow log records ................................................................................................................... 127 Amazon S3 ................................................................................................................................................ 128 Flow log files ....................................................................................................................................... 129 IAM policy for IAM principals that publish flow logs to Amazon S3 ........................................ 131 Amazon S3 bucket permissions for flow logs .............................................................................. 132 Required key policy for use with SSE-KMS ................................................................................... 133 Amazon S3 log file permissions ...................................................................................................... 134 Create the source account role ........................................................................................................ 135 Create a flow log that publishes to Amazon S3 .......................................................................... 136 View flow logs records ...................................................................................................................... 137 Processed flow log records in Amazon S3 .................................................................................... 138 Amazon Data Firehose flow logs .......................................................................................................... 138 IAM roles for cross account delivery .............................................................................................. 138 Create the source account role ........................................................................................................ 141 Create the destination account role ............................................................................................... 142 Create a flow log that publishes to Firehose ............................................................................... 143 Create and manage flow logs using the APIs or CLI ........................................................................ 144 View flow logs .......................................................................................................................................... 145 Manage flow log tags ............................................................................................................................. 146 Search flow log records .......................................................................................................................... 146 Delete a flow log record ........................................................................................................................ 148 Metrics and events ...................................................................................................................... 149 CloudWatch metrics ................................................................................................................................ 150 Transit gateway metrics .................................................................................................................... 150 vi Amazon VPC AWS Transit Gateway Attachment-level and availability zone metrics ........................................................................... 151 Transit gateway metric dimensions ................................................................................................ 153 CloudTrail logs .......................................................................................................................................... 154 Management events ........................................................................................................................... 155 Event examples ................................................................................................................................... 155 Identity and access management ............................................................................................... 158 Example policies to manage transit gateways .................................................................................. 158 Service-linked roles ................................................................................................................................. 160 Transit gateway ................................................................................................................................... 161 AWS managed policies ........................................................................................................................... 162 AWSVPCTransitGatewayServiceRolePolicy .................................................................................... 163 Policy updates ..................................................................................................................................... 163 Network ACLs ........................................................................................................................................... 163 Same subnet for EC2 instances and transit gateway association ............................................. 164 Different subnets for EC2 instances and transit gateway association ..................................... 164 Best Practices ...................................................................................................................................... 165 Quotas .......................................................................................................................................... 166 General ....................................................................................................................................................... 166 Routing ....................................................................................................................................................... 166 Transit gateway attachments ................................................................................................................ 167 Bandwidth .................................................................................................................................................. 167 AWS Direct Connect gateways .............................................................................................................. 169 Maximum transmission unit (MTU) ...................................................................................................... 169 Multicast ..................................................................................................................................................... 170 Network Manager .................................................................................................................................... 171 Additional quota resources .................................................................................................................... 172 Document history ........................................................................................................................ 173 vii Amazon VPC AWS Transit Gateway What is Amazon VPC Transit Gateways? Amazon VPC Transit Gateways is a network transit hub used to interconnect virtual private clouds (VPCs) and on-premises networks. As your cloud infrastructure expands globally, inter-Region peering connects transit gateways together using the AWS Global Infrastructure. All network traffic between AWS data centers is automatically encrypted at the physical layer. For more information, see AWS Transit Gateway. Transit gateway concepts The following are the key concepts for transit gateways: • Attachments — You can attach the following: • One or more VPCs • A Connect SD-WAN/third-party network appliance • An AWS Direct Connect gateway • A peering connection with another transit gateway • A VPN connection to a transit gateway • Transit gateway Maximum Transmission Unit (MTU) — The maximum transmission unit (MTU) of a network connection is the size, in bytes, of the largest permissible packet that can be passed over the connection. The larger the MTU of a connection, the more data that can be passed in a single packet. A transit gateway supports an MTU of 8500 bytes for traffic between VPCs, AWS Direct Connect, Transit Gateway Connect, and peering attachments (intra-Region, inter-Region, and Cloud WAN peering attachments). Traffic over VPN connections can have an MTU of 1500 bytes. • Transit gateway route table — A transit gateway has a default route table and can optionally have additional route tables. A route table includes dynamic and static routes that decide the next hop based on the destination IP address of the packet. The target of these routes could be any transit gateway attachment. By default, transit gateway attachments are associated with the default transit gateway route table. • Associations — Each attachment is associated with exactly one route table. Each route table can be associated with zero to many |
vpc-tgw-003 | vpc-tgw.pdf | 3 | over VPN connections can have an MTU of 1500 bytes. • Transit gateway route table — A transit gateway has a default route table and can optionally have additional route tables. A route table includes dynamic and static routes that decide the next hop based on the destination IP address of the packet. The target of these routes could be any transit gateway attachment. By default, transit gateway attachments are associated with the default transit gateway route table. • Associations — Each attachment is associated with exactly one route table. Each route table can be associated with zero to many attachments. • Route propagation — A VPC, VPN connection, or Direct Connect gateway can dynamically propagate routes to a transit gateway route table. With a Connect attachment, the routes are Transit gateway concepts 1 Amazon VPC AWS Transit Gateway propagated to a transit gateway route table by default. With a VPC, you must create static routes to send traffic to the transit gateway. With a VPN connection, routes are propagated from the transit gateway to your on-premises router using Border Gateway Protocol (BGP). With a Direct Connect gateway, allowed prefixes are originated to your on-premises router using BGP. With a peering attachment, you must create a static route in the transit gateway route table to point to the peering attachment. How to get started with transit gateways Use the following resources to help you create and use a transit gateway. • How transit gateways work • Get started with transit gateways • Design best practices Work with transit gateways You can create, access, and manage your transit gateways using any of the following interfaces: • AWS Management Console — Provides a web interface that you can use to access your transit gateways. • AWS Command Line Interface (AWS CLI) — Provides commands for a broad set of AWS services, including Amazon VPC, and is supported on Windows, macOS, and Linux. For more information, see AWS Command Line Interface. • AWS SDKs — Provides language-specific API operations and takes care of many of the connection details, such as calculating signatures, handling request retries, and handling errors. For more information, see AWS SDKs. • Query API — Provides low-level API actions that you call using HTTPS requests. Using the Query API is the most direct way to access Amazon VPC, but it requires that your application handle low-level details such as generating the hash to sign the request, and handling errors. For more information, see the Amazon EC2 API Reference. How to get started with transit gateways 2 Amazon VPC Pricing AWS Transit Gateway You are charged hourly for each attachment on a transit gateway, and you are charged for the amount of traffic processed on the transit gateway. For more information, see AWS Transit Gateway pricing. Pricing 3 Amazon VPC AWS Transit Gateway How Amazon VPC Transit Gateways work In AWS Transit Gateway a transit gateway acts as a Regional virtual router for traffic flowing between your virtual private clouds (VPCs) and on-premises networks. A transit gateway scales elastically based on the volume of network traffic. Routing through a transit gateway operates at layer 3, where the packets are sent to a specific next-hop attachment, based on their destination IP addresses. Topics • Example architecture diagram • Resource attachments • Equal Cost Multipath routing • Availability Zones • Routing • Example transit gateway scenarios Example architecture diagram The following diagram shows a transit gateway with three VPC attachments. The route table for each of these VPCs includes the local route and routes that send traffic destined for the other two VPCs to the transit gateway. Example architecture diagram 4 Amazon VPC AWS Transit Gateway The following is an example of a default transit gateway route table for the attachments shown in the previous diagram. The CIDR blocks for each VPC propagate to the route table. Therefore, each attachment can route packets to the other two attachments. Destination Target Route type VPC A CIDR VPC B CIDR VPC C CIDR Attachment for VPC A propagated Attachment for VPC B propagated Attachment for VPC C propagated Resource attachments A transit gateway attachment is both a source and a destination of packets. You can attach the following resources to your transit gateway: Resource attachments 5 Amazon VPC AWS Transit Gateway • One or more VPCs. AWS Transit Gateway deploys an elastic network interface within VPC subnets, which is then used by the transit gateway to route traffic to and from the chosen subnets. You must have at least one subnet for each Availability Zone, which then enables traffic to reach resources in every subnet of that zone. During attachment creation, resources within a particular Availability Zone can reach a transit gateway only if a subnet is enabled within the same zone. If a subnet |
vpc-tgw-004 | vpc-tgw.pdf | 4 | attach the following resources to your transit gateway: Resource attachments 5 Amazon VPC AWS Transit Gateway • One or more VPCs. AWS Transit Gateway deploys an elastic network interface within VPC subnets, which is then used by the transit gateway to route traffic to and from the chosen subnets. You must have at least one subnet for each Availability Zone, which then enables traffic to reach resources in every subnet of that zone. During attachment creation, resources within a particular Availability Zone can reach a transit gateway only if a subnet is enabled within the same zone. If a subnet route table includes a route to the transit gateway, traffic is only forwarded to the transit gateway if the transit gateway has an attachment in the subnet of the same Availability Zone. • One or more VPN connections • One or more AWS Direct Connect gateways • One or more Transit Gateway Connect attachments • One or more transit gateway peering connections Equal Cost Multipath routing AWS Transit Gateway supports Equal Cost Multipath (ECMP) routing for most attachments. For a VPN attachment, you can enable or disable ECMP support using the console when creating or modifying a transit gateway. For all other attachment types, the following ECMP restrictions apply: • VPC - VPC does not support ECMP since CIDR blocks cannot overlap. For example, you can't attach a VPC with a CIDR 10.1.0.0/16 with a second VPC using the same CIDR to a transit gateway, and then set up routing to load balance the traffic between them. • VPN - When the VPN ECMP support option is disabled, a transit gateway uses internal metrics to determine the preferred path in the event of equal prefixes across multiple paths. For more information on enabling or disabling ECMP for a VPN attachment, see the section called “Transit gateways”. • AWS Transit Gateway Connect - AWS Transit Gateway Connect attachments automatically support ECMP. • AWS Direct Connect Gateway - AWS Direct Connect Gateway attachments automatically support ECMP across multiple Direct Connect Gateway attachments when the network prefix, prefix length, and AS_PATH are exactly the same. • Transit gateway peering - Transit gateway peering does not support ECMP since it neither supports dynamic routing nor can you configure the same static route against two different targets. Equal Cost Multipath routing 6 Amazon VPC Note AWS Transit Gateway • BGP Multipath AS-Path Relax is not supported, so you can't use ECMP over different Autonomous System Numbers (ASNs). • ECMP is not supported between different attachment types. For example, you can't enable ECMP between a VPN and a VPC attachment. Instead, transit gateway routes are evaluated and traffic routed accordingly to the evaluated route. For more information, see the section called “Route evaluation order”. • A single Direct Connect gateway supports ECMP across multiple transit virtual interfaces. Therefore, we recommended that you set up and use only a single Direct Connect gateway and to not set up and use multiple gateways to take advantage of ECMP. For more information about Direct Connect gateways and public virtual interfaces, see How do I set up an Active/Active or Active/Passive Direct Connect connection to AWS from a public virtual interface?. Availability Zones When you attach a VPC to a transit gateway, you must enable one or more Availability Zones to be used by the transit gateway to route traffic to resources in the VPC subnets. To enable each Availability Zone, you specify exactly one subnet. The transit gateway places a network interface in that subnet using one IP address from the subnet. After you enable an Availability Zone, traffic can be routed to all subnets in the VPC, not just the specified subnet or Availability Zone. However, only resources that reside in Availability Zones where there is a transit gateway attachment can reach the transit gateway. If traffic is sourced from an Availability Zone that the destination attachment is not present in, AWS Transit Gateway will internally route that traffic to a random Availability Zone where the attachment is present. There is no additional transit gateway charge for this type of cross- Availability Zone traffic. We recommend that you enable multiple Availability Zones to ensure availability. Using appliance mode support If you plan to configure a stateful network appliance in your VPC, you can enable appliance mode support for the VPC attachment in which the appliance is located. This ensures that the Availability Zones 7 Amazon VPC AWS Transit Gateway transit gateway uses the same Availability Zone for that VPC attachment for the lifetime of a flow of traffic between source and destination. It also allows the transit gateway to send traffic to any Availability Zone in the VPC, as long as there is a subnet association in that zone. For more information, see Example: Appliance in a shared |
vpc-tgw-005 | vpc-tgw.pdf | 5 | support If you plan to configure a stateful network appliance in your VPC, you can enable appliance mode support for the VPC attachment in which the appliance is located. This ensures that the Availability Zones 7 Amazon VPC AWS Transit Gateway transit gateway uses the same Availability Zone for that VPC attachment for the lifetime of a flow of traffic between source and destination. It also allows the transit gateway to send traffic to any Availability Zone in the VPC, as long as there is a subnet association in that zone. For more information, see Example: Appliance in a shared services VPC. Routing Your transit gateway routes IPv4 and IPv6 packets between attachments using transit gateway route tables. You can configure these route tables to propagate routes from the route tables for the attached VPCs, VPN connections, and Direct Connect gateways. You can also add static routes to the transit gateway route tables. When a packet comes from one attachment, it is routed to another attachment using the route that matches the destination IP address. For transit gateway peering attachments, only static routes are supported. Routing topics • Route tables • Route table association • Route propagation • Routes for peering attachments • Route evaluation order Route tables Your transit gateway automatically comes with a default route table. By default, this route table is the default association route table and the default propagation route table. If you disable both route propagation and route table association, AWS does not create a default route table for the transit gateway. However, if either route propagation or route table association is enabled, AWS then creates a default route table. You can create additional route tables for your transit gateway. This enables you to isolate subsets of attachments. Each attachment can be associated with one route table. An attachment can propagate its routes to one or more route tables. You can create a blackhole route in your transit gateway route table that drops traffic that matches the route. Routing 8 Amazon VPC AWS Transit Gateway When you attach a VPC to a transit gateway, you must add a route to your subnet route table in order for traffic to route through the transit gateway. For more information, see Routing for a Transit Gateway in the Amazon VPC User Guide. Route table association You can associate a transit gateway attachment with a single route table. Each route table can be associated with zero to many attachments and can forward packets to other attachments. Route propagation Each attachment comes with routes that can be installed in one or more transit gateway route tables. When an attachment is propagated to a transit gateway route table, these routes are installed in the route table. You can't filter on advertised routes. For a VPC attachment, the CIDR blocks of the VPC are propagated to the transit gateway route table. When dynamic routing is used with a VPN attachment or a Direct Connect gateway attachment, you can propagate the routes learned from the on-premises router through BGP to any of the transit gateway route tables. When dynamic routing is used with a VPN attachment, the routes in the route table associated with the VPN attachment are advertised to the customer gateway through BGP. For a Connect attachment, routes in the route table associated with the Connect attachment are advertised to the third-party virtual appliances, such as SD-WAN appliances, running in a VPC through BGP. For a Direct Connect gateway attachment, allowed prefixes interactions control which routes are advertised to the customer network from AWS. When a static route and a propagated route have the same destination, the static route has the higher priority, so the propagated route is not included in the route table. If you remove the static route, the overlapping propagated route is included in the route table. Routes for peering attachments You can peer two transit gateways, and route traffic between them. To do this, you create a peering attachment on your transit gateway, and specify the peer transit gateway with which to create Route table association 9 Amazon VPC AWS Transit Gateway the peering connection. You then create a static route in your transit gateway route table to route traffic to the transit gateway peering attachment. Traffic that's routed to the peer transit gateway can then be routed to the VPC and VPN attachments for the peer transit gateway. For more information, see Example: Peered transit gateways. Route evaluation order Transit gateway routes are evaluated in the following order: • The most specific route for the destination address. • For routes with the same CIDR, but from different attachment types, the route priority is as follows: • Static routes (for example, Site-to-Site VPN static routes) • Prefix list referenced routes • VPC-propagated routes • Direct Connect gateway-propagated |
vpc-tgw-006 | vpc-tgw.pdf | 6 | to route traffic to the transit gateway peering attachment. Traffic that's routed to the peer transit gateway can then be routed to the VPC and VPN attachments for the peer transit gateway. For more information, see Example: Peered transit gateways. Route evaluation order Transit gateway routes are evaluated in the following order: • The most specific route for the destination address. • For routes with the same CIDR, but from different attachment types, the route priority is as follows: • Static routes (for example, Site-to-Site VPN static routes) • Prefix list referenced routes • VPC-propagated routes • Direct Connect gateway-propagated routes • Transit Gateway Connect-propagated routes • Site-to-Site VPN over private Direct Connect-propagated routes • Site-to-Site VPN-propagated routes • Transit Gateway peering-propagated routes (Cloud WAN) Some attachments support route advertisement over BGP. For routes with the same CIDR, and from the same attachment type, the route priority is controlled by BGP attributes: • Shorter AS Path length • Lower MED value • eBGP over iBGP routes are preferred, if the attachment supports it Important • AWS can't guarantee a consistent route prioritization order for BGP routes with the same CIDR, attachment type, and BGP attributes as listed above. • For routes advertised to a transit gateway without MED, AWS Transit Gateway will assign the following default values: • 0 for inbound routes advertised on Direct Connect attachments. Route evaluation order 10 Amazon VPC AWS Transit Gateway • 100 for inbound routes advertised on VPN and Connect attachments. AWS Transit Gateway only shows a preferred route. A backup route will only appear in the transit gateway route table if the previously active route is no longer advertised — for example, if you are advertising the same routes over the Direct Connect gateway and over Site-to-Site VPN. AWS Transit Gateway will only show the routes received from the Direct Connect gateway route, which is the preferred route. The Site-to-Site VPN, which is the backup route, will only display when the Direct Connect gateway is no longer advertised. VPC and transit gateway route table differences Route table evaluation differs between whether you're using a VPC route table or a transit gateway route table. The following example shows a VPC route table. The VPC local route has the highest priority, followed by the routes that are the most specific. When a static route and a propagated route have the same destination, the static route has a higher priority. Destination 10.0.0.0/16 Target local 192.168.0.0/16 pcx-12345 172.31.0.0/16 vgw-12345 (static) or tgw-12345 (static) 172.31.0.0/16 vgw-12345 (propagated) 0.0.0.0/0 igw-12345 Priority 1 2 2 3 4 The following example shows a transit gateway route table. If you prefer the AWS Direct Connect gateway attachment to the VPN attachment, use a BGP VPN connection and propagate the routes in the transit gateway route table. Route evaluation order 11 Amazon VPC Destination Attachment (Target) Resource type Route type Priority AWS Transit Gateway 10.0.0.0/16 tgw-attach-123 | vpc-1234 VPC 192.168.0.0/16 tgw-attach-789 | vpn-5678 VPN 172.31.0.0/16 tgw-attach-456 | dxgw_id AWS Direct Connect gateway Static or propagated Static Propagated 172.31.0.0/16 tgw-attach-789 | tgw-connect- peer-123 Connect Propagated 172.31.0.0/16 tgw-attach-789 | vpn-5678 VPN Propagated 1 2 3 4 5 Example transit gateway scenarios The following are common use cases for transit gateways. Your transit gateways are not limited to these use cases. Example: Centralized router You can configure your transit gateway as a centralized router that connects all of your VPCs, AWS Direct Connect, and Site-to-Site VPN connections. In this scenario, all attachments are associated with the transit gateway default route table and propagate to the transit gateway default route table. Therefore, all attachments can route packets to each other, with the transit gateway serving as a simple layer 3 IP router. Contents • Overview • Resources • Routing Example transit gateway scenarios 12 Amazon VPC Overview AWS Transit Gateway The following diagram shows the key components of the configuration for this scenario. In this scenario, there are three VPC attachments and one Site-to-Site VPN attachment to the transit gateway. Packets from the subnets in VPC A, VPC B, and VPC C that are destined for a subnet in another VPC or for the VPN connection first route through the transit gateway. Resources Create the following resources for this scenario: • Three VPCs. For more information, see Create a VPC in the Amazon VPC User Guide. • A transit gateway. For more information, see the section called “Create a transit gateway”. • Three VPC attachments on the transit gateway. For more information, see the section called “Create a VPC attachment”. • A Site-to-Site VPN attachment on the transit gateway. The CIDR blocks for each VPC propagate to the transit gateway route table. When the VPN connection is up, the BGP session is established and the Site-to-Site VPN CIDR propagates to the transit gateway route table and the |
vpc-tgw-007 | vpc-tgw.pdf | 7 | for this scenario: • Three VPCs. For more information, see Create a VPC in the Amazon VPC User Guide. • A transit gateway. For more information, see the section called “Create a transit gateway”. • Three VPC attachments on the transit gateway. For more information, see the section called “Create a VPC attachment”. • A Site-to-Site VPN attachment on the transit gateway. The CIDR blocks for each VPC propagate to the transit gateway route table. When the VPN connection is up, the BGP session is established and the Site-to-Site VPN CIDR propagates to the transit gateway route table and the VPC CIDRs are added to the customer gateway BGP table. For more information, see the section called “Create a transit gateway attachment to a VPN”. Ensure that you review the requirements for your customer gateway device in the AWS Site-to- Site VPN User Guide. Example transit gateway scenarios 13 Amazon VPC Routing AWS Transit Gateway Each VPC has a route table and there is a route table for the transit gateway. VPC route tables Each VPC has a route table with 2 entries. The first entry is the default entry for local IPv4 routing in the VPC; this entry enables the instances in this VPC to communicate with each other. The second entry routes all other IPv4 subnet traffic to the transit gateway. The following table shows the VPC A routes. Destination 10.1.0.0/16 0.0.0.0/0 Target local tgw-id Transit gateway route table The following is an example of a default route table for the attachments shown in the previous diagram, with route propagation enabled. Destination Target Route type 10.1.0.0/16 Attachment for VPC A propagated 10.2.0.0/16 Attachment for VPC B propagated 10.3.0.0/16 Attachment for VPC C propagated 10.99.99.0/24 Attachment for VPN connection propagated Customer gateway BGP table The customer gateway BGP table contains the following VPC CIDRs. Example transit gateway scenarios 14 Amazon VPC • 10.1.0.0/16 • 10.2.0.0/16 • 10.3.0.0/16 Example: Isolated VPCs AWS Transit Gateway You can configure your transit gateway as multiple isolated routers. This is similar to using multiple transit gateways, but provides more flexibility in cases where the routes and attachments might change. In this scenario, each isolated router has a single route table. All attachments associated with an isolated router propagate and associate with its route table. Attachments associated with one isolated router can route packets to each other, but cannot route packets to or receive packets from the attachments for another isolated router. Contents • Overview • Resources • Routing Overview The following diagram shows the key components of the configuration for this scenario. Packets from VPC A, VPC B, and VPC C route to the transit gateway. Packets from the subnets in VPC A, VPC B, and VPC C that have the internet as a destination first route through the transit gateway and then route to the Site-to-Site VPN connection (if the destination is within that network). Packets from one VPC that have a destination of a subnet in another VPC, for example from 10.1.0.0 to 10.2.0.0, route through the transit gateway, where they are blocked because there is no route for them in the transit gateway route table. Example transit gateway scenarios 15 Amazon VPC AWS Transit Gateway Resources Create the following resources for this scenario: • Three VPCs. For more information, see Create a VPC in the Amazon VPC User Guide. • A transit gateway. For more information, see the section called “Create a transit gateway”. • Three attachments on the transit gateway for the three VPCs. For more information, see the section called “Create a VPC attachment”. • A Site-to-Site VPN attachment on the transit gateway. For more information, see the section called “Create a transit gateway attachment to a VPN”. Ensure that you review the requirements for your customer gateway device in the AWS Site-to-Site VPN User Guide. When the VPN connection is up, the BGP session is established and the VPN CIDR propagates to the transit gateway route table and the VPC CIDRs are added to the customer gateway BGP table. Routing Each VPC has a route table, and the transit gateway has two route tables—one for the VPCs and one for the VPN connection. Example transit gateway scenarios 16 Amazon VPC AWS Transit Gateway VPC A, VPC B, and VPC C route tables Each VPC has a route table with 2 entries. The first entry is the default entry for local IPv4 routing in the VPC. This entry enables the instances in this VPC to communicate with each other. The second entry routes all other IPv4 subnet traffic to the transit gateway. The following table shows the VPC A routes. Destination 10.1.0.0/16 0.0.0.0/0 Target local tgw-id Transit gateway route tables This scenario uses one route table for the VPCs and one route table for the VPN connection. The VPC |
vpc-tgw-008 | vpc-tgw.pdf | 8 | Amazon VPC AWS Transit Gateway VPC A, VPC B, and VPC C route tables Each VPC has a route table with 2 entries. The first entry is the default entry for local IPv4 routing in the VPC. This entry enables the instances in this VPC to communicate with each other. The second entry routes all other IPv4 subnet traffic to the transit gateway. The following table shows the VPC A routes. Destination 10.1.0.0/16 0.0.0.0/0 Target local tgw-id Transit gateway route tables This scenario uses one route table for the VPCs and one route table for the VPN connection. The VPC attachments are associated with the following route table, which has a propagated route for the VPN attachment. Destination Target Route type 10.99.99.0/24 Attachment for VPN connection propagated The VPN attachment is associated with the following route table, which has propagated routes for each of the VPC attachments. Destination Target Route type 10.1.0.0/16 Attachment for VPC A propagated 10.2.0.0/16 Attachment for VPC B propagated Example transit gateway scenarios 17 Amazon VPC Destination 10.3.0.0/16 Target Route type Attachment for VPC C propagated AWS Transit Gateway For more information about propagating routes in a transit gateway route table, see Enable route propagation to a transit gateway route table using Amazon VPC Transit Gateways. Customer gateway BGP table The customer gateway BGP table contains the following VPC CIDRs. • 10.1.0.0/16 • 10.2.0.0/16 • 10.3.0.0/16 Example: Isolated VPCs with shared services You can configure your transit gateway as multiple isolated routers that use a shared service. This is similar to using multiple transit gateways, but provides more flexibility in cases where the routes and attachments might change. In this scenario, each isolated router has a single route table. All attachments associated with an isolated router propagate and associate with its route table. Attachments associated with one isolated router can route packets to each other, but cannot route packets to or receive packets from the attachments for another isolated router. Attachments can route packets to or receive packets from the shared services. You can use this scenario when you have groups that need to be isolated, but use a shared service, for example a production system. Contents • Overview • Resources • Routing Overview The following diagram shows the key components of the configuration for this scenario. Packets from the subnets in VPC A, VPC B, and VPC C that have the internet as a destination, first route through the transit gateway and then route to the customer gateway for Site-to-Site VPN. Packets Example transit gateway scenarios 18 Amazon VPC AWS Transit Gateway from subnets in VPC A, VPC B, or VPC C that have a destination of a subnet in VPC A, VPC B, or VPC C route through the transit gateway, where they are blocked because there is no route for them in the transit gateway route table. Packets from VPC A, VPC B, and VPC C that have VPC D as the destination route through the transit gateway and then to VPC D. Resources Create the following resources for this scenario: • Four VPCs. For more information, see Create a VPC in the Amazon VPC User Guide. • A transit gateway. For more information, see Create a transit gateway. • Four attachments on the transit gateway, one per VPC. For more information, see the section called “Create a VPC attachment”. • A Site-to-Site VPN attachment on the transit gateway. For more information, see the section called “Create a transit gateway attachment to a VPN”. Ensure that you review the requirements for your customer gateway device in the AWS Site-to- Site VPN User Guide. When the VPN connection is up, the BGP session is established and the VPN CIDR propagates to the transit gateway route table and the VPC CIDRs are added to the customer gateway BGP table. • Each isolated VPC is associated with the isolated route table and propagated to the shared route table. Example transit gateway scenarios 19 Amazon VPC AWS Transit Gateway • Each shared services VPC is associated with the shared route table and propagated to both route tables. Routing Each VPC has a route table, and the transit gateway has two route tables—one for the VPCs and one for the VPN connection and shared services VPC. VPC A, VPC B, VPC C, and VPC D route tables Each VPC has a route table with two entries. The first entry is the default entry for local routing in the VPC; this entry enables the instances in this VPC to communicate with each other. The second entry routes all other IPv4 subnet traffic to the transit gateway. Destination 10.1.0.0/16 0.0.0.0/0 Transit gateway route tables Target local transit gateway ID This scenario uses one route table for the VPCs and one route table for the VPN connection. The VPC A, B, |
vpc-tgw-009 | vpc-tgw.pdf | 9 | for the VPN connection and shared services VPC. VPC A, VPC B, VPC C, and VPC D route tables Each VPC has a route table with two entries. The first entry is the default entry for local routing in the VPC; this entry enables the instances in this VPC to communicate with each other. The second entry routes all other IPv4 subnet traffic to the transit gateway. Destination 10.1.0.0/16 0.0.0.0/0 Transit gateway route tables Target local transit gateway ID This scenario uses one route table for the VPCs and one route table for the VPN connection. The VPC A, B, and C attachments are associated with the following route table, which has a propagated route for the VPN attachment and a propagated route for the attachment for VPC D. Destination Target Route type 10.99.99.0/24 Attachment for VPN propagated connection 10.4.0.0/16 Attachment for VPC D propagated The VPN attachment and shared services VPC (VPC D) attachments are associated with the following route table, which has entries that point to each of the VPC attachments. This enables communication to the VPCs from the VPN connection and the shared services VPC. Example transit gateway scenarios 20 Amazon VPC Destination 10.1.0.0/16 10.2.0.0/16 10.3.0.0/16 AWS Transit Gateway Target Route type Attachment for VPC A propagated Attachment for VPC B propagated Attachment for VPC C propagated For more information, see Enable route propagation to a transit gateway route table using Amazon VPC Transit Gateways. Customer gateway BGP table The customer gateway BGP table contains the CIDRs for all four VPCs. Example: Peered transit gateways You can create a transit gateway peering connection between transit gateways. You can then route traffic between the attachments for each of the transit gateways. In this scenario, VPC and VPN attachments are associated with the transit gateway default route tables, and they propagate to the transit gateway default route tables. Each transit gateway route table has a static route that points to the transit gateway peering attachment. Contents • Overview • Resources • Routing Overview The following diagram shows the key components of the configuration for this scenario. Transit gateway 1 has two VPC attachments, and transit gateway 2 has one Site-to-Site VPN attachment. Packets from the subnets in VPC A and VPC B that have the internet as a destination first route through transit gateway 1, then transit gateway 2, and then route to the VPN connection. Example transit gateway scenarios 21 Amazon VPC AWS Transit Gateway Resources Create the following resources for this scenario: • Two VPCs. For more information, see Create a VPC in the Amazon VPC User Guide. • Two transit gateways. They can be in the same Region or in different Regions. For more information, see the section called “Create a transit gateway”. • Two VPC attachments on the first transit gateway. For more information, see the section called “Create a VPC attachment”. • A Site-to-Site VPN attachment on the second transit gateway. For more information, see the section called “Create a transit gateway attachment to a VPN”. Ensure that you review the requirements for your customer gateway device in the AWS Site-to-Site VPN User Guide. • A transit gateway peering attachment between the two transit gateways. For more information, see Transit gateway peering attachments in Amazon VPC Transit Gateways. When you create the VPC attachments, the CIDRs for each VPC propagate to the route table for transit gateway 1. When the VPN connection is up, the following actions occur: • The BGP session is established • The Site-to-Site VPN CIDR propagates to the route table for transit gateway 2 • The VPC CIDRs are added to the customer gateway BGP table Routing Each VPC has a route table and each transit gateway has a route table. Example transit gateway scenarios 22 Amazon VPC VPC A and VPC B route tables AWS Transit Gateway Each VPC has a route table with 2 entries. The first entry is the default entry for local IPv4 routing in the VPC. This default entry enables the resources in this VPC to communicate with each other. The second entry routes all other IPv4 subnet traffic to the transit gateway. The following table shows the VPC A routes. Destination 10.0.0.0/16 0.0.0.0/0 Target local tgw-1-id Transit gateway route tables The following is an example of the default route table for transit gateway 1, with route propagation enabled. Destination Target Route type 10.0.0.0/16 Attachment ID for VPC propagated A 10.2.0.0/16 Attachment ID for VPC propagated B 0.0.0.0/0 Attachment ID for peering connection static The following is an example of the default route table for transit gateway 2, with route propagation enabled. Example transit gateway scenarios 23 Amazon VPC AWS Transit Gateway Destination Target Route type 172.31.0.0/24 Attachment ID for VPN propagated connection 10.0.0.0/16 Attachment ID for static peering connection 10.2.0.0/16 Attachment ID for static |
vpc-tgw-010 | vpc-tgw.pdf | 10 | local tgw-1-id Transit gateway route tables The following is an example of the default route table for transit gateway 1, with route propagation enabled. Destination Target Route type 10.0.0.0/16 Attachment ID for VPC propagated A 10.2.0.0/16 Attachment ID for VPC propagated B 0.0.0.0/0 Attachment ID for peering connection static The following is an example of the default route table for transit gateway 2, with route propagation enabled. Example transit gateway scenarios 23 Amazon VPC AWS Transit Gateway Destination Target Route type 172.31.0.0/24 Attachment ID for VPN propagated connection 10.0.0.0/16 Attachment ID for static peering connection 10.2.0.0/16 Attachment ID for static peering connection Customer gateway BGP table The customer gateway BGP table contains the following VPC CIDRs. • 10.0.0.0/16 • 10.2.0.0/16 Example: Centralized outbound routing to the internet You can configure a transit gateway to route outbound internet traffic from a VPC without an internet gateway to a VPC that contains a NAT gateway and an internet gateway. Contents • Overview • Resources • Routing Overview The following diagram shows the key components of the configuration for this scenario. You have applications in VPC A and VPC B that need outbound only internet access. You configure VPC C with a public NAT gateway and an internet gateway, and a private subnet for the VPC attachment. Connect all VPCs to a transit gateway. Configure routing so that outbound internet traffic from VPC A and VPC B traverses the transit gateway to VPC C. The NAT gateway in VPC C routes the traffic to the internet gateway. Example transit gateway scenarios 24 Amazon VPC AWS Transit Gateway Resources Create the following resources for this scenario: • Three VPCs with IP address ranges that are neither identical nor overlap. For more information, see Create a VPC in the Amazon VPC User Guide. • VPC A and VPC B each have private subnets with EC2 instances. • VPC C has the following: • An internet gateway attached to the VPC. For more information, see Create and attach an internet gateway in the Amazon VPC User Guide. • A public subnet with a NAT gateway. For more information, see Create a NAT gateway in the Amazon VPC User Guide. • A private subnet for the transit gateway attachment. The private subnet should be in the same Availability Zone as the public subnet. • One transit gateway. For more information, see the section called “Create a transit gateway”. • Three VPC attachments on the transit gateway. The CIDR blocks for each VPC propagate to the transit gateway route table. For more information, see the section called “Create a VPC attachment”. For VPC C, you must create the attachment using the private subnet. If you create the attachment using the public subnet, the instance traffic is routed to the internet gateway, but the internet gateway drops the traffic because the instances don't have public IP addresses. Example transit gateway scenarios 25 Amazon VPC AWS Transit Gateway By placing the attachment in the private subnet, the traffic is routed to the NAT gateway, and the NAT gateway sends the traffic to the internet gateway using its Elastic IP address as the source IP address. Routing There are route tables for each VPC and a route table for the transit gateway. Route tables • Route table for VPC A • Route table for VPC B • Route tables for VPC C • Transit gateway route table Route table for VPC A The following is an example route table. The first entry enables instances in the VPC to communicate with each other. The second entry routes all other IPv4 subnet traffic to the transit gateway. Destination VPC A CIDR 0.0.0.0/0 Route table for VPC B Target local transit-gateway-id The following is an example route table. The first entry enables the instances in the VPC to communicate with each other. The second entry routes all other IPv4 subnet traffic to the transit gateway. Destination Target Example transit gateway scenarios 26 Amazon VPC Destination VPC B CIDR Target local AWS Transit Gateway 0.0.0.0/0 transit-gateway-id Route tables for VPC C Configure the subnet with the NAT gateway as a public subnet by adding a route to the internet gateway. Leave the other subnet as a private subnet. The following is an example route table for the public subnet. The first entry enables instances in the VPC to communicate with each other. The second and third entries route traffic for VPC A and VPC B to the transit gateway. The remaining entry routes all other IPv4 subnet traffic to the internet gateway. Destination VPC C CIDR VPC A CIDR VPC B CIDR 0.0.0.0/0 Target local transit-gateway-id transit-gateway-id internet-gateway-id The following is an example route table for the private subnet. The first entry enables instances in the VPC to communicate with each other. The second entry |
vpc-tgw-011 | vpc-tgw.pdf | 11 | a private subnet. The following is an example route table for the public subnet. The first entry enables instances in the VPC to communicate with each other. The second and third entries route traffic for VPC A and VPC B to the transit gateway. The remaining entry routes all other IPv4 subnet traffic to the internet gateway. Destination VPC C CIDR VPC A CIDR VPC B CIDR 0.0.0.0/0 Target local transit-gateway-id transit-gateway-id internet-gateway-id The following is an example route table for the private subnet. The first entry enables instances in the VPC to communicate with each other. The second entry routes all other IPv4 subnet traffic to the NAT gateway. Destination VPC C CIDR 0.0.0.0/0 Target local nat-gateway-id Example transit gateway scenarios 27 Amazon VPC Transit gateway route table AWS Transit Gateway The following is an example of the transit gateway route table. The CIDR blocks for each VPC propagate to the transit gateway route table. The static route sends outbound internet traffic to VPC C. You can optionally prevent inter-VPC communication by adding a blackhole route for each VPC CIDR. CIDR Attachment Route type VPC A CIDR Attachment for VPC A propagated VPC B CIDR Attachment for VPC B propagated VPC C CIDR Attachment for VPC C propagated 0.0.0.0/0 Attachment for VPC C static Example: Appliance in a shared services VPC You can configure an appliance (such as a security appliance) in a shared services VPC. All traffic that's routed between transit gateway attachments is first inspected by the appliance in the shared services VPC. When appliance mode is enabled, a transit gateway selects a single network interface in the appliance VPC, using a flow hash algorithm, to send traffic to for the life of the flow. The transit gateway uses the same network interface for the return traffic. This ensures that bidirectional traffic is routed symmetrically—it's routed through the same Availability Zone in the VPC attachment for the life of the flow. If you have multiple transit gateways in your architecture, each transit gateway maintains its own session affinity, and each transit gateway can select a different network interface. You must connect exactly one transit gateway to the appliance VPC to guarantee flow stickiness. Connecting multiple transit gateways to a single appliance VPC does not guarantee flow stickiness because the transit gateways do not share flow state information with each other. Example transit gateway scenarios 28 Amazon VPC Important AWS Transit Gateway • Traffic in appliance mode is routed correctly as long as the source and destination traffic are coming to a centralized VPC (Inspection VPC) from the same transit gateway attachment. Traffic can drop if the source and destination are on two different transit gateway attachments. Traffic can drop if the centralized VPC receives the traffic from a different gateway — for example, an Internet gateway — and then sends that traffic to the transit gateway attachment after inspection. • Enabling appliance mode on an existing attachment might affect that attachment's current route as the attachment can flow through any Availability Zone. When appliance mode is not enabled, traffic is kept to the originating Availability Zone. Contents • Overview • Stateful appliances and appliance mode • Routing Overview The following diagram shows the key components of the configuration for this scenario. The transit gateway has three VPC attachments. VPC C is a shared services VPC. Traffic between VPC A and VPC B is routed to the transit gateway, then routed to a security appliance in VPC C for inspection before it's routed to the final destination. The appliance is a stateful appliance, therefore both the request and response traffic is inspected. For high availability, there is an appliance in each Availability Zone in VPC C. Example transit gateway scenarios 29 Amazon VPC AWS Transit Gateway You create the following resources for this scenario: • Three VPCs. For more information, see Create a VPC in the Amazon VPC User Guide. • A transit gateway. For more information, see the section called “Create a transit gateway”. • Three VPC attachments - one for each of the VPCs. For more information, see the section called “Create a VPC attachment”. For each VPC attachment, specify a subnet in each Availability Zone. For the shared services VPC, these are the subnets where traffic is routed to the VPC from the transit gateway. In the preceding example, these are subnets A and C. Example transit gateway scenarios 30 Amazon VPC AWS Transit Gateway For the VPC attachment for VPC C, enable appliance mode support so that response traffic is routed to the same Availability Zone in VPC C as the source traffic. The Amazon VPC console supports appliance mode. You can also use the Amazon VPC API, an AWS SDK, the AWS CLI to enable appliance mode, or AWS CloudFormation. For example, add |
vpc-tgw-012 | vpc-tgw.pdf | 12 | For the shared services VPC, these are the subnets where traffic is routed to the VPC from the transit gateway. In the preceding example, these are subnets A and C. Example transit gateway scenarios 30 Amazon VPC AWS Transit Gateway For the VPC attachment for VPC C, enable appliance mode support so that response traffic is routed to the same Availability Zone in VPC C as the source traffic. The Amazon VPC console supports appliance mode. You can also use the Amazon VPC API, an AWS SDK, the AWS CLI to enable appliance mode, or AWS CloudFormation. For example, add -- options ApplianceModeSupport=enable to the create-transit-gateway-vpc-attachment or modify-transit-gateway-vpc-attachment command. Note Flow stickiness in appliance mode is guaranteed only for source and destination traffic that originate towards the Inspection VPC. Stateful appliances and appliance mode If your VPC attachments span multiple Availability Zones and you require traffic between source and destination hosts to be routed through the same appliance for stateful inspection, enable appliance mode support for the VPC attachment in which the appliance is located. For more information, see Centralized inspection architecture in the AWS blog. Behavior when appliance mode is not enabled When appliance mode is not enabled, a transit gateway attempts to keep traffic routed between VPC attachments in the originating Availability Zone until it reaches its destination. Traffic crosses Availability Zones between attachments only if there is an Availability Zone failure or if there are no subnets associated with a VPC attachment in that Availability Zone. The following diagram shows a traffic flow when appliance mode support is not enabled. The response traffic that originates from Availability Zone 2 in VPC B is routed by the transit gateway to the same Availability Zone in VPC C. The traffic is therefore dropped, because the appliance in Availability Zone 2 is not aware of the original request from the source in VPC A. Example transit gateway scenarios 31 Amazon VPC AWS Transit Gateway Routing Each VPC has one or more route tables and the transit gateway has two route tables. VPC route tables VPC A and VPC B VPCs A and B have route tables with 2 entries. The first entry is the default entry for local IPv4 routing in the VPC. This default entry enables the resources in this VPC to communicate with each other. The second entry routes all other IPv4 subnet traffic to the transit gateway. The following is the route table for VPC A. Destination Target Example transit gateway scenarios 32 Amazon VPC Destination 10.0.0.0/16 0.0.0.0/0 VPC C AWS Transit Gateway Target local tgw-id The shared services VPC (VPC C) has different route tables for each subnet. Subnet A is used by the transit gateway (you specify this subnet when you create the VPC attachment). The route table for subnet A routes all traffic to the appliance in subnet B. Destination 192.168.0.0/16 0.0.0.0/0 Target local appliance-eni-id The route table for subnet B (which contains the appliance) routes the traffic back to the transit gateway. Destination 192.168.0.0/16 0.0.0.0/0 Transit gateway route tables Target local tgw-id This transit gateway uses one route table for VPC A and VPC B, and one route table for the shared services VPC (VPC C). The VPC A and VPC B attachments are associated with the following route table. The route table routes all traffic to VPC C. Example transit gateway scenarios 33 Amazon VPC AWS Transit Gateway Destination Target Route type 0.0.0.0/0 Attachment ID for VPC C static The VPC C attachment is associated with the following route table. It routes traffic to VPC A and VPC B. Destination 10.0.0.0/16 Target Route type Attachment ID for VPC propagated A 10.1.0.0/16 Attachment ID for VPC propagated B Example transit gateway scenarios 34 Amazon VPC AWS Transit Gateway Get started with using Amazon VPC Transit Gateways The following tasks help you become familiar with transit gateways in Amazon VPC Transit Gateways. This task walks you through creating a transit gateway and then connecting two of your VPCs using that transit gateway. Tasks • Prerequisites • Step 1: Create the transit gateway • Step 2: Attach your VPCs to your transit gateway • Step 3: Add routes between the transit gateway and your VPCs • Step 4: Test the transit gateway • Step 5: Delete the transit gateway Prerequisites • To demonstrate a simple example of using a transit gateway, create two VPCs in the same Region. The VPCs can neither have identical nor overlapping CIDRs. Launch one Amazon EC2 instance in each VPC. For more information, see Create a VPC in the Amazon VPC User Guide and Launch an instance in the Amazon EC2 User Guide. • You can't have identical routes pointing to two different VPCs. A transit gateway does not propagate the CIDRs of a newly attached VPC if an identical |
vpc-tgw-013 | vpc-tgw.pdf | 13 | • Step 4: Test the transit gateway • Step 5: Delete the transit gateway Prerequisites • To demonstrate a simple example of using a transit gateway, create two VPCs in the same Region. The VPCs can neither have identical nor overlapping CIDRs. Launch one Amazon EC2 instance in each VPC. For more information, see Create a VPC in the Amazon VPC User Guide and Launch an instance in the Amazon EC2 User Guide. • You can't have identical routes pointing to two different VPCs. A transit gateway does not propagate the CIDRs of a newly attached VPC if an identical route exists in the transit gateway route tables. • Verify that you have the permissions required to work with transit gateways. For more information, see Identity and access management in Amazon VPC Transit Gateways . • You can't ping between hosts if you haven't added an ICMP rule to each of the host security groups. For more information, see Configure security group rules in the Amazon VPC User Guide. Step 1: Create the transit gateway When you create a transit gateway, we create a default transit gateway route table and use it as the default association route table and the default propagation route table. Prerequisites 35 Amazon VPC To create a transit gateway AWS Transit Gateway 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. In the Region selector, choose the Region that you used when you created the VPCs. 3. On the navigation pane, choose Transit Gateways. 4. Choose Create transit gateway. 5. 6. 7. 8. 9. (Optional) For Name tag, enter a name for the transit gateway. This creates a tag with "Name" as the key and the name that you specified as the value. (Optional) For Description, enter a description for the transit gateway. In Configure the transit gateway section, do the following: 1. For Amazon side Autonomous System Number (ASN), enter the private ASN for your transit gateway. This should be the ASN for the AWS side of a Border Gateway Protocol (BGP) session. The range is from 64512 to 65534 for 16-bit ASNs. The range is from 4200000000 to 4294967294 for 32-bit ASNs. If you have a multi-Region deployment, we recommend that you use a unique ASN for each of your transit gateways. 2. (Optional) Choose whether to enable any of the following: • DNS support for VPCs attached to this transit gateway. • VPN ECMP support for VPN connections attached to the transit gateway. • Default route table association, which automatically associates transit gateway attachments with this transit gateway's default route table. • Default route table propagation, which automatically propagates route table attachments to this transit gateway's default route table. • Multicast support, which allows you to create multicast domains in this transit gateway. (Optional) In the Configure-cross-account sharing options section, choose whether to Auto accept shared attachments. If enabled, attachments are automatically accepted. Otherwise, you must accept or reject attachment requests. (Optional) In the Transit gateway CIDR blocks section, add a size /24 CIDR block or larger for IPv4 addresses or /64 block or larger CIDR block for IPv6 addresses. You can associate Step 1: Create the transit gateway 36 Amazon VPC AWS Transit Gateway any public or private IP address range, except for addresses in the 169.254.0.0/16 range, and ranges that overlap with the addresses for your VPC attachments and on-premises networks. Note Transit gateway CIDR blocks are used if you are configuring Connect (GRE) attachments or PrivateIP VPNs. Transit Gateway assigns IPs for the Tunnel endpoints (GRE/PrivateIP VPN) from this range. 10. (Optional) Add key-value tags to this transit gateway to further help identify it. 1. Choose Add new tab. 2. Enter a Key name and associated Value. 3. Choose Add new tag to add additional tags, or skip to the next step. 11. Choose Create transit gateway. When the gateway is created, the initial state of the transit gateway is pending. Step 2: Attach your VPCs to your transit gateway Wait until the transit gateway you created in the previous section shows as available before proceeding with creating an attachment. Create an attachment for each VPC. Confirm that you have created two VPCs and launched an EC2 instance in each, as described in Prerequisites. Create a transit gateway attachment to a VPC 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateway Attachments. 3. Choose Create transit gateway attachment. 4. 5. 6. (Optional) For Name tag, enter a name for the attachment. For Transit gateway ID, choose the transit gateway to use for the attachment. For Attachment type, choose VPC. 7. Choose whether to enable DNS support. For this exercise, do not enable IPv6 support. 8. For VPC ID, choose the VPC to attach to the transit gateway. Step 2: Attach your VPCs to |
vpc-tgw-014 | vpc-tgw.pdf | 14 | as described in Prerequisites. Create a transit gateway attachment to a VPC 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateway Attachments. 3. Choose Create transit gateway attachment. 4. 5. 6. (Optional) For Name tag, enter a name for the attachment. For Transit gateway ID, choose the transit gateway to use for the attachment. For Attachment type, choose VPC. 7. Choose whether to enable DNS support. For this exercise, do not enable IPv6 support. 8. For VPC ID, choose the VPC to attach to the transit gateway. Step 2: Attach your VPCs to your transit gateway 37 Amazon VPC AWS Transit Gateway 9. For Subnet IDs, select one subnet for each Availability Zone to be used by the transit gateway to route traffic. You must select at least one subnet. You can select only one subnet per Availability Zone. 10. Choose Create transit gateway attachment. Each attachment is always associated with exactly one route table. Route tables can be associated with zero to many attachments. To determine the routes to configure, decide on the use case for your transit gateway, and then configure the routes. For more information, see the section called “Example transit gateway scenarios”. Step 3: Add routes between the transit gateway and your VPCs A route table includes dynamic and static routes that determine the next hop for associated VPCs based on the destination IP address of the packet. Configure a route that has a destination for non-local routes and the target of the transit gateway attachment ID. For more information, see Routing for a transit gateway in the Amazon VPC User Guide. To add a route to a VPC route table 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Route Tables. 3. Choose the route table associated with your VPC. 4. Choose the Routes tab, then choose Edit routes. 5. Choose Add route. 6. In the Destination column, enter the destination IP address range. For Target, choose Transit Gateway, and then choose the transit gateway ID. 7. Choose Save changes. Step 4: Test the transit gateway You can confirm that the transit gateway was successfully created by connecting to an Amazon EC2 instance in each VPC, and then sending data between them, such as a ping command. For more information, see Connect to your EC2 instance in the Amazon EC2 User Guide. Step 3: Add routes between the transit gateway and your VPCs 38 Amazon VPC AWS Transit Gateway Step 5: Delete the transit gateway When you no longer need a transit gateway, you can delete it. You cannot delete a transit gateway that has resource attachments. If you try to delete a transit gateway with attachments, you'll be prompted to first delete those attachments before you can delete the transit gateway. As soon as the transit gateway is deleted, you stop incurring charges for it. To delete your transit gateway 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateways. 3. 4. Select the transit gateway, and then choose Actions, Delete transit gateway. Enter delete and choose Delete. The State of the transit gateway on the Transit gateways page is Deleting. Once deleted the transit gateway is removed from the page. Step 5: Delete the transit gateway 39 Amazon VPC AWS Transit Gateway Amazon VPC Transit Gateways design best practices The following are best practices for your transit gateway design: • Use a separate subnet for each transit gateway VPC attachment. For each subnet, use a small CIDR, for example /28, so that you have more addresses for EC2 resources. When you use a separate subnet, you can configure the following: • Keep the inbound and outbound network ACLs associated with the transit gateway subnets open. • Depending on your traffic flow, you can apply network ACLs to your workload subnets. • Create one network ACL and associate it with all of the subnets that are associated with the transit gateway. Keep the network ACL open in both the inbound and outbound directions. • Associate the same VPC route table with all of the subnets that are associated with the transit gateway, unless your network design requires multiple VPC route tables (for example, a middle- box VPC that routes traffic through multiple NAT gateways). • Use Border Gateway Protocol (BGP) Site-to-Site VPN connections. If your customer gateway device or firewall for the connection supports multipath, enable the feature. • Enable route propagation for AWS Direct Connect gateway attachments and BGP Site-to-Site VPN attachments. • When migrating from VPC peering to use a transit gateway. An MTU size mismatch between VPC peering and the transit gateway might result in some packets dropping for asymmetric traffic. Update both VPCs at the same time to avoid jumbo packets dropping |
vpc-tgw-015 | vpc-tgw.pdf | 15 | requires multiple VPC route tables (for example, a middle- box VPC that routes traffic through multiple NAT gateways). • Use Border Gateway Protocol (BGP) Site-to-Site VPN connections. If your customer gateway device or firewall for the connection supports multipath, enable the feature. • Enable route propagation for AWS Direct Connect gateway attachments and BGP Site-to-Site VPN attachments. • When migrating from VPC peering to use a transit gateway. An MTU size mismatch between VPC peering and the transit gateway might result in some packets dropping for asymmetric traffic. Update both VPCs at the same time to avoid jumbo packets dropping due to size mismatches. • You do not need additional transit gateways for high availability, because transit gateways are highly available by design. • Limit the number of transit gateway route tables unless your design requires multiple transit gateway route tables. • For redundancy, use a single transit gateway in each Region for disaster recovery. • For deployments with multiple transit gateways, we recommend that you use a unique Autonomous System Number (ASN) for each of your transit gateways. You can also use inter- Region peering. For more information, see Building a global network using AWS Transit Gateway Inter-Region peering. 40 Amazon VPC AWS Transit Gateway Work with transit gateways using Amazon VPC Transit Gateways You can work with transit gateways using the Amazon VPC console or the AWS CLI. Topics • Shared transit gateways • Transit gateways in Amazon VPC Transit Gateways • Amazon VPC attachments in Amazon VPC Transit Gateways • AWS Site-to-Site VPN attachments in Amazon VPC Transit Gateways • Transit gateway attachments to a Direct Connect gateway in Amazon VPC Transit Gateways • Transit gateway peering attachments in Amazon VPC Transit Gateways • Transit Gateway Connect attachments and Transit Gateway Connect peers in Amazon VPC Transit Gateways • Transit gateway route tables in Amazon VPC Transit Gateways • Transit gateway policy tables in Amazon VPC Transit Gateways • Multicast in Amazon VPC Transit Gateways Shared transit gateways You can use AWS Resource Access Manager (RAM) to share a transit gateway for VPC attachments across accounts or across your organization in AWS Organizations. RAM must be enabled and resources shared with an organization. For more information, see Enable resource sharing with AWS Organizations in the AWS RAM User Guide. Considerations Take the following into account when you want to share a transit gateway. • An AWS Site-to-Site VPN attachment must be created in the same AWS account that owns the transit gateway. • An attachment to a Direct Connect gateway uses a transit gateway association and can be in the same AWS account as the Direct Connect gateway, or a different one from the Direct Connect gateway. Shared transit gateways 41 Amazon VPC AWS Transit Gateway By default, users do not have permission to create or modify AWS RAM resources. To allow users to create or modify resources and perform tasks, you must create IAM policies that grant permission to use specific resources and API actions. You then attach those policies to the IAM users or groups that require those permissions. Only the resource owner can perform the following operations: • Create a resource share. • Update a resource share. • View a resource share. • View the resources that are shared by your account, across all resource shares. • View the principals with whom you are sharing your resources, across all resource shares. Viewing the principals with whom you are sharing enables you to determine who has access to your shared resources. • Delete a resource share. • Run all transit gateway, transit gateway attachment, and transit gateway route tables APIs. You can perform the following operations on resources that are shared with you: • Accept, or reject a resource share invitation. • View a resource share. • View the shared resources that you can access. • View a list of all the principals that are sharing resources with you. You can see which resources and resource shares they have shared with you. • Can run the DescribeTransitGateways API. • Run the APIs that create and describe attachments, for example CreateTransitGatewayVpcAttachment and DescribeTransitGatewayVpcAttachments, in their VPCs. • Leave a resource share. When a transit gateway is shared with you, you cannot create, modify, or delete its transit gateway route tables, or its transit gateway route table propagations and associations. When you create a transit gateway, the transit gateway, is created in the Availability Zone that is mapped to your account and is independent from other accounts. When the transit gateway Share your transit gateways 42 Amazon VPC AWS Transit Gateway and the attachment entities are in different accounts, use the Availability Zone ID to uniquely and consistently identify the Availability Zone. For example, use1-az1 is an AZ ID for the us-east-1 Region and maps to the |
vpc-tgw-016 | vpc-tgw.pdf | 16 | shared with you, you cannot create, modify, or delete its transit gateway route tables, or its transit gateway route table propagations and associations. When you create a transit gateway, the transit gateway, is created in the Availability Zone that is mapped to your account and is independent from other accounts. When the transit gateway Share your transit gateways 42 Amazon VPC AWS Transit Gateway and the attachment entities are in different accounts, use the Availability Zone ID to uniquely and consistently identify the Availability Zone. For example, use1-az1 is an AZ ID for the us-east-1 Region and maps to the same location in every AWS account. Unshare a transit gateway When the share owner unshares the transit gateway, the following rules apply: • The transit gateway attachment remains functional. • The shared account can not describe the transit gateway. • The transit gateway owner, and the share owner can delete the transit gateway attachment. When a transit gateway is unshared with another AWS account, or if the AWS account that the transit gateway is shared with is removed from the organization, the transit gateway itself won't be impacted. Shared subnets A VPC owner can attach a transit gateway to a shared VPC subnet. Participants cannot. The traffic from participant’s resources can use the attachments depending on the routes set up on the shared VPC subnet by the VPC owner. For more information, see Share your VPC with other accounts in the Amazon VPC User Guide. Transit gateways in Amazon VPC Transit Gateways A transit gateway enables you to attach VPCs and VPN connections and route traffic between them. A transit gateway works across AWS accounts, and you can use AWS RAM to share your transit gateway with other accounts. After you share a transit gateway with another AWS account, the account owner can attach their VPCs to your transit gateway. A user from either account can delete the attachment at any time. You can enable multicast on a transit gateway, and then create a transit gateway multicast domain that allows multicast traffic to be sent from your multicast source to multicast group members over VPC attachments that you associate with the domain. Each VPC or VPN attachment is associated with a single route table. That route table decides the next hop for the traffic coming from that resource attachment. A route table inside the transit gateway allows for both IPv4 or IPv6 CIDRs and targets. The targets are VPCs and VPN connections. Unshare a transit gateway 43 Amazon VPC AWS Transit Gateway When you attach a VPC or create a VPN connection on a transit gateway, the attachment is associated with the default route table of the transit gateway. You can create additional route tables inside the transit gateway, and change the VPC or VPN association to these route tables. This enables you to segment your network. For example, you can associate development VPCs with one route table and production VPCs with a different route table. This enables you to create isolated networks inside a transit gateway similar to virtual routing and forwarding (VRFs) in traditional networks. Transit gateways support dynamic and static routing between attached VPCs and VPN connections. You can enable or disable route propagation for each attachment. Transit gateway peering attachments support static routing only. You can point routes in transit gateway route tables to the peering attachment for routing traffic between the peered transit gateways. You can optionally associate one or more IPv4 or IPv6 CIDR blocks with your transit gateway. You specify an IP address from the CIDR block when you establish a Transit Gateway Connect peer for a Transit Gateway Connect attachment. You can associate any public or private IP address range, except for addresses in the 169.254.0.0/16 range, and ranges that overlap with addresses for your VPC attachments and on-premises networks. For more information about IPv4 and IPv6 CIDR blocks, see IP addressing in the Amazon VPC User Guide. Tasks • Create a transit gateway using Amazon VPC Transit Gateways • View transit gateway information using Amazon VPC Transit Gateways • Add or edit tags for a transit gateway using Amazon VPC Transit Gateways • Modify a transit gateway using Amazon VPC Transit Gateways • Accept a resource share using Amazon VPC Transit Gateways • Accept a shared attachment using Amazon VPC Transit Gateways • Delete a transit gateway using Amazon VPC Transit Gateways Create a transit gateway using Amazon VPC Transit Gateways When you create a transit gateway, we create a default transit gateway route table and use it as the default association route table and the default propagation route table. If you choose not to create the default transit gateway route table, you can create one later on. For more information about routes and route tables, see ???. Create a transit |
vpc-tgw-017 | vpc-tgw.pdf | 17 | Gateways • Accept a resource share using Amazon VPC Transit Gateways • Accept a shared attachment using Amazon VPC Transit Gateways • Delete a transit gateway using Amazon VPC Transit Gateways Create a transit gateway using Amazon VPC Transit Gateways When you create a transit gateway, we create a default transit gateway route table and use it as the default association route table and the default propagation route table. If you choose not to create the default transit gateway route table, you can create one later on. For more information about routes and route tables, see ???. Create a transit gateway 44 Amazon VPC AWS Transit Gateway To create a transit gateway using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateways. 3. Choose Create transit gateway. 4. 5. 6. 7. 8. 9. For Name tag, optionally enter a name for the transit gateway. A name tag can make it easier to identify a specific gateway from the list of gateways. When you add a Name tag, a tag is created with a key of Name and with a value equal to the value you enter. For Description, optionally enter a description for the transit gateway. For Amazon side Autonomous System Number (ASN), either leave the default value to use the default ASN or enter the private ASN for your transit gateway. This should be the ASN for the AWS side of a Border Gateway Protocol (BGP) session. The range is 64512 to 65534 for 16-bit ASNs. The range is 4200000000 to 4294967294 for 32-bit ASNs. If you have a multi-Region deployment, we recommend that you use a unique ASN for each of your transit gateways. For DNS support, select this option if you need the VPC to resolve public IPv4 DNS host names to private IPv4 addresses when queried from instances in another VPC attached to the transit gateway. For Security Group Referencing support, enable this feature to reference a security group across VPCs attached to a transit gateway. For more information about security group referencing see the section called “Security group referencing”. For VPN ECMP support, select this option if you need Equal Cost Multipath (ECMP) routing support between VPN tunnels. If connections advertise the same CIDRs, the traffic is distributed equally between them. When you select this option, the advertised BGP ASN, then the BGP attributes such as the AS- path, must be the same. Note To use ECMP, you must create a VPN connection that uses dynamic routing. VPN connections that use static routing do not support ECMP. Create a transit gateway 45 Amazon VPC AWS Transit Gateway 10. For Default route table association, select this option to automatically associate transit gateway attachments with the default route table for the transit gateway. 11. For Default route table propagation, select this option to automatically propagate transit gateway attachments to the default route table for the transit gateway. 12. (Optional) To use the transit gateway as a router for multicast traffic, select Multicast support. 13. (Optional) In the Configure-cross-account sharing options section, choose whether to Auto accept shared attachments. If enabled, attachments are automatically accepted. Otherwise, you must accept or reject attachment requests. For Auto accept shared attachments, select this option to automatically accept cross-account attachments. 14. (Optional) For Transit gateway CIDR blocks, specify one or more IPv4 or IPv6 CIDR blocks for your transit gateway. You can specify a size /24 CIDR block or larger (for example, /23 or /22) for IPv4, or a size /64 CIDR block or larger (for example, /63 or /62) for IPv6. You can associate any public or private IP address range, except for addresses in the 169.254.0.0/16 range, and ranges that overlap with the addresses for your VPC attachments and on-premises networks. Note Transit gateway CIDR blocks are used if you are configuring Connect (GRE) attachments or PrivateIP VPNs. Transit Gateway assigns IPs for the Tunnel endpoints (GRE/PrivateIP VPN) from this range. 15. Choose Create transit gateway. To create a transit gateway using the AWS CLI Use the create-transit-gateway command. View transit gateway information using Amazon VPC Transit Gateways View any of your transit gateways. To view a transit gateway using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. View a transit gateway 46 Amazon VPC AWS Transit Gateway 2. On the navigation pane, choose Transit Gateways. he details for the transit gateway are displayed below the list of gateways on the page. To view a transit gateway using the AWS CLI Use the describe-transit-gateways command. Add or edit tags for a transit gateway using Amazon VPC Transit Gateways Add tags to your resources to help organize and identify them, such as by purpose, owner, or environment. You can add multiple tags to each transit gateway. Tag keys must be |
vpc-tgw-018 | vpc-tgw.pdf | 18 | console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. View a transit gateway 46 Amazon VPC AWS Transit Gateway 2. On the navigation pane, choose Transit Gateways. he details for the transit gateway are displayed below the list of gateways on the page. To view a transit gateway using the AWS CLI Use the describe-transit-gateways command. Add or edit tags for a transit gateway using Amazon VPC Transit Gateways Add tags to your resources to help organize and identify them, such as by purpose, owner, or environment. You can add multiple tags to each transit gateway. Tag keys must be unique for each transit gateway. If you add a tag with a key that is already associated with the transit gateway, it updates the value of that tag. For more information, see Tagging your Amazon EC2 Resources. Add tags to a transit gateway using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateways. 3. Choose the transit gateway that you want to add or edit tags for. 4. Choose the Tags tab in the lower part of the page. 5. Choose Manage tags. 6. Choose Add new tag. 7. Enter a Key and Value for the tag. 8. Choose Save. Modify a transit gateway using Amazon VPC Transit Gateways You can modify the configuration options for a transit gateway. When you modify a transit gateway, any existing transit gateway attachments don't experience any service interruptions. You cannot modify a transit gateway that has been shared with you. You cannot remove a CIDR block for the transit gateway if any of the IP addresses are currently used for a Connect peer. Add or edit transit gateway tags 47 Amazon VPC To modify a transit gateway AWS Transit Gateway 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateways. 3. Choose the transit gateway to modify. 4. Choose Actions, Modify transit gateway. 5. Modify the options as needed, and choose Modify transit gateway. To modify your transit gateway using the AWS CLI Use the modify-transit-gateway command. Accept a resource share using Amazon VPC Transit Gateways If you were added to a resource share, you receive an invitation to join the resource share. You must accept the resource share before you can access the shared resources. To accept a resource share 1. Open the AWS RAM console at https://console.aws.amazon.com/ram/. 2. On the navigation pane, choose Shared with me, Resource shares. 3. Select the resource share. 4. Choose Accept resource share. 5. To view the shared transit gateway, open the Transit Gateways page in the Amazon VPC console. Accept a shared attachment using Amazon VPC Transit Gateways If you didn't enable the Auto accept shared attachments functionality when you created your transit gateway, you must manually accept cross-account (shared) attachment using either the Amazon VPC Console or the AWS CLI. To manually accept a shared attachment 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateway Attachments. Accept a resource share 48 Amazon VPC AWS Transit Gateway 3. Select the transit gateway attachment that's pending acceptance. 4. Choose Actions, Accept transit gateway attachment. To accept a shared attachment using the AWS CLI Use the accept-transit-gateway-vpc-attachment command. Delete a transit gateway using Amazon VPC Transit Gateways You can't delete a transit gateway with existing attachments. You need to delete all attachments before you can delete a transit gateway. To delete a transit gateway using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. Choose the transit gateway to delete. 3. Choose Actions, Delete transit gateway. Enter delete and choose Delete to confirm the deletion. To delete a transit gateway using the AWS CLI Use the delete-transit-gateway command. Amazon VPC attachments in Amazon VPC Transit Gateways An Amazon Virtual Private Cloud (VPC) attachment to a transit gateway allows you to route traffic to and from one or more VPC subnets. When you attach a VPC to a transit gateway, you must specify one subnet from each Availability Zone to be used by the transit gateway to route traffic. Specifying one subnet from an Availability Zone enables traffic to reach resources in every subnet in that Availability Zone. Limits • When you attach a VPC to a transit gateway, any resources in Availability Zones where there is no transit gateway attachment cannot reach the transit gateway. If there is a route to the transit gateway in a subnet route table, traffic is forwarded to the transit gateway only when the transit gateway has an attachment in a subnet in the same Availability Zone. Delete a transit gateway 49 Amazon VPC AWS Transit Gateway • A transit gateway does not support DNS resolution for custom DNS names of attached VPCs set up using private hosted |
vpc-tgw-019 | vpc-tgw.pdf | 19 | in that Availability Zone. Limits • When you attach a VPC to a transit gateway, any resources in Availability Zones where there is no transit gateway attachment cannot reach the transit gateway. If there is a route to the transit gateway in a subnet route table, traffic is forwarded to the transit gateway only when the transit gateway has an attachment in a subnet in the same Availability Zone. Delete a transit gateway 49 Amazon VPC AWS Transit Gateway • A transit gateway does not support DNS resolution for custom DNS names of attached VPCs set up using private hosted zones in Amazon Route 53. To configure name resolution for private hosted zones for all VPCs attached to a transit gateway, see Centralized DNS management of hybrid cloud with Amazon Route 53 and AWS Transit Gateway. • A transit gateway doesn't support routing between VPCs with identical CIDRs, or if a CIDR in a range overlaps a CIDR in an attached VPC. If you attach a VPC to a transit gateway and its CIDR is identical to, or overlaps with, the CIDR of another VPC that's already attached to the transit gateway, the routes for the newly attached VPC aren't propagated to the transit gateway route table. • You can't create an attachment for a VPC subnet that resides in a Local Zone. However, you can configure your network so that subnets in the Local Zone can connect to a transit gateway through the parent Availability Zone. For more information, see Connect Local Zone subnets to a transit gateway. • You can't create a transit gateway attachment using IPv6-only subnets. Transit gateway attachment subnets must also support IPv4 addresses. • A transit gateway must have at least one VPC attachment before that transit gateway can be added to a route table. VPC attachment lifecycle A VPC attachment goes through various stages, starting when the request is initiated. At each stage, there may be actions that you can take, and at the end of its lifecycle, the VPC attachment remains visible in the Amazon Virtual Private Cloud Console and in API or command line output, for a period of time. The following diagram shows the states an attachment can go through in a single account configuration, or a cross-account configuration that has Auto accept shared attachments turned on. VPC attachment lifecycle 50 Amazon VPC AWS Transit Gateway • Pending: A request for a VPC attachment has been initiated and is in the provisioning process. At this stage, the attachment can fail, or can go to available. • Failing: A request for a VPC attachment is failing. At this stage, the VPC attachment goes to failed. • Failed: The request for the VPC attachment has failed. While in this state, it cannot be deleted. The failed VPC attachment remains visible for 2 hours, and then is no longer visible. • Available: The VPC attachment is available, and traffic can flow between the VPC and the transit gateway. At this stage, the attachment can go to modifying, or go to deleting. • Deleting: A VPC attachment that is in the process of being deleted. At this stage, the attachment can go to deleted. • Deleted: An available VPC attachment has been deleted. While in this state, the VPC attachment cannot be modified. The VPC attachment remains visible for 2 hours, and then is no longer visible. VPC attachment lifecycle 51 Amazon VPC AWS Transit Gateway • Modifying: A request has been made to modify the properties of the VPC attachment. At this stage, the attachment can go to available, or go to rolling back. • Rolling back: The VPC attachment modification request cannot be completed, and the system is undoing any changes that were made. At this stage, the attachment can go to available. The following diagram shows the states an attachment can go through in a cross-account configuration that has Auto accept shared attachments turned off. • Pending-acceptance: The VPC attachment request is awaiting acceptance. At this stage, the attachment can go to pending, to rejecting, or to deleting. • Rejecting: A VPC attachment that is in the process of being rejected. At this stage, the attachment can go to rejected. • Rejected: A pending acceptance VPC attachment has been rejected. While in this state, the VPC attachment cannot be modified. The VPC attachment remains visible for 2 hours, and then is no longer visible. • Pending: The VPC attachment has been accepted and is in the provisioning process. At this stage, the attachment can fail, or can go to available. VPC attachment lifecycle 52 Amazon VPC AWS Transit Gateway • Failing: A request for a VPC attachment is failing. At this stage, the VPC attachment goes to failed. • Failed: The request for the VPC attachment has failed. While in this |
vpc-tgw-020 | vpc-tgw.pdf | 20 | Rejected: A pending acceptance VPC attachment has been rejected. While in this state, the VPC attachment cannot be modified. The VPC attachment remains visible for 2 hours, and then is no longer visible. • Pending: The VPC attachment has been accepted and is in the provisioning process. At this stage, the attachment can fail, or can go to available. VPC attachment lifecycle 52 Amazon VPC AWS Transit Gateway • Failing: A request for a VPC attachment is failing. At this stage, the VPC attachment goes to failed. • Failed: The request for the VPC attachment has failed. While in this state, it cannot be deleted. The failed VPC attachment remains visible for 2 hours, and then is no longer visible. • Available: The VPC attachment is available, and traffic can flow between the VPC and the transit gateway. At this stage, the attachment can go to modifying, or go to deleting. • Deleting: A VPC attachment that is in the process of being deleted. At this stage, the attachment can go to deleted. • Deleted: An available or pending acceptance VPC attachment has been deleted. While in this state, the VPC attachment cannot be modified. The VPC attachment remains visible 2 hours, and then is no longer visible. • Modifying: A request has been made to modify the properties of the VPC attachment. At this stage, the attachment can go to available, or go to rolling back. • Rolling back: The VPC attachment modification request cannot be completed, and the system is undoing any changes that were made. At this stage, the attachment can go to available. Appliance mode If you plan to configure a stateful network appliance in your VPC, you can enable appliance mode support for the VPC attachment in which the appliance is located when you create an attachment. This ensures that AWS Transit Gateway uses the same Availability Zone for that VPC attachment for the lifetime of the flow of traffic between a source and destination. It also allows a transit gateway to send traffic to any Availability Zone in the VPC as long as there is a subnet association in that zone. While appliance mode is only supported on VPC attachments, the network flow can come from any other transit gateway attachment type, including VPC, VPN, and Connect attachments. Appliance mode also works for network flows that have sources and destinations across different AWS Regions. Network flows can potentially be rebalanced across different Availability Zones if you don't initially enable appliance mode but later edit the attachment configuration to enable it. You can enable or disable appliance mode using either the console or the command line or API. Appliance mode in AWS Transit Gateway optimizes traffic routing by considering the source and destination Availability Zones when determining the path through an appliance mode VPC. This approach enhances efficiency and reduces latency. The following are example scenarios. Appliance mode 53 Amazon VPC AWS Transit Gateway Scenario 1: Intra-Availability Zone traffic routing via an appliance VPC When traffic flows from a source Availability Zone in us-east-1a to a destination Availability Zone in us-east-1a, with appliance mode attachments in both us-east-1a and us-east-1b, AWS Transit Gateway chooses a network interface from us-east-1a within the appliance VPC. This Availability Zone is maintained for the entire duration of the traffic flow between source and destination. Scenario 2: Inter-Availability Zone traffic routing via an appliance VPC For traffic flowing from a source Availability Zone in us-east-1a to a destination Availability Zone in us-east-1b, with appliance mode VPC attachments in both us-east-1a and us-east-1b, AWS Transit Gateway uses a flow hash algorithm to select either us-east-1a or us-east-1b in the appliance VPC. The chosen Availability Zone is used consistently for the lifetime of the flow. Scenario 3: Routing traffic through an appliance VPC without Availability Zone data When traffic originates from source Availability Zone in us-east-1a to a destination without Availability Zone information — for example, internet-bound traffic — with appliance mode VPC attachments in both us-east-1a and us-east-1b, AWS Transit Gateway chooses a network interface from us-east-1a within the appliance VPC. Scenario 4: Routing traffic through an Availability Zone distinct from either the source or destination When traffic flows from a source Availability Zone in us-east-1a to a destination Availability Zone us-east-1b with appliance mode VPC attachments in different Availability Zones from either the source or destination — for example, the appliance mode VPCs are in us-east-1c and us-east-1d — AWS Transit Gateway uses a flow hash algorithm to select either us-east-1c or us-east-1d in the appliance VPC. The chosen Availability Zone is used consistently for the lifetime of the flow. Note Appliance mode is only supported for VPC attachments. Appliance mode 54 Amazon VPC AWS Transit Gateway Security group referencing You can use this feature to simplify security group management |
vpc-tgw-021 | vpc-tgw.pdf | 21 | source Availability Zone in us-east-1a to a destination Availability Zone us-east-1b with appliance mode VPC attachments in different Availability Zones from either the source or destination — for example, the appliance mode VPCs are in us-east-1c and us-east-1d — AWS Transit Gateway uses a flow hash algorithm to select either us-east-1c or us-east-1d in the appliance VPC. The chosen Availability Zone is used consistently for the lifetime of the flow. Note Appliance mode is only supported for VPC attachments. Appliance mode 54 Amazon VPC AWS Transit Gateway Security group referencing You can use this feature to simplify security group management and control of instance-to- instance traffic across VPCs that are attached to the same transit gateway. You can cross-reference security groups in inbound rules only. Outbound security rules do not support security group referencing. There are no additional costs associated with enabling or using security group referencing. Security group referencing support can be configured for both transit gateways and transit gateway VPC attachments and will only work if it has been enabled for both a transit gateway and its VPC attachments. Limitations The following limitations apply when using security group referencing with a VPC attachment. • Security group referencing is not supported across transit gateway peering connections. Both VPCs must be attached to the same transit gateway. • Security group referencing is not supported for VPC attachments in the availability zone use1- az3. • Security group referencing is not supported for PrivateLink endpoints. We recommend using IP CIDR-based security rules as an alternative. • Security group referencing works for Elastic File System (EFS) as long as an allow all egress security group rule is configured for the EFS interfaces in the VPC. • For Local Zone connectivity via a transit gateway, only the following Local Zones are supported: us-east-1-atl-2a, us-east-1-dfw-2a, us-east-1-iah-2a, us-west-2-lax-1a, us-west-2-lax-1b, us- east-1-mia-2a, us-east-1-chi-2a, and us-west-2-phx-2a. • We recommend disabling this feature at the VPC attachment level for VPCs with subnets in unsupported Local Zones, AWS Outposts, and AWS Wavelength Zones, as it might cause service disruption. • If you have an inspection VPC, then security group referencing through the transit gateway does not work across AWS Gateway Load Balancer or an AWS Network Firewall. Tasks • Create a VPC attachment using Amazon VPC Transit Gateways • Modify a VPC attachment using Amazon VPC Transit Gateways Security group referencing 55 Amazon VPC AWS Transit Gateway • Modify VPC attachment tags using Amazon VPC Transit Gateways • View a VPC attachment using Amazon VPC Transit Gateways • Delete a VPC attachment using Amazon VPC Transit Gateways • Update AWS Transit Gateway security group inbound rules • Identify AWS Transit Gateway referenced security groups • Remove stale AWS Transit Gateway security group rules • Troubleshoot Amazon VPC Transit Gateways VPC attachment creation Create a VPC attachment using Amazon VPC Transit Gateways To create a VPC attachment using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateway Attachments. 3. Choose Create transit gateway attachment. 4. 5. For Name tag, optionally enter a name for the transit gateway attachment. For Transit gateway ID, choose the transit gateway for the attachment. You can choose a transit gateway that you own or a transit gateway that was shared with you. 6. For Attachment type, choose VPC. 7. Choose whether to enable DNS Support, IPv6 Support and Appliance mode support. If appliance mode is chosen, traffic flow between a source and destination uses the same Availability Zone for the VPC attachment for the lifetime of that flow. 8. Choose whether to enable Security Group Referencing support. Enable this feature to reference a security group across VPCs attached to a transit gateway. For more information about security group referencing, see the section called “Security group referencing”. 9. Choose whether to enable IPv6 Support. 10. For VPC ID, choose the VPC to attach to the transit gateway. This VPC must have at least one subnet associated with it. 11. For Subnet IDs, select one subnet for each Availability Zone to be used by the transit gateway to route traffic. You must select at least one subnet. You can select only one subnet per Availability Zone. 12. Choose Create transit gateway attachment. Create a VPC attachment 56 Amazon VPC AWS Transit Gateway To create a VPC attachment using the AWS CLI Use the create-transit-gateway-vpc-attachment command. Modify a VPC attachment using Amazon VPC Transit Gateways To modify your VPC attachments using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateway Attachments. 3. 4. Select the VPC attachment, and then choose Actions, Modify transit gateway attachment. Enable or disable any of the following: • DNS support • IPv6 support • Appliance mode support 5. To add or remove a subnet from the |
vpc-tgw-022 | vpc-tgw.pdf | 22 | transit gateway attachment. Create a VPC attachment 56 Amazon VPC AWS Transit Gateway To create a VPC attachment using the AWS CLI Use the create-transit-gateway-vpc-attachment command. Modify a VPC attachment using Amazon VPC Transit Gateways To modify your VPC attachments using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateway Attachments. 3. 4. Select the VPC attachment, and then choose Actions, Modify transit gateway attachment. Enable or disable any of the following: • DNS support • IPv6 support • Appliance mode support 5. To add or remove a subnet from the attachment, choose or clear the checkbox by the Subnet ID you want to add or remove. Note Adding or modifying a VPC attachment subnet might impact data traffic while the attachment is in a modifying state. 6. To be able to reference a security group across VPCs attached to a transit gateway, select Security Group Referencing support. For more information about security group referencing, see the section called “Security group referencing”. Note If you disable security group referencing for an existing transit gateway, it will be disabled on all VPC attachments. 7. Choose Modify transit gateway attachment. To modify your VPC attachments using the AWS CLI Use the modify-transit-gateway-vpc-attachment command. Modify a VPC attachment 57 Amazon VPC AWS Transit Gateway Modify VPC attachment tags using Amazon VPC Transit Gateways To modify your VPC attachment tags using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateway Attachments. 3. 4. Select the VPC attachment, and then choose Actions, Manage tags. [Add a tag] Choose Add new tag and do the following: • For Key, enter the key name. • For Value, enter the key value. 5. [Remove a tag] Next to the tag, choose Remove. 6. Choose Save. VPC attachment tags can only be modified using the console. View a VPC attachment using Amazon VPC Transit Gateways To view your VPC attachments using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateway Attachments. 3. In the Resource type column, look for VPC. These are the VPC attachments. 4. Choose an attachment to view its details. To view your VPC attachments using the AWS CLI Use the describe-transit-gateway-vpc-attachments command. Delete a VPC attachment using Amazon VPC Transit Gateways To delete a VPC attachment using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateway Attachments. 3. Select the VPC attachment. Modify VPC attachment tags 58 Amazon VPC AWS Transit Gateway 4. Choose Actions, Delete transit gateway attachment. 5. When prompted, enter delete and choose Delete. To delete a VPC attachment using the AWS CLI Use the delete-transit-gateway-vpc-attachment command. Update AWS Transit Gateway security group inbound rules You can update any of the inbound security group rules associated with a transit gateway. You can update security group rules using either the Amazon VPC Console console or by using the command-line or API. For more information about security group referencing, see the section called “Security group referencing”. To update your security group rules using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. 3. 4. 5. 6. In the navigation pane, choose Security groups. Select the security group, and choose Actions, Edit inbound rules to modify the inbound rules. To add a rule, choose Add rule and specify the type, protocol, and port range. For Source (inbound rule), enter the ID of the security group in the VPC connected to the transit gateway. Note Security groups in a VPC connected to the transit gateway are not automatically displayed. To edit an existing rule, change its values (for example, the source or the description). To delete a rule, choose Delete next to the rule. 7. Choose Save rules. To update inbound rules using the command line • authorize-security-group-ingress (AWS CLI) • Grant-EC2SecurityGroupIngress (AWS Tools for Windows PowerShell) • Revoke-EC2SecurityGroupIngress (AWS Tools for Windows PowerShell) Update security group inbound rules 59 Amazon VPC AWS Transit Gateway • revoke-security-group-ingress (AWS CLI) Identify AWS Transit Gateway referenced security groups To determine if your security group is being referenced in the rules of a security group in a VPC attached to the same transit gateway, use one of the following commands. • describe-security-group-references (AWS CLI) • Get-EC2SecurityGroupReference (AWS Tools for Windows PowerShell) Remove stale AWS Transit Gateway security group rules A stale security group rule is a rule that references a deleted security group in the same VPC or in VPC attached to the same transit gateway. When a security group rule becomes stale, it's not automatically removed from your security group—you must manually remove it. You can view and delete the stale security group rules for a VPC using the Amazon |
vpc-tgw-023 | vpc-tgw.pdf | 23 | of a security group in a VPC attached to the same transit gateway, use one of the following commands. • describe-security-group-references (AWS CLI) • Get-EC2SecurityGroupReference (AWS Tools for Windows PowerShell) Remove stale AWS Transit Gateway security group rules A stale security group rule is a rule that references a deleted security group in the same VPC or in VPC attached to the same transit gateway. When a security group rule becomes stale, it's not automatically removed from your security group—you must manually remove it. You can view and delete the stale security group rules for a VPC using the Amazon VPC console. To view and delete stale security group rules 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. In the navigation pane, choose Security groups. 3. Choose Actions, Manage stale rules. 4. For VPC, choose the VPC with the stale rules. 5. Choose Edit. 6. Choose the Delete button next to the rule that you want to delete. Choose Preview changes, Save rules. To describe your stale security group rules using the command line • describe-stale-security-groups (AWS CLI) • Get-EC2StaleSecurityGroup (AWS Tools for Windows PowerShell) After you've identified the stale security group rules, you can delete them using the revoke- security-group-ingress or revoke-security-group-egress commands. Identify referenced security groups 60 Amazon VPC AWS Transit Gateway Troubleshoot Amazon VPC Transit Gateways VPC attachment creation The following topic can help you troubleshoot problems that you might have when you create a VPC attachment. Problem The VPC attachment failed. Cause The cause might be one of the following: 1. The user that is creating the VPC attachment does not have correct permissions to create service-linked role. 2. There is a throttling issue because of too many IAM requests, for example you are using AWS CloudFormation to create permissions and roles. 3. The account has the service-linked role, and the service-linked role has been modified. 4. The transit gateway is not in the available state. Solution Depending on the cause, try the following: 1. Verify that the user has the correct permissions to create service-linked roles. For more information, see Service-linked role permissions in the IAM User Guide. After the user has the permissions, create the VPC attachment. 2. Create the VPC attachment manually. For more information, see the section called “Create a VPC attachment”. 3. Verify that the service-linked role has the correct permissions. For more information, see the section called “Transit gateway”. 4. Verify that the transit gateway is in the available state. For more information, see the section called “View a transit gateway”. Troubleshoot VPC attachments 61 Amazon VPC AWS Transit Gateway AWS Site-to-Site VPN attachments in Amazon VPC Transit Gateways You can connect a Site-to-Site VPN attachment to a transit gateway in Amazon VPC Transit Gateways, allowing you to connect your VPCs and on-premises networks. Both dynamic and static routes are supported, as well as IPv4 and IPv6. Requirements • Attaching a VPN connection to your transit gateway requires that you specify the VPN customer gateway, which have specific device requirements. Before creating a Site-to-Site VPN attachment, review the customer gateway requirements to ensure that your gateway is set up correctly. For more information about these requirements, including example gateway configuration files, see Requirements for your Site-to-Site VPN customer gateway device in the AWS Site-to-Site VPN User Guide. • For static VPNs, you'll also need to first add the static routes to the transit gateway route table. Static routes in a transit gateway route table that target a VPN attachment are not filtered by the Site-to-Site VPN as this might allow unintended outbound traffic flow when using a BGP- based VPN. For the steps to add a static route to a transit gateway route table, see Create a static route. You can create, view, or delete a transit gateway Site-to-Site VPN attachment using either the Amazon VPC console or using the AWS CLI. Tasks • Create a transit gateway attachment to a VPN using Amazon VPC Transit Gateways • View a VPN attachment using Amazon VPC Transit Gateways • Delete a VPN attachment using Amazon VPC Transit Gateways Create a transit gateway attachment to a VPN using Amazon VPC Transit Gateways To create a VPN attachment using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. VPN attachments 62 Amazon VPC AWS Transit Gateway 2. On the navigation pane, choose Transit Gateway Attachments. 3. Choose Create transit gateway attachment. 4. 5. 6. For Transit gateway ID, choose the transit gateway for the attachment. You can choose a transit gateway that you own. For Attachment type, choose VPN. For Customer Gateway, do one of the following: • To use an existing customer gateway, choose Existing, and then select the gateway to use. If your customer gateway is behind a network address translation (NAT) device that's enabled for NAT traversal (NAT-T), |
vpc-tgw-024 | vpc-tgw.pdf | 24 | Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. VPN attachments 62 Amazon VPC AWS Transit Gateway 2. On the navigation pane, choose Transit Gateway Attachments. 3. Choose Create transit gateway attachment. 4. 5. 6. For Transit gateway ID, choose the transit gateway for the attachment. You can choose a transit gateway that you own. For Attachment type, choose VPN. For Customer Gateway, do one of the following: • To use an existing customer gateway, choose Existing, and then select the gateway to use. If your customer gateway is behind a network address translation (NAT) device that's enabled for NAT traversal (NAT-T), use the public IP address of your NAT device, and adjust your firewall rules to unblock UDP port 4500. • To create a customer gateway, choose New, then for IP Address, type a static public IP address and BGP ASN. For Routing options, choose whether to use Dynamic or Static. For more information, see Site-to-Site VPN Routing Options in the AWS Site-to-Site VPN User Guide. 7. For Tunnel Options, enter the CIDR ranges and pre-shared keys for your tunnel. For more information, see Site-to-Site VPN architectures. 8. Choose Create transit gateway attachment. To create a VPN attachment using the AWS CLI Use the create-vpn-connection command. View a VPN attachment using Amazon VPC Transit Gateways To view your VPN attachments using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateway Attachments. 3. In the Resource type column, look for VPN. These are the VPN attachments. 4. Choose an attachment to view its details or to add tags. To view your VPN attachments using the AWS CLI Use the describe-transit-gateway-attachments command. View a VPN attachment 63 Amazon VPC AWS Transit Gateway Delete a VPN attachment using Amazon VPC Transit Gateways To delete a VPN attachment using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateway Attachments. 3. Select the VPN attachment. 4. Choose the resource ID of the VPN connection to navigate to the VPN Connections page. 5. Choose Actions, Delete. 6. When prompted for confirmation, choose Delete. To delete a VPN attachment using the AWS CLI Use the delete-vpn-connection command. Transit gateway attachments to a Direct Connect gateway in Amazon VPC Transit Gateways Attach a transit gateway to a Direct Connect gateway using a transit virtual interface. This configuration offers the following benefits. You can: • Manage a single connection for multiple VPCs or VPNs that are in the same Region. • Advertise prefixes from on-premises to AWS and from AWS to on-premises. The following diagram illustrates how the Direct Connect gateway enables you to create a single connection to your Direct Connect connection that all of your VPCs can use. Delete a VPN attachment 64 Amazon VPC AWS Transit Gateway The solution involves the following components: • A transit gateway. • A Direct Connect gateway. • An association between the Direct Connect gateway and the transit gateway. • A transit virtual interface that is attached to the Direct Connect gateway. For information about configuring Direct Connect gateways with transit gateways, see Transit gateway associations in the AWS Direct Connect User Guide. Transit gateway peering attachments in Amazon VPC Transit Gateways You can peer both intra-Region and inter-Region transit gateways, and route traffic between them, which includes IPv4 and IPv6 traffic. To do this, create a peering attachment on your transit gateway, and specify a transit gateway. The peer transit gateway can either be in your account or can be from another account. You can also request a peering attachment from your own account to a transit gateway in another account. After you create a peering attachment request, the owner of the peer transit gateway (also referred to as the accepter transit gateway) must accept the request. To route traffic between the transit gateways, add a static route to the transit gateway route table that points to the transit gateway peering attachment. Peering attachments 65 Amazon VPC AWS Transit Gateway We recommend using unique ASNs for each peered transit gateway to take advantage of future route propagation capabilities. Transit gateway peering does not support resolving public or private IPv4 DNS host names to private IPv4 addresses across VPCs on either side of the transit gateway peering attachment using the Amazon Route 53 Resolver in another Region. For more information about the Route 53 Resolver, see What is Route 53 Resolver? in the Amazon Route 53 Developer Guide. Inter-Region gateway peering uses the same network infrastructure as VPC peering. Therefore traffic is encrypted using AES-256 encryption at the virtual network layer as it travels between Regions. Traffic is also encrypted using AES-256 encryption at the physical layer when it traverses network links that are outside of the physical control of AWS. As a result, |
vpc-tgw-025 | vpc-tgw.pdf | 25 | private IPv4 addresses across VPCs on either side of the transit gateway peering attachment using the Amazon Route 53 Resolver in another Region. For more information about the Route 53 Resolver, see What is Route 53 Resolver? in the Amazon Route 53 Developer Guide. Inter-Region gateway peering uses the same network infrastructure as VPC peering. Therefore traffic is encrypted using AES-256 encryption at the virtual network layer as it travels between Regions. Traffic is also encrypted using AES-256 encryption at the physical layer when it traverses network links that are outside of the physical control of AWS. As a result, traffic is double encrypted on network links outside the physical control of AWS. Within the same Region, traffic is encrypted at the physical layer only when it traverses network links that are outside of the physical control of AWS. For information about which Regions support transit gateway peering attachments, see AWS Transit Gateways FAQs. Opt-in AWS Region considerations You can peer transit gateways across opt-in Region boundaries. For information about these Regions, and how to opt in, see Managing AWS Regions. Take the following into consideration when you use transit gateway peering in these Regions: • You can peer into an opt-in Region as long as the account that accepts the peering attachment has opted into that Region. • Regardless of the Region opt-in status, AWS shares the following account data with the account that accepts the peering attachment: • AWS account ID • Transit gateway ID • Region code • When you delete the transit gateway attachment, the above account data is deleted. • We recommend that you delete the transit gateway peering attachment before you opt out of the Region. If you do not delete the peering attachment, traffic might continue to go over the attachment and you continue to incur charges. If you do not delete the attachment, you can opt back in, and then delete the attachment. Opt-in AWS Region considerations 66 Amazon VPC AWS Transit Gateway • In general, the transit gateway has a sender pays model. By using a transit gateway peering attachment across an opt in boundary, you might incur charges in a Region accepting the attachment, including those Regions you have not opted into. For more information, see AWS Transit Gateway Pricing. Tasks • Create a peering attachment using Amazon VPC Transit Gateways • Accept or reject a peering attachment request using Amazon VPC Transit Gateways • Add a route to a transit gateway route table using Amazon VPC Transit Gateways • Delete a peering attachment using Amazon VPC Transit Gateways Create a peering attachment using Amazon VPC Transit Gateways Before you begin, ensure that you have the ID of the transit gateway that you want to attach. If the transit gateway is in another AWS account, ensure that you have the AWS account ID of the owner of the transit gateway. After you create the peering attachment, the owner of the accepter transit gateway must accept the attachment request. To create a peering attachment using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateway Attachments. 3. Choose Create transit gateway attachment. 4. For Transit gateway ID, choose the transit gateway for the attachment. You can choose a transit gateway that you own. Transit gateways that are shared with you are not available for peering. 5. For Attachment type, choose Peering Connection. 6. Optionally enter a name tag for the attachment. 7. For Account, do one of the following: • If the transit gateway is in your account, choose My account. • If the transit gateway is in different AWS account, choose Other account. For Account ID, enter the AWS account ID. Create a peering attachment 67 Amazon VPC AWS Transit Gateway 8. 9. For Region, choose the Region that the transit gateway is located in. For Transit gateway (accepter), enter the ID of the transit gateway that you want to attach. 10. Choose Create transit gateway attachment. To create a peering attachment using the AWS CLI Use the create-transit-gateway-peering-attachment command. Accept or reject a peering attachment request using Amazon VPC Transit Gateways To activate the peering attachment, the owner of the accepter transit gateway must accept the peering attachment request. This is required even if both transit gateways are in the same account. The peering attachment must be in the pendingAcceptance state. Accept the peering attachment request from the Region that the accepter transit gateway is located in. Alternatively, you can reject any peering connection request that you've received that's in the pendingAcceptance state. You must reject the request from the Region that the accepter transit gateway is located in. To accept a peering attachment request using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, |
vpc-tgw-026 | vpc-tgw.pdf | 26 | transit gateway must accept the peering attachment request. This is required even if both transit gateways are in the same account. The peering attachment must be in the pendingAcceptance state. Accept the peering attachment request from the Region that the accepter transit gateway is located in. Alternatively, you can reject any peering connection request that you've received that's in the pendingAcceptance state. You must reject the request from the Region that the accepter transit gateway is located in. To accept a peering attachment request using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateway Attachments. 3. Select the transit gateway peering attachment that's pending acceptance. 4. Choose Actions, Accept transit gateway attachment. 5. Add the static route to the transit gateway route table. For more information, see the section called “Create a static route”. To reject a peering attachment request using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateway Attachments. 3. Select the transit gateway peering attachment that's pending acceptance. 4. Choose Actions, Reject transit gateway attachment. Accept or reject a peering request 68 Amazon VPC AWS Transit Gateway To accept or reject a peering attachment using the AWS CLI Use the accept-transit-gateway-peering-attachment and reject-transit-gateway-peering- attachment commands. Add a route to a transit gateway route table using Amazon VPC Transit Gateways To route traffic between the peered transit gateways, you must add a static route to the transit gateway route table that points to the transit gateway peering attachment. The owner of the accepter transit gateway must also add a static route to their transit gateway's route table. To create a static route using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateway Route Tables. 3. Select the route table for which to create a route. 4. Choose Actions, Create static route. 5. On the Create static route page, enter the CIDR block for which to create the route. For example, specify the CIDR block of a VPC that's attached to the peer transit gateway. 6. Choose the peering attachment for the route. 7. Choose Create static route. To create a static route using the AWS CLI Use the create-transit-gateway-route command. Important After you create the route, associate the transit gateway route table with the transit gateway peering attachment. For more information, see the section called “Associate a transit gateway route table”. Delete a peering attachment using Amazon VPC Transit Gateways You can delete a transit gateway peering attachment. The owner of either of the transit gateways can delete the attachment. Add a route to a transit gateway route table 69 Amazon VPC AWS Transit Gateway To delete a peering attachment using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateway Attachments. 3. Select the transit gateway peering attachment. 4. Choose Actions, Delete transit gateway attachment. 5. Enter delete and choose Delete. To delete a peering attachment using the AWS CLI Use the delete-transit-gateway-peering-attachment command. Transit Gateway Connect attachments and Transit Gateway Connect peers in Amazon VPC Transit Gateways You can create a Transit Gateway Connect attachment to establish a connection between a transit gateway and third-party virtual appliances (such as SD-WAN appliances) running in a VPC. A Connect attachment supports the Generic Routing Encapsulation (GRE) tunnel protocol for high performance, and Border Gateway Protocol (BGP) for dynamic routing. After you create a Connect attachment, you can create one or more GRE tunnels (also referred to as Transit Gateway Connect peers) on the Connect attachment to connect the transit gateway and the third-party appliance. You establish two BGP sessions over the GRE tunnel to exchange routing information. Important A Transit Gateway Connect peer consists of two BGP peering sessions terminating on AWS- managed infrastructure. The two BGP peering sessions provide routing plane redundancy, ensuring that losing one BGP peering session does not impact your routing operation. The routing information received from both BGP sessions is accumulated for the given Connect peer. The two BGP peering sessions also protect against any AWS infrastructure operations such as routine maintenance, patching, hardware upgrades, and replacements. If your Connect peer is operating without the recommended dual BGP peering session configured for redundancy, it might experience a momentary loss of connectivity during AWS infrastructure operations. We strongly recommend that you configure both the BGP peering sessions on your Connect peer. If you have configured multiple Connect peers to Connect attachments and Connect peers 70 Amazon VPC AWS Transit Gateway support high availability on the appliance side, we recommend that you configure both the BGP peering sessions on each of your Connect peers. A Connect attachment uses an existing VPC or Direct Connect attachment as the underlying transport mechanism. |
vpc-tgw-027 | vpc-tgw.pdf | 27 | your Connect peer is operating without the recommended dual BGP peering session configured for redundancy, it might experience a momentary loss of connectivity during AWS infrastructure operations. We strongly recommend that you configure both the BGP peering sessions on your Connect peer. If you have configured multiple Connect peers to Connect attachments and Connect peers 70 Amazon VPC AWS Transit Gateway support high availability on the appliance side, we recommend that you configure both the BGP peering sessions on each of your Connect peers. A Connect attachment uses an existing VPC or Direct Connect attachment as the underlying transport mechanism. This is referred to as the transport attachment. The transit gateway identifies matched GRE packets from the third-party appliance as traffic from the Connect attachment. It treats any other packets, including GRE packets with incorrect source or destination information, as traffic from the transport attachment. Note To use a Direct Connect attachment as a transport mechanism, you'll first need to integrate Direct Connect with AWS Transit Gateway. For the steps to create this integration, see Integrate SD-WAN devices with AWS Transit Gateway and AWS Direct Connect. Connect peers A Connect peer (GRE tunnel) consists of the following components. Inside CIDR blocks (BGP addresses) The inside IP addresses that are used for BGP peering. You must specify a /29 CIDR block from the 169.254.0.0/16 range for IPv4. You can optionally specify a /125 CIDR block from the fd00::/8 range for IPv6. The following CIDR blocks are reserved and cannot be used: • 169.254.0.0/29 • 169.254.1.0/29 • 169.254.2.0/29 • 169.254.3.0/29 • 169.254.4.0/29 • 169.254.5.0/29 • 169.254.169.248/29 You must configure the first address from the IPv4 range on the appliance as the BGP IP address. When you use IPv6, if your inside CIDR block is fd00::/125, then you must configure the first address in this range (fd00::1) on the tunnel interface of the appliance. Connect peers 71 Amazon VPC AWS Transit Gateway The BGP addresses must be unique across all tunnels on a transit gateway. Peer IP address The peer IP address (GRE outer IP address) on the appliance side of the Connect peer. This can be any IP address. The IP address can be an IPv4 or IPv6 address, but it must be the same IP address family as the transit gateway address. Transit gateway address The peer IP address (GRE outer IP address) on the transit gateway side of the Connect peer. The IP address must be specified from the transit gateway CIDR block, and must be unique across Connect attachments on the transit gateway. If you don't specify an IP address, we use the first available address from the transit gateway CIDR block. You can add a transit gateway CIDR block when you create or modify a transit gateway. The IP address can be an IPv4 or IPv6 address, but it must be the same IP address family as the peer IP address. The peer IP address and transit gateway address are used to uniquely identify the GRE tunnel. You can reuse either address across multiple tunnels, but not both in the same tunnel. Transit Gateway Connect for the BGP peering only supports Multiprotocol BGP (MP-BGP), where IPv4 Unicast addressing is required to also establish a BGP session for IPv6 Unicast. You can use both IPv4 and IPv6 addresses for the GRE outer IP addresses. The following example shows a Connect attachment between a transit gateway and an appliance in a VPC. Connect peers 72 Amazon VPC AWS Transit Gateway Diagram component Description VPC attachment Connect attachment GRE tunnel (Connect peer) BGP peering session In the preceding example, a Connect attachment is created on an existing VPC attachment (the transport attachment). A Connect peer is created on the Connect attachment to establish a connection to an appliance in the VPC. The transit gateway address is 192.0.2.1, and the range of BGP addresses is 169.254.6.0/29. The first IP address in the range (169.254.6.1) is configured on the appliance as the peer BGP IP address. The subnet route table for VPC C has a route that points traffic destined for the transit gateway CIDR block to the transit gateway. Destination 172.31.0.0/16 192.0.2.0/24 Target Local tgw-id Requirements and considerations The following are the requirements and considerations for a Connect attachment. • For information about what Regions support Connect attachments, see the AWS Transit Gateways FAQ. • The third-party appliance must be configured to send and receive traffic over a GRE tunnel to and from the transit gateway using the Connect attachment. • The third-party appliance must be configured to use BGP for dynamic route updates and health checks. Requirements and considerations 73 Amazon VPC AWS Transit Gateway • The following types of BGP are supported: • Exterior BGP (eBGP): Used for connecting to routers that are in a different autonomous system than the |
vpc-tgw-028 | vpc-tgw.pdf | 28 | requirements and considerations for a Connect attachment. • For information about what Regions support Connect attachments, see the AWS Transit Gateways FAQ. • The third-party appliance must be configured to send and receive traffic over a GRE tunnel to and from the transit gateway using the Connect attachment. • The third-party appliance must be configured to use BGP for dynamic route updates and health checks. Requirements and considerations 73 Amazon VPC AWS Transit Gateway • The following types of BGP are supported: • Exterior BGP (eBGP): Used for connecting to routers that are in a different autonomous system than the transit gateway. If you use eBGP, you must configure ebgp-multihop with a time-to- live (TTL) value of 2. • Interior BGP (iBGP): Used for connecting to routers that are in the same autonomous system as the transit gateway. The transit gateway will not install routes from an iBGP peer (third-party appliance), unless the routes are originated from an eBGP peer and should have next-hop-self configured. The routes advertised by third-party appliance over the iBGP peering must have an ASN. • MP-BGP (multiprotocol extensions for BGP): Used for supporting multiple protocol types, such as IPv4 and IPv6 address families. • The default BGP keep-alive timeout is 10 seconds and the default hold timer is 30 seconds. • IPv6 BGP peering is not supported; only IPv4-based BGP peering is supported. IPv6 prefixes are exchanged over IPv4 BGP peering using MP-BGP. • Bidirectional Forwarding Detection (BFD) is not supported. • BGP graceful restart is not supported. • When you create a transit gateway peer, if you do not specify a peer ASN number, we pick the transit gateway ASN number. This means that your appliance and transit gateway will be in the same autonomous system doing iBGP. • A Connect peer using the BGP AS-PATH attribute is the preferred route when you have two Connect peers. To use equal-cost multi-path (ECMP) routing between multiple appliances, you must configure the appliance to advertise the same prefixes to the transit gateway with the same BGP AS-PATH attribute. For the transit gateway to choose all of the available ECMP paths, the AS-PATH and Autonomous System Number (ASN) must match. The transit gateway can use ECMP between Connect peers for the same Connect attachment or between Connect attachments on the same transit gateway. The transit gateway cannot use ECMP between both of the redundant BGP peerings a single peer establishes to it. • With a Connect attachment, the routes are propagated to a transit gateway route table by default. • Static routes are not supported. • Ensure that your third-party appliance external interface (tunnel source) Maximum Transmission Unit (MTU) either Requirements and considerations 74 Amazon VPC AWS Transit Gateway • matches the MTU of the GRE tunnel interface, or • should be greater than that of the GRE tunnel interface. Tasks • Create a Connect attachment using Amazon VPC Transit Gateways • Create a Connect peer using Amazon VPC Transit Gateways • View Connect attachments and Connect peers using Amazon VPC Transit Gateways • Modify Connect attachment and Connect peer tags using Amazon VPC Transit Gateways • Delete a Connect peer using Amazon VPC Transit Gateways • Delete a Connect attachment using Amazon VPC Transit Gateways Create a Connect attachment using Amazon VPC Transit Gateways To create a Connect attachment, you must specify an existing attachment as the transport attachment. You can specify a VPC attachment or a Direct Connect attachment as the transport attachment. To create a Connect attachment using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. In the navigation pane, choose Transit gateway attachments. 3. Choose Create transit gateway attachment. 4. 5. 6. 7. (Optional) For Name tag, specify a name tag for the attachment. For Transit gateway ID, choose the transit gateway for the attachment. For Attachment type, choose Connect. For Transport attachment ID, choose the ID of an existing attachment (the transport attachment). 8. Choose Create transit gateway attachment. To create a Connect attachment using the AWS CLI Use the create-transit-gateway-connect command. Create a Connect attachment 75 Amazon VPC AWS Transit Gateway Create a Connect peer using Amazon VPC Transit Gateways You can create a Connect peer (GRE tunnel) for an existing Connect attachment. Before you begin, ensure that you have configured a transit gateway CIDR block. You can configure a transit gateway CIDR block when you create or modify a transit gateway. When you create the Connect peer, you must specify the GRE outer IP address on the appliance side of the Connect peer. To create a Connect peer using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. 3. 4. 5. 6. In the navigation pane, choose Transit gateway attachments. Select the Connect attachment, and choose Actions, Create connect peer. (Optional) For Name tag, specify |
vpc-tgw-029 | vpc-tgw.pdf | 29 | for an existing Connect attachment. Before you begin, ensure that you have configured a transit gateway CIDR block. You can configure a transit gateway CIDR block when you create or modify a transit gateway. When you create the Connect peer, you must specify the GRE outer IP address on the appliance side of the Connect peer. To create a Connect peer using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. 3. 4. 5. 6. In the navigation pane, choose Transit gateway attachments. Select the Connect attachment, and choose Actions, Create connect peer. (Optional) For Name tag, specify a name tag for the Connect peer. (Optional) For Transit gateway GRE Address, specify the GRE outer IP address for the transit gateway. By default, the first available address from the transit gateway CIDR block is used. For Peer GRE address, specify the GRE outer IP address for the appliance side of the Connect peer. 7. For BGP Inside CIDR blocks IPv4, specify the range of inside IPv4 addresses that are used for BGP peering. Specify a /29 CIDR block from the 169.254.0.0/16 range. 8. (Optional) For BGP Inside CIDR blocks IPv6, specify the range of inside IPv6 addresses that are used for BGP peering. Specify a /125 CIDR block from the fd00::/8 range. 9. (Optional) For Peer ASN, specify the Border Gateway Protocol (BGP) Autonomous System Number (ASN) for the appliance. You can use an existing ASN assigned to your network. If you do not have one, you can use a private ASN in the 64512–65534 (16-bit ASN) or 4200000000– 4294967294 (32-bit ASN) range. The default is the same ASN as the transit gateway. If you configure the Peer ASN to be different than the transit gateway ASN (eBGP), you must configure ebgp-multihop with a time- to-live (TTL) value of 2. 10. Choose Create connect peer. To create a Connect peer using the AWS CLI Use the create-transit-gateway-connect-peer command. Create a Connect peer 76 Amazon VPC AWS Transit Gateway View Connect attachments and Connect peers using Amazon VPC Transit Gateways View your Connect attachments and Connect peers. To view your Connect attachments and Connect peers using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. 3. 4. In the navigation pane, choose Transit gateway attachments. Select the Connect attachment. To view the Connect peers for the attachment, choose the Connect Peers tab. To view your Connect attachments and Connect peers using the AWS CLI Use the describe-transit-gateway-connects and describe-transit-gateway-connect-peers commands. Modify Connect attachment and Connect peer tags using Amazon VPC Transit Gateways You can modify the tags for your Connect attachment. To modify your Connect attachment tags using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. 3. 4. 5. In the navigation pane, choose Transit Gateway Attachments. Select the Connect attachment, and then choose Actions, Manage tags. To add a tag, choose Add new tag and specify the key name and key value. To remove a tag, choose Remove. 6. Choose Save. You can modify the tags for your Connect peer. To modify your Connect peer tags using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. View Connect attachments and Connect peers 77 Amazon VPC AWS Transit Gateway 2. 3. 4. 5. 6. In the navigation pane, choose Transit Gateway Attachments. Select the Connect attachment, and then choose Connect peers. Select the Connect peer and then choose Actions, Manage tags. To add a tag, choose Add new tag and specify the key name and key value. To remove a tag, choose Remove. 7. Choose Save. To modify your Connect attachment and Connect peer tags using the AWS CLI Use the create-tags and delete-tags commands. Delete a Connect peer using Amazon VPC Transit Gateways If you no longer need a Connect peer, you can delete it. To delete a Connect peer using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. 3. 4. In the navigation pane, choose Transit gateway attachments. Select the Connect attachment. In the Connect Peers tab, select the Connect peer and choose Actions, Delete connect peer. To delete a Connect peer using the AWS CLI Use the delete-transit-gateway-connect-peer command. Delete a Connect attachment using Amazon VPC Transit Gateways If you no longer need a Connect attachment, you can delete it. You must first delete any Connect peers for the attachment. To delete a Connect attachment using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. 3. In the navigation pane, choose Transit gateway attachments. Select the Connect attachment, and choose Actions, Delete transit gateway attachment. Delete a Connect peer 78 Amazon VPC AWS Transit Gateway 4. Enter delete and choose Delete. To delete a Connect attachment using the AWS CLI Use the delete-transit-gateway-connect command. Transit gateway route tables in Amazon VPC Transit Gateways Use transit |
vpc-tgw-030 | vpc-tgw.pdf | 30 | Gateways If you no longer need a Connect attachment, you can delete it. You must first delete any Connect peers for the attachment. To delete a Connect attachment using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. 3. In the navigation pane, choose Transit gateway attachments. Select the Connect attachment, and choose Actions, Delete transit gateway attachment. Delete a Connect peer 78 Amazon VPC AWS Transit Gateway 4. Enter delete and choose Delete. To delete a Connect attachment using the AWS CLI Use the delete-transit-gateway-connect command. Transit gateway route tables in Amazon VPC Transit Gateways Use transit gateway route tables to configure routing for your transit gateway attachments. A route table is a table that contains rules that direct how your network traffic is routed between your VPCs and VPNs. Each route in the table contains the range of IP addresses for the destinations that you want to send traffic to. Transit gateway route tables allows you to associate a table with a transit gateway attachment. VPC, VPN, Direct Connect gateway, Peering, and Connect attachments are all supported. When associated, routes for these attachments are propagated from the attachment to the target transit gateway route table. An attachment can be propagated to multiple route tables. Additionally you can create and manage static routes with a route table. For example, you might have a static route that's used as a backup route in the event of a network disruption that affects any dynamic routes. Tasks • Create a transit gateway route table using Amazon VPC Transit Gateways • View transit gateway route tables using Amazon VPC Transit Gateways • Associate a transit gateway route table using Amazon VPC Transit Gateways • Delete an association for a transit gateway route table using Amazon VPC Transit Gateways • Enable route propagation to a transit gateway route table using Amazon VPC Transit Gateways • Disable route propagation using Amazon VPC Transit Gateways • Create a static route using Amazon VPC Transit Gateways • Delete a static route using Amazon VPC Transit Gateways • Replace a static route using Amazon VPC Transit Gateways • Export route tables to Amazon S3 using Amazon VPC Transit Gateways • Delete a transit gateway route table using Amazon VPC Transit Gateways Transit gateway route tables 79 Amazon VPC AWS Transit Gateway • Create a route table prefix list reference using Amazon VPC Transit Gateways • Modify a prefix list reference using Amazon VPC Transit Gateways • Delete a prefix list reference using Amazon VPC Transit Gateways Create a transit gateway route table using Amazon VPC Transit Gateways To create a transit gateway route table using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateway Route Tables. 3. Choose Create transit gateway route table. 4. (Optional) For Name tag, type a name for the transit gateway route table. This creates a tag with the tag key "Name", where the tag value is the name that you specify. 5. For Transit gateway ID, select the transit gateway for the route table. 6. Choose Create transit gateway route table. To create a transit gateway route table using the AWS CLI Use the create-transit-gateway-route-table command. View transit gateway route tables using Amazon VPC Transit Gateways To view your transit gateway route tables using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateway Route Tables. 3. (Optional) To find a specific route table or set of tables, enter all or part of the name, keyword, or attribute in the filter field. 4. Select the checkbox for a route table, or choose its ID, to display information about its associations, propagations, routes, and tags. To view your transit gateway route tables using the AWS CLI Use the describe-transit-gateway-route-tables command. Create a transit gateway route table 80 Amazon VPC AWS Transit Gateway To view the routes for a transit gateway route table using the AWS CLI Use the search-transit-gateway-routes command. To view the route propagations for a transit gateway route table using the AWS CLI Use the get-transit-gateway-route-table-propagations command. To view the associations for a transit gateway route table using the AWS CLI Use the get-transit-gateway-route-table-associations command. Associate a transit gateway route table using Amazon VPC Transit Gateways You can associate a transit gateway route table with a transit gateway attachment. To associate a transit gateway route table using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateway Route Tables. 3. 4. Select the route table. In the lower part of the page, choose the Associations tab. 5. Choose Create association. 6. Choose the attachment to associate and then choose Create association. To associate a transit gateway route table using the AWS CLI Use the associate-transit-gateway-route-table |
vpc-tgw-031 | vpc-tgw.pdf | 31 | get-transit-gateway-route-table-associations command. Associate a transit gateway route table using Amazon VPC Transit Gateways You can associate a transit gateway route table with a transit gateway attachment. To associate a transit gateway route table using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateway Route Tables. 3. 4. Select the route table. In the lower part of the page, choose the Associations tab. 5. Choose Create association. 6. Choose the attachment to associate and then choose Create association. To associate a transit gateway route table using the AWS CLI Use the associate-transit-gateway-route-table command. Delete an association for a transit gateway route table using Amazon VPC Transit Gateways You can disassociate a transit gateway route table from a transit gateway attachment. To disassociate a transit gateway route table using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. Associate a transit gateway route table 81 Amazon VPC AWS Transit Gateway 2. On the navigation pane, choose Transit Gateway Route Tables. 3. 4. Select the route table. In the lower part of the page, choose the Associations tab. 5. Choose the attachment to disassociate and then choose Delete association. 6. When prompted for confirmation, choose Delete association. To disassociate a transit gateway route table using the AWS CLI Use the disassociate-transit-gateway-route-table command. Enable route propagation to a transit gateway route table using Amazon VPC Transit Gateways Use route propagation to add a route from an attachment to a route table. To propagate a route to a transit gateway attachment route table 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateway Route Tables. 3. Select the route table for which to create a propagation. 4. Choose Actions, Create propagation. 5. On the Create propagation page, choose the attachment. 6. Choose Create propagation. To enable route propagation using the AWS CLI Use the enable-transit-gateway-route-table-propagation command. Disable route propagation using Amazon VPC Transit Gateways Remove a propagated route from a route table attachment. To disable route propagation using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateway Route Tables. Enable route propagation 82 Amazon VPC AWS Transit Gateway 3. Select the route table to delete the propagation from. 4. On the lower part of the page, choose the Propagations tab. 5. Select the attachment and then choose Delete propagation. 6. When prompted for confirmation, choose Delete propagation. To disable route propagation using the AWS CLI Use the disable-transit-gateway-route-table-propagation command. Create a static route using Amazon VPC Transit Gateways Create a static route for a VPC, VPN, or transit gateway peering attachment, or you can create a blackhole route that drops traffic that matches the route. Static routes in a transit gateway route table that target a VPN attachment are not filtered by the Site-to-Site VPN. This might allow unintended outbound traffic flow when using a BGP-based VPN. To create a static route using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateway Route Tables. 3. Select the route table for which to create a route. 4. Choose Actions, Create static route. 5. On the Create static route page, enter the CIDR block for which to create the route, and then choose Active. 6. Choose the attachment for the route. 7. Choose Create static route. To create a blackhole route using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateway Route Tables. 3. Select the route table for which to create a route. 4. Choose Actions, Create static route. Create a static route 83 Amazon VPC AWS Transit Gateway 5. On the Create static route page, enter the CIDR block for which to create the route, and then choose Blackhole. 6. Choose Create static route. To create a static route or blackhole route using the AWS CLI Use the create-transit-gateway-route command. Delete a static route using Amazon VPC Transit Gateways Delete static routes from a transit gateway route table. To delete a static route using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateway Route Tables. 3. Select the route table for which to delete the route, and choose Routes. 4. Choose the route to delete. 5. Choose Delete static route. 6. In the confirmation box, choose Delete static route. To delete a static route using the AWS CLI Use the delete-transit-gateway-route command. Replace a static route using Amazon VPC Transit Gateways Replace a static route in a transit gateway route table with a different static route. To replace a static route using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateway Route Tables. 3. |
vpc-tgw-032 | vpc-tgw.pdf | 32 | Route Tables. 3. Select the route table for which to delete the route, and choose Routes. 4. Choose the route to delete. 5. Choose Delete static route. 6. In the confirmation box, choose Delete static route. To delete a static route using the AWS CLI Use the delete-transit-gateway-route command. Replace a static route using Amazon VPC Transit Gateways Replace a static route in a transit gateway route table with a different static route. To replace a static route using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateway Route Tables. 3. Choose the route that you want to replace in the route table. 4. In the details section, choose the Routes tab. 5. Choose Actions, Replace static route. Delete a static route 84 Amazon VPC AWS Transit Gateway 6. 7. For the Type, choose either Active or Blackhole. From the Choose attachment drop-down, choose the transit gateway that will replace the current one in the route table. 8. Choose Replace static route. To replace a static route using the AWS CLI Use the replace-transit-gateway-route command. Export route tables to Amazon S3 using Amazon VPC Transit Gateways You can export the routes in your transit gateway route tables to an Amazon S3 bucket. The routes are saved to the specified Amazon S3 bucket in a JSON file. To export transit gateway route tables using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateway Route Tables. 3. Choose the route table that includes the routes to export. 4. Choose Actions, Export routes. 5. On the Export routes page, for S3 bucket name, type the name of the S3 bucket. 6. To filter the routes exported, specify filter parameters in the Filters section of the page. 7. Choose Export routes. To access the exported routes, open the Amazon S3 console at https://console.aws.amazon.com/ s3/, and navigate to the bucket that you specified. The file name includes the AWS account ID, AWS Region, route table ID, and a timestamp. Select the file and choose Download. The following is an example of a JSON file that contains information about two propagated routes for VPC attachments. { "filter": [ { "name": "route-search.subnet-of-match", "values": [ "0.0.0.0/0", Export route tables to Amazon S3 85 AWS Transit Gateway Amazon VPC "::/0" ] } ], "routes": [ { "destinationCidrBlock": "10.0.0.0/16", "transitGatewayAttachments": [ { "resourceId": "vpc-0123456abcd123456", "transitGatewayAttachmentId": "tgw-attach-1122334455aabbcc1", "resourceType": "vpc" } ], "type": "propagated", "state": "active" }, { "destinationCidrBlock": "10.2.0.0/16", "transitGatewayAttachments": [ { "resourceId": "vpc-abcabc123123abca", "transitGatewayAttachmentId": "tgw-attach-6677889900aabbcc7", "resourceType": "vpc" } ], "type": "propagated", "state": "active" } ] } Delete a transit gateway route table using Amazon VPC Transit Gateways To delete a transit gateway route table using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateway Route Tables. 3. Select the route table to delete. 4. Choose Actions, Delete transit gateway route table. Delete a transit gateway route table 86 Amazon VPC AWS Transit Gateway 5. Enter delete and choose Delete to confirm the deletion. To delete a transit gateway route table using the AWS CLI Use the delete-transit-gateway-route-table command. Create a route table prefix list reference using Amazon VPC Transit Gateways You can reference a prefix list in your transit gateway route table. A prefix list is a set of one or more CIDR block entries that you define and manage. You can use a prefix list to simplify the management of the IP addresses that you reference in your resources to route network traffic. For example, if you frequently specify the same destination CIDRs across multiple transit gateway route tables, you can manage those CIDRs in a single prefix list, instead of repeatedly referencing the same CIDRs in each route table. If you need to remove a destination CIDR block, you can remove its entry from the prefix list instead of removing the route from every affected route table. When you create a prefix list reference in your transit gateway route table, each entry in the prefix list is represented as a route in your transit gateway route table. For more information about prefix lists, see Prefix lists in the Amazon VPC User Guide. To create a prefix list reference using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. 3. In the navigation pane, choose Transit Gateway Route Tables. Select the transit gateway route table. 4. Choose Actions, Create prefix list reference. 5. 6. 7. For Prefix list ID, choose the ID of the prefix list. For Type, choose if traffic to this prefix list should be allowed (Active) or dropped (Blackhole). For Transit gateway attachment ID, choose the ID of the attachment to which to route traffic. 8. Choose Create prefix list reference. To create a prefix list reference |
vpc-tgw-033 | vpc-tgw.pdf | 33 | Guide. To create a prefix list reference using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. 3. In the navigation pane, choose Transit Gateway Route Tables. Select the transit gateway route table. 4. Choose Actions, Create prefix list reference. 5. 6. 7. For Prefix list ID, choose the ID of the prefix list. For Type, choose if traffic to this prefix list should be allowed (Active) or dropped (Blackhole). For Transit gateway attachment ID, choose the ID of the attachment to which to route traffic. 8. Choose Create prefix list reference. To create a prefix list reference using the AWS CLI Use the create-transit-gateway-prefix-list-reference command. Create a prefix list reference 87 Amazon VPC AWS Transit Gateway Modify a prefix list reference using Amazon VPC Transit Gateways You can modify a prefix list reference by changing the attachment that the traffic is routed to, or indicating whether to drop traffic that matches the route. You cannot modify the individual routes for a prefix list in the Routes tab. To modify the entries in the prefix list, use the Managed Prefix Lists screen. For more information, see Modifying a prefix list in the Amazon VPC User Guide. To modify a prefix list reference using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. 3. 4. In the navigation pane, choose Transit Gateway Route Tables. Select the transit gateway route table. In the lower pane, choose Prefix list references. 5. Choose the prefix list reference, and choose Modify references. 6. 7. For Type, choose if traffic to this prefix list should be allowed (Active) or dropped (Blackhole). For Transit gateway attachment ID, choose the ID of the attachment to which to route traffic. 8. Choose Modify prefix list reference. To modify a prefix list reference using the AWS CLI Use the modify-transit-gateway-prefix-list-reference command. Delete a prefix list reference using Amazon VPC Transit Gateways If you no longer need a prefix list reference, you can delete it from your transit gateway route table. Deleting the reference does not delete the prefix list. To delete a prefix list reference using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. 3. In the navigation pane, choose Transit Gateway Route Tables. Select the transit gateway route table. 4. Choose the prefix list reference, and choose Delete references. 5. Choose Delete references. Modify a prefix list reference 88 Amazon VPC AWS Transit Gateway To modify a prefix list reference using the AWS CLI Use the delete-transit-gateway-prefix-list-reference command. Transit gateway policy tables in Amazon VPC Transit Gateways Transit gateway dynamic routing uses policy tables to route network traffic for AWS Cloud WAN. The table contains policy rules for matching network traffic by policy attributes, and then maps the traffic that matches the rule to a target route table. You can use dynamic routing for transit gateways to automatically exchange routing and reachability information with peered transit gateway types. Unlike with a static route, traffic can be routed along a different path based on network conditions, such as path failures or congestion. Dynamic routing also adds an extra layer of security in that it's easier to re-route traffic in the event of a network breach or incursion. Note Transit gateway policy tables are currently only supported in Cloud WAN when creating a transit gateway peering connection. When creating a peering connection, you can associate that table with the connection. The association then populates the table automatically with the policy rules. For more information about peering connections in Cloud WAN, see Peerings in the AWS Cloud WAN User Guide. Tasks • Create a transit gateway policy table using Amazon VPC Transit Gateways • Delete a transit gateway policy table using Amazon VPC Transit Gateways Create a transit gateway policy table using Amazon VPC Transit Gateways To create a transit gateway policy table using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit gateway policy table. Transit gateway policy tables 89 Amazon VPC AWS Transit Gateway 3. Choose Create transit gateway policy table. 4. (Optional) For Name tag, enter a name for the transit gateway policy table. This creates a tag, where the tag value is the name that you specify. 5. For Transit gateway ID, select the transit gateway for the policy table. 6. Choose Create transit gateway policy table. To create a transit gateway policy table using the AWS CLI Use the create-transit-gateway-policy-table command. Delete a transit gateway policy table using Amazon VPC Transit Gateways Delete a transit gateway policy table. When a table is deleted, all policy rules within that table are deleted. To delete a transit gateway policy table using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit gateway policy tables. 3. Choose the |
vpc-tgw-034 | vpc-tgw.pdf | 34 | name that you specify. 5. For Transit gateway ID, select the transit gateway for the policy table. 6. Choose Create transit gateway policy table. To create a transit gateway policy table using the AWS CLI Use the create-transit-gateway-policy-table command. Delete a transit gateway policy table using Amazon VPC Transit Gateways Delete a transit gateway policy table. When a table is deleted, all policy rules within that table are deleted. To delete a transit gateway policy table using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit gateway policy tables. 3. Choose the transit gateway policy table to delete. 4. Choose Actions, and then choose Delete policy table. 5. Confirm that you want to delete the table. To delete a transit gateway policy table using the AWS CLI Use the delete-transit-gateway-policy-table command. Multicast in Amazon VPC Transit Gateways Multicast is a communication protocol used for delivering a single stream of data to multiple receiving computers simultaneously. Transit Gateway supports routing multicast traffic between subnets of attached VPCs, and it serves as a multicast router for instances sending traffic destined for multiple receiving instances. Topics Delete a transit gateway policy table 90 Amazon VPC • Multicast concepts • Considerations • Multicast routing AWS Transit Gateway • Multicast domains in Amazon VPC Transit Gateways • Shared multicast domains in Amazon VPC Transit Gateways • Register sources with a multicast group using Amazon VPC Transit Gateways • Register members with a multicast group using Amazon VPC Transit Gateways • Deregister sources from a multicast group using Amazon VPC Transit Gateways • Deregister members from a multicast group using Amazon VPC Transit Gateways • View multicast groups using Amazon VPC Transit Gateways • Set up multicast for Windows Server in Amazon VPC Transit Gateways • Example: Manage IGMP configurations using Amazon VPC Transit Gateways • Example: Manage static source configurations using Amazon VPC Transit Gateways • Example: Manage static group member configurations in Amazon VPC Transit Gateways Multicast concepts The following are the key concepts for multicast: • Multicast domain — Allows segmentation of a multicast network into different domains, and makes the transit gateway act as multiple multicast routers. You define multicast domain membership at the subnet level. • Multicast group — Identifies a set of hosts that will send and receive the same multicast traffic. A multicast group is identified by a group IP address. Multicast group membership is defined by individual elastic network interfaces attached to EC2 instances. • Internet Group Management Protocol (IGMP) — An internet protocol that allows hosts and routers to dynamically manage multicast group membership. An IGMP multicast domain contains hosts that use the IGMP protocol to join, leave, and send messages. AWS supports the IGMPv2 protocol and both IGMP and static (API-based) group membership multicast domains. • Multicast source — An elastic network interface associated with a supported EC2 instance that is statically configured to send multicast traffic. A multicast source only applies to static source configurations. Multicast concepts 91 Amazon VPC AWS Transit Gateway A static source multicast domain contains hosts that do not use the IGMP protocol to join, leave, and send messages. You use the AWS CLI to add a source and group members. The statically- added source sends multicast traffic and the members receive multicast traffic. • Multicast group member — An elastic network interface associated with a supported EC2 instance that receives multicast traffic. A multicast group has multiple group members. In a static source group membership configuration, multicast group members can only receive traffic. In an IGMP group configuration, members can both send and receive traffic. Considerations • Transit gateway multicast may not be suitable for high-frequency trading or performance- sensitive applications. We strongly recommend that you review the Multicast quotas for the limits. Contact your account or Solution Architect team for a detailed review of your performance requirements. • For information about supported Regions, see AWS Transit Gateway FAQs. • You must create a new transit gateway to support multicast. • Multicast group membership is managed using the Amazon Virtual Private Cloud Console or the AWS CLI, or IGMP. • A subnet can only be in one multicast domain. • If you use a non-Nitro instance, you must disable the Source/Dest checkbox. For information about disabling the check, see Changing the source or destination checking in the Amazon EC2 User Guide. • A non-Nitro instance cannot be a multicast sender. • Multicast routing is not supported over AWS Direct Connect, Site-to-Site VPN, peering attachments, or transit gateway Connect attachments. • A transit gateway does not support fragmentation of multicast packets. Fragmented multicast packets are dropped. For more information, see Maximum transmission unit (MTU). • At startup, an IGMP host sends multiple IGMP JOIN messages to join a multicast group (typically 2 to |
vpc-tgw-035 | vpc-tgw.pdf | 35 | use a non-Nitro instance, you must disable the Source/Dest checkbox. For information about disabling the check, see Changing the source or destination checking in the Amazon EC2 User Guide. • A non-Nitro instance cannot be a multicast sender. • Multicast routing is not supported over AWS Direct Connect, Site-to-Site VPN, peering attachments, or transit gateway Connect attachments. • A transit gateway does not support fragmentation of multicast packets. Fragmented multicast packets are dropped. For more information, see Maximum transmission unit (MTU). • At startup, an IGMP host sends multiple IGMP JOIN messages to join a multicast group (typically 2 to 3 retries). In the unlikely event that all the IGMP JOIN messages get lost, the host will not become part of transit gateway multicast group. In such a scenario you will need to re-trigger the IGMP JOIN message from the host using application specific methods. • A group membership starts with the receipt of IGMPv2 JOIN message by the transit gateway and ends with the receipt of the IGMPv2 LEAVE message. The transit gateway keeps track of Considerations 92 Amazon VPC AWS Transit Gateway hosts that successfully joined the group. As a cloud multicast router, transit gateway issues an IGMPv2 QUERY message to all members every two minutes. Each member sends an IGMPv2 JOIN message in response, which is how the members renew their membership. If a member fails to reply to three consecutive queries, the transit gateway removes this membership from all joined groups. However, it continues sending queries to this member for 12 hours before permanently removing the member from its to-be-queried list. An explicit IGMPv2 LEAVE message immediately and permanently removes the host from any further multicast processing. • The transit gateway keeps track of hosts that successfully joined the group. In the event of a transit gateway outage, the transit gateway continues to send multicast data to the host for seven minutes (420 seconds) after the last successful IGMP JOIN message. The transit gateway continues to send membership queries to the host for up to 12 hours or until it receives a IGMP LEAVE message from the host. • The transit gateway sends membership query packets to all the IGMP members so that it can track multicast group membership. The source IP of these IGMP query packets is 0.0.0.0/32, and the destination IP is 224.0.0.1/32 and the protocol is 2. Your security group configuration on the IGMP hosts (instances), and any ACLs configuration on the host subnets must allow these IGMP protocol messages. • When the multicast source and destination are in the same VPC, you cannot use security group referencing to set the destination security group to accept traffic from the source's security group. • For static multicast groups and sources, Amazon VPC Transit Gateways automatically remove static groups and sources for ENIs that no longer exist. This is performed by periodically assuming the Transit Gateway service-linked role to describe ENIs in the account. • Only static multicast supports IPv6. Dynamic multicast does not. Multicast routing When you enable multicast on a transit gateway, it acts as a multicast router. When you add a subnet to a multicast domain, we send all multicast traffic to the transit gateway that is associated with that multicast domain. Network ACLs Network ACL rules operate at the subnet level. They apply to multicast traffic, because transit gateways reside outside of the subnet. For more information, see Network ACLs in the Amazon VPC User Guide. Multicast routing 93 Amazon VPC AWS Transit Gateway For Internet Group Management Protocol (IGMP) multicast traffic, the following are the minimum inbound rules. The remote host is the host sending the multicast traffic. Type Protocol Source Description Custom Protocol IGMP(2) 0.0.0.0/32 IGMP query Custom UDP Protocol UDP Remote host IP address Inbound multicast traffic The following are the minimum outbound rules for IGMP. Type Protocol Destination Description Custom Protocol IGMP(2) 224.0.0.2/32 IGMP leave Custom Protocol IGMP(2) Multicast group IP address IGMP join Custom UDP Protocol UDP Multicast group IP address Outbound multicast traffic Security groups Security group rules operate at the instance level. They can be applied to both inbound and outbound multicast traffic. The behavior is the same as with unicast traffic. For all group member instances, you must allow inbound traffic from the group source. For more information, see Security groups in the Amazon VPC User Guide. For IGMP multicast traffic, you must have the following inbound rules at a minimum. The remote host is the host sending the multicast traffic. You can't specify a security group as the source of the UDP inbound rule. Type Protocol Source Description Custom Protocol 2 0.0.0.0/32 IGMP query Multicast routing 94 Amazon VPC Type Protocol Source Description AWS Transit Gateway Custom UDP Protocol UDP Remote host IP address Inbound multicast traffic For IGMP multicast traffic, you |
vpc-tgw-036 | vpc-tgw.pdf | 36 | group member instances, you must allow inbound traffic from the group source. For more information, see Security groups in the Amazon VPC User Guide. For IGMP multicast traffic, you must have the following inbound rules at a minimum. The remote host is the host sending the multicast traffic. You can't specify a security group as the source of the UDP inbound rule. Type Protocol Source Description Custom Protocol 2 0.0.0.0/32 IGMP query Multicast routing 94 Amazon VPC Type Protocol Source Description AWS Transit Gateway Custom UDP Protocol UDP Remote host IP address Inbound multicast traffic For IGMP multicast traffic, you must have the following outbound rules at a minimum. Type Protocol Destination Description Custom Protocol Custom Protocol 2 2 224.0.0.2/32 IGMP leave Multicast group IP address IGMP join Custom UDP Protocol UDP Multicast group IP address Outbound multicast traffic Multicast domains in Amazon VPC Transit Gateways A multicast domain allows segmentation of a multicast network into different domains. To begin using multicast with a transit gateway, create a multicast domain, and then associate subnets with the domain. Multicast domain attributes The following table details the multicast domain attributes. You cannot enable both attributes at the same time. Attribute Description Igmpv2Support (AWS CLI) IGMPv2 support (console) This attribute determines how group members join or leave a multicast group. When this attribute is disabled, you must add the group members to the domain manually. Multicast domains 95 Amazon VPC Attribute Description AWS Transit Gateway Enable this attribute if at least one member uses the IGMP protocol. Members join the multicast group in one of the following ways: • Members that support IGMP use the JOIN and LEAVE messages. • Members that do not support IGMP must be added or removed from the group using the Amazon VPC console or the AWS CLI. If you register multicast group members, you must deregiste r them, too. The transit gateway ignores an IGMP LEAVE message sent by a manually added group member. StaticSourcesSupport (AWS CLI) This attribute determines whether there are static multicast sources for the group. Static sources support (console) When this attribute is enabled, you must add sources for a multicast domain using register-transit-gateway-multicast- group-sources . Only multicast sources can send multicast traffic. When this attribute is disabled, there are no designated multicast sources. Any instances that are in subnets associate d with the multicast domain can send multicast traffic, and the group members receive the multicast traffic. Create an IGMP multicast domain using Amazon VPC Transit Gateways If you have not already done so, review the available multicast domain attributes. For more information, see the section called “Multicast domains”. To create an IGMP multicast domain using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateway Multicast. Multicast domains 96 Amazon VPC AWS Transit Gateway 3. Choose Create transit gateway multicast domain. 4. 5. 6. 7. 8. For Name tag, enter a name for the domain. For Transit gateway ID, choose the transit gateway that processes the multicast traffic. For IGMPv2 support, select the checkbox. For Static sources support, clear the checkbox. To automatically accept cross-account subnet associations for this multicast domain, select Auto accept shared associations. 9. Choose Create transit gateway multicast domain. To create an IGMP multicast domain using the AWS CLI Use the create-transit-gateway-multicast-domain command. aws ec2 create-transit-gateway-multicast-domain --transit-gateway- id tgw-0xexampleid12345 --options StaticSourcesSupport=disable,Igmpv2Support=enable Create a static source multicast domain using Amazon VPC Transit Gateways If you have not already done so, review the available multicast domain attributes. For more information, see the section called “Multicast domains”. To create a static multicast domain using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateway Multicast. 3. Choose Create transit gateway multicast domain. 4. 5. 6. 7. 8. For Name tag, enter a name to identify the domain. For Transit gateway ID, choose the transit gateway that processes the multicast traffic. For IGMPv2 support, clear the checkbox. For Static sources support, select the checkbox. To automatically accept cross-account subnet associations for this multicast domain, select Auto accept shared associations. 9. Choose Create transit gateway multicast domain. To create a static multicast domain using the AWS CLI Multicast domains 97 Amazon VPC AWS Transit Gateway Use the create-transit-gateway-multicast-domain command. aws ec2 create-transit-gateway-multicast-domain --transit-gateway- id tgw-0xexampleid12345 --options StaticSourcesSupport=enable,Igmpv2Support=disable Associating VPC attachments and subnets with a multicast domain using Amazon VPC Transit Gateways Use the following procedure to associate a VPC attachment with a multicast domain. When you create an association, you can then select the subnets to include in the multicast domain. Before you begin, you must create a VPC attachment on your transit gateway. For more information, see Amazon VPC attachments in Amazon VPC Transit Gateways. To associate VPC attachments with a multicast domain using the |
vpc-tgw-037 | vpc-tgw.pdf | 37 | CLI Multicast domains 97 Amazon VPC AWS Transit Gateway Use the create-transit-gateway-multicast-domain command. aws ec2 create-transit-gateway-multicast-domain --transit-gateway- id tgw-0xexampleid12345 --options StaticSourcesSupport=enable,Igmpv2Support=disable Associating VPC attachments and subnets with a multicast domain using Amazon VPC Transit Gateways Use the following procedure to associate a VPC attachment with a multicast domain. When you create an association, you can then select the subnets to include in the multicast domain. Before you begin, you must create a VPC attachment on your transit gateway. For more information, see Amazon VPC attachments in Amazon VPC Transit Gateways. To associate VPC attachments with a multicast domain using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateway Multicast. 3. 4. 5. Select the multicast domain, and then choose Actions, Create association. For Choose attachment to associate, select the transit gateway attachment. For Choose subnets to associate, select the subnets to include in the multicast domain. 6. Choose Create association. To associate VPC attachments with a multicast domain using the AWS CLI Use the associate-transit-gateway-multicast-domain command. Disassociate a subnet from a multicast domain using Amazon VPC Transit Gateways Use the following procedure to disassociate subnets from a multicast domain. To disassociate subnets using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateway Multicast. 3. Select the multicast domain. Multicast domains 98 Amazon VPC AWS Transit Gateway 4. Choose the Associations tab. 5. Select the subnet, and then choose Actions, Delete association. To disassociate subnets using the AWS CLI Use the disassociate-transit-gateway-multicast-domain command. View multicast domain associations using Amazon VPC Transit Gateways View your multicast domains to verify that they are available, and that they contain the appropriate subnets and attachments. To view a multicast domain using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateway Multicast. 3. Select the multicast domain. 4. Choose the Associations tab. To view a multicast domain using the AWS CLI Use the describe-transit-gateway-multicast-domains command. Add tags to a multicast domain using Amazon VPC Transit Gateways Add tags to your resources to help organize and identify them, such as by purpose, owner, or environment. You can add multiple tags to each multicast domain. Tag keys must be unique for each multicast domain. If you add a tag with a key that is already associated with the multicast domain, it updates the value of that tag. For more information, see Tagging your Amazon EC2 Resources. To add tags to a multicast domain using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateway Multicast. 3. Select the multicast domain. 4. Choose Actions, Manage tags. Multicast domains 99 Amazon VPC AWS Transit Gateway 5. For each tag, choose Add new tag and enter a Key and Value for the tag. 6. Choose Save. To add tags to a multicast domain using the AWS CLI Use the create-tags command. Delete a multicast domain using Amazon VPC Transit Gateways Use the following procedure to delete a multicast domain. To delete a multicast domain using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateway Multicast. 3. Select the multicast domain, and then choose Actions, Delete multicast domain. 4. When prompted for confirmation, enter delete and then choose Delete. To delete a multicast domain using the AWS CLI Use the delete-transit-gateway-multicast-domain command. Shared multicast domains in Amazon VPC Transit Gateways With multicast domain sharing, multicast domain owners can share the domain with other AWS accounts inside its organization or across organizations in AWS Organizations. As the multicast domain owner, you can create and manage the multicast domain centrally. Once shared, those users can perform the following operations on a shared multicast domain: • Register and deregister group members or group sources in the multicast domain • Associate a subnet with the multicast domain, and disassociate subnets from the multicast domain A multicast domain owner can share a multicast domain with: • AWS accounts inside its organization or across organizations in AWS Organizations • An organizational unit inside its organization in AWS Organizations Shared multicast domains 100 Amazon VPC AWS Transit Gateway • Its entire organization in AWS Organizations • AWS accounts outside of AWS Organizations. To share a multicast domain with an AWS account outside of your Organization, you must create a resource share using AWS Resource Access Manager, and then choose Allow sharing with anyone when selecting the Principals to share the multicast domain with. For more information on creating a resource share, see Creating a resource share in AWS RAM in the AWS RAM User Guide Contents • Prerequisites for sharing a multicast domain • Related services • Shared multicast domain permissions • Billing and metering |
vpc-tgw-038 | vpc-tgw.pdf | 38 | AWS Transit Gateway • Its entire organization in AWS Organizations • AWS accounts outside of AWS Organizations. To share a multicast domain with an AWS account outside of your Organization, you must create a resource share using AWS Resource Access Manager, and then choose Allow sharing with anyone when selecting the Principals to share the multicast domain with. For more information on creating a resource share, see Creating a resource share in AWS RAM in the AWS RAM User Guide Contents • Prerequisites for sharing a multicast domain • Related services • Shared multicast domain permissions • Billing and metering • Quotas • Share resources across Availability Zones in Amazon VPC Transit Gateways • Share a multicast domain using Amazon VPC Transit Gateways • Unshare a shared multicast domain using Amazon VPC Transit Gateways • Identify a shared multicast domain using Amazon VPC Transit Gateways Prerequisites for sharing a multicast domain • To share a multicast domain, you must own it in your AWS account. You cannot share a multicast domain that has been shared with you. • To share a multicast domain with your organization or an organizational unit in AWS Organizations, you must enable sharing with AWS Organizations. For more information, see Enable Sharing with AWS Organizations in the AWS RAM User Guide. Related services Multicast domain sharing integrates with AWS Resource Access Manager (AWS RAM). AWS RAM is a service that enables you to share your AWS resources with any AWS account or through AWS Organizations. With AWS RAM, you share resources that you own by creating a resource share. A resource share specifies the resources to share, and the users with whom to share them. Shared multicast domains 101 Amazon VPC AWS Transit Gateway Consumers can be individual AWS accounts, or organizational units or an entire organization in AWS Organizations. For more information about AWS RAM, see the AWS RAM User Guide. Shared multicast domain permissions Permissions for owners Owners are responsible for managing the multicast domain and the members and attachments that they register or associate with the domain. Owners can change or revoke shared access at any time. They can use AWS Organizations to view, modify, and delete resources that consumers create on shared multicast domains. Permissions for consumers Users of the shared multicast domain can perform the following operations on shared multicast domains in the same way that they would on multicast domains that they created: • Register and deregister group members or group sources in the multicast domain • Associate a subnet with the multicast domain, and disassociate subnets from the multicast domain Consumers are responsible for managing the resources that they create on the shared multicast domain. Customers cannot view or modify resources owned by other consumers or by the multicast domain owner, and they cannot modify multicast domains that are shared with them. Billing and metering There are no additional charges for sharing multicast domains for either the owner, or consumers. Quotas A shared multicast domain counts toward the owner's and shared user's multicast domain quotas. Share resources across Availability Zones in Amazon VPC Transit Gateways To ensure that resources are distributed across the Availability Zones for a Region, Amazon VPC Transit Gateways independently map s Availability Zones to names for each account. This could Shared multicast domains 102 Amazon VPC AWS Transit Gateway lead to Availability Zone naming differences across accounts. For example, the Availability Zone us-east-1a for your AWS account might not have the same location as us-east-1a for another AWS account. To identify the location of your multicast domain relative to your accounts, you must use the Availability Zone ID (AZ ID). The AZ ID is a unique and consistent identifier for an Availability Zone across all AWS accounts. For example, use1-az1 is an AZ ID for the us-east-1 Region and it is the same location in every AWS account. To view the AZ IDs for the Availability Zones in your account 1. Open the AWS RAM console at https://console.aws.amazon.com/ram/home. 2. The AZ IDs for the current Region are displayed in the Your AZ ID panel on the right-hand side of the screen. Share a multicast domain using Amazon VPC Transit Gateways When an owner shares a multicast domain with you, you can do the following: • Register and deregister group members or group sources • Associate and disassociate subnets Note To share a multicast domain, you must add it to a resource share. A resource share is an AWS RAM resource that lets you share your resources across AWS accounts. A resource share specifies the resources to share, and the consumers with whom they are shared. When you share a multicast domain using the Amazon Virtual Private Cloud Console, you add it to an existing resource share. To add the multicast domain to a new resource |
vpc-tgw-039 | vpc-tgw.pdf | 39 | multicast domain with you, you can do the following: • Register and deregister group members or group sources • Associate and disassociate subnets Note To share a multicast domain, you must add it to a resource share. A resource share is an AWS RAM resource that lets you share your resources across AWS accounts. A resource share specifies the resources to share, and the consumers with whom they are shared. When you share a multicast domain using the Amazon Virtual Private Cloud Console, you add it to an existing resource share. To add the multicast domain to a new resource share, you must first create the resource share using the AWS RAM console. If you are part of an organization in AWS Organizations and sharing within your organization is enabled, consumers in your organization are automatically granted access to the shared multicast domain. Otherwise, consumers receive an invitation to join the resource share and are granted access to the shared multicast domain after accepting the invitation. Shared multicast domains 103 Amazon VPC AWS Transit Gateway You can share a multicast domain that you own using the Amazon Virtual Private Cloud console, AWS RAM console, or the AWS CLI. To share a multicast domain that you own using the *Amazon Virtual Private Cloud Console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. 3. 4. In the navigation pane, choose Multicast Domains. Select your multicast domain, and then choose Actions, Share multicast domain. Select your resource share and choose Share multicast domain. To share a multicast domain that you own using the AWS RAM console See Creating a Resource Share in the AWS RAM User Guide. To share a multicast domain that you own using the AWS CLI Use the create-resource-share command. Unshare a shared multicast domain using Amazon VPC Transit Gateways When a shared multicast domain is unshared, the following happens to consumer multicast domain resources: • Consumer subnets are disassociated from the multicast domain. The subnets remain in the consumer account. • Consumer group sources and group members are disassociated from the multicast domain, and then deleted from the consumer account. To unshare a multicast domain, you must remove it from the resource share. You can do this from the AWS RAM console or the AWS CLI. To unshare a shared multicast domain that you own, you must remove it from the resource share. You can do this using the Amazon Virtual Private Cloud, AWS RAM console, or the AWS CLI. To unshare a shared multicast domain that you own using the *Amazon Virtual Private Cloud Console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. Shared multicast domains 104 Amazon VPC AWS Transit Gateway 2. 3. In the navigation pane, choose Multicast Domains. Select your multicast domain, and then choose Actions, Stop sharing. To unshare a shared multicast domain that you own using the AWS RAM console See Updating a Resource Share in the AWS RAM User Guide. To unshare a shared multicast domain that you own using the AWS CLI Use the disassociate-resource-share command. Identify a shared multicast domain using Amazon VPC Transit Gateways Owners and consumers can identify shared multicast domains using the Amazon Virtual Private Cloud and AWS CLI To identify a shared multicast domain using the *Amazon Virtual Private Cloud Console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. 3. In the navigation pane, choose Multicast Domains. Select your multicast domain. 4. On the Transit Multicast Domain Details page, view the Owner ID to identify the AWS account ID of the multicast domain. To identify a shared multicast domain using the AWS CLI Use the describe-transit-gateway-multicast-domains command. The command returns the multicast domains that you own and multicast domains that are shared with you. OwnerId shows the AWS account ID of the multicast domain owner. Register sources with a multicast group using Amazon VPC Transit Gateways Note This procedure is only required when you have set the Static sources support attribute to enable. Register sources with a multicast group 105 Amazon VPC AWS Transit Gateway Use the following procedure to register sources with a multicast group. The source is the network interface that sends multicast traffic. You need the following information before you add a source: • The ID of the multicast domain • The IDs of the sources' network interfaces • The multicast group IP address To register sources using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateway Multicast. 3. 4. Select the multicast domain, and then choose Actions, Add group sources. For Group IP address, enter either the IPv4 CIDR block or IPv6 CIDR block to assign to the multicast domain. 5. Under Choose network interfaces, select the multicast senders' network interfaces. 6. Choose Add sources. To register sources using the AWS |
vpc-tgw-040 | vpc-tgw.pdf | 40 | a source: • The ID of the multicast domain • The IDs of the sources' network interfaces • The multicast group IP address To register sources using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateway Multicast. 3. 4. Select the multicast domain, and then choose Actions, Add group sources. For Group IP address, enter either the IPv4 CIDR block or IPv6 CIDR block to assign to the multicast domain. 5. Under Choose network interfaces, select the multicast senders' network interfaces. 6. Choose Add sources. To register sources using the AWS CLI Use the register-transit-gateway-multicast-group-sources command. Register members with a multicast group using Amazon VPC Transit Gateways Use the following procedure to register group members with a multicast group. You need the following information before you add members: • The ID of the multicast domain • The IDs of the group members' network interfaces • The multicast group IP address To register members using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. Register members with a multicast group 106 Amazon VPC AWS Transit Gateway 2. On the navigation pane, choose Transit Gateway Multicast. 3. 4. Select the multicast domain, and then choose Actions, Add group members. For Group IP address, enter either the IPv4 CIDR block or IPv6 CIDR block to assign to the multicast domain. 5. Under Choose network interfaces, select the multicast receivers' network interfaces. 6. Choose Add members. To register members using the AWS CLI Use the register-transit-gateway-multicast-group-members command. Deregister sources from a multicast group using Amazon VPC Transit Gateways You don't need to follow this procedure unless you manually added a source to the multicast group. To remove a source using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateway Multicast. 3. Select the multicast domain. 4. Choose the Groups tab. 5. Select the sources, and then choose Remove source. To remove a source using the AWS CLI Use the deregister-transit-gateway-multicast-group-sources command. Deregister members from a multicast group using Amazon VPC Transit Gateways You don't need to follow this procedure unless you manually added a member to the multicast group. Deregister sources from a multicast group 107 Amazon VPC AWS Transit Gateway To deregister members using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateway Multicast. 3. Select the multicast domain. 4. Choose the Groups tab. 5. Select the members, and then choose Remove member. To deregister members using the AWS CLI Use the deregister-transit-gateway-multicast-group-members command. View multicast groups using Amazon VPC Transit Gateways You can view information about your multicast groups to verify that members were discovered using the IGMPv2 protocol. Member type (in the console), or MemberType (in the AWS CLI) displays IGMP when AWS discovered members with the protocol. To view multicast groups using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Transit Gateway Multicast. 3. Select the multicast domain. 4. Choose the Groups tab. To view multicast groups using the AWS CLI Use the search-transit-gateway-multicast-groups command. The following example shows that the IGMP protocol discovered multicast group members. aws ec2 search-transit-gateway-multicast-groups --transit-gateway-multicast-domain tgw- mcast-domain-000fb24d04EXAMPLE { "MulticastGroups": [ { "GroupIpAddress": "224.0.1.0", "TransitGatewayAttachmentId": "tgw-attach-0372e72386EXAMPLE", View multicast groups 108 Amazon VPC AWS Transit Gateway "SubnetId": "subnet-0187aff814EXAMPLE", "ResourceId": "vpc-0065acced4EXAMPLE", "ResourceType": "vpc", "NetworkInterfaceId": "eni-03847706f6EXAMPLE", "MemberType": "igmp" } ] } Set up multicast for Windows Server in Amazon VPC Transit Gateways You'll need to perform additional steps when setting up multicast to work with transit gateways on Windows Server 2019 or 2022. To set this up you'll need to use PowerShell, and run the following commands: To set up multicast for Windows Server using PowerShell 1. Change Windows Server to use IGMPv2 instead of IGMPv3 for the TCP/IP stack: PS C:\> New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services \Tcpip\Parameters -Name IGMPVersion -PropertyType DWord -Value 3 Note New-ItemProperty is a property index that specifies the IGMP version. Because IGMP v2 is the supported version for multicast, the property Value must be 3. Instead of editing the Windows registry you can run the following command to set the IGMP version to 2.: Set-NetIPv4Protocol -IGMPVersion Version2 2. Windows Firewall drops most UDP traffic by default. You'll first need to check which connection profile is being used for multicast: PS C:\> Get-NetConnectionProfile | Select-Object NetworkCategory NetworkCategory --------------- Public 3. Update the connection profile from the previous step to allow access to the required UDP port(s): Set up multicast for Windows Server 109 Amazon VPC AWS Transit Gateway PS C:\> Set-NetFirewallProfile -Profile Public -Enabled False 4. Reboot the EC2 instance. 5. Test your multicast application to ensure traffic is flowing as expected. Example: Manage IGMP configurations using Amazon VPC Transit Gateways This example shows at least one host that uses |
vpc-tgw-041 | vpc-tgw.pdf | 41 | Firewall drops most UDP traffic by default. You'll first need to check which connection profile is being used for multicast: PS C:\> Get-NetConnectionProfile | Select-Object NetworkCategory NetworkCategory --------------- Public 3. Update the connection profile from the previous step to allow access to the required UDP port(s): Set up multicast for Windows Server 109 Amazon VPC AWS Transit Gateway PS C:\> Set-NetFirewallProfile -Profile Public -Enabled False 4. Reboot the EC2 instance. 5. Test your multicast application to ensure traffic is flowing as expected. Example: Manage IGMP configurations using Amazon VPC Transit Gateways This example shows at least one host that uses the IGMP protocol for multicast traffic. AWS automatically creates the multicast group when it receives an IGMP JOIN message from an instance, and then adds the instance as a member in this group. You can also statically add non- IGMP hosts as members to a group using the AWS CLI. Any instances that are in subnets associated with the multicast domain can send traffic, and the group members receive the multicast traffic. Use the following steps to complete the configuration: 1. Create a VPC. For more information, see Create a VPC in the Amazon VPC User Guide. 2. Create a subnet in the VPC. For more information, see Create a subnet in the Amazon VPC User Guide. 3. Create a transit gateway configured for multicast traffic. For more information, see the section called “Create a transit gateway”. 4. Create a VPC attachment. For more information, see the section called “Create a VPC attachment”. 5. Create a multicast domain configured for IGMP support. For more information, see the section called “Create an IGMP multicast domain”. Use the following settings: • Enable IGMPv2 support. • Disable Static sources support. 6. Create an association between subnets in the transit gateway VPC attachment and the multicast domain. For more information see the section called “Associating VPC attachments and subnets with a multicast domain”. 7. The default IGMP version for EC2 is IGMPv3. You need to change the version for all IGMP group members. You can run the following command: Example: Manage IGMP configurations 110 Amazon VPC AWS Transit Gateway sudo sysctl net.ipv4.conf.eth0.force_igmp_version=2 8. Add the members that do not use the IGMP protocol to the multicast group. For more information, see the section called “Register members with a multicast group”. Example: Manage static source configurations using Amazon VPC Transit Gateways This example statically adds multicast sources to a group. Hosts do not use the IGMP protocol to join or leave multicast groups. You need to statically add the group members that receive the multicast traffic. Use the following steps to complete the configuration: 1. Create a VPC. For more information, see Create a VPC in the Amazon VPC User Guide. 2. Create a subnet in the VPC. For more information, see Create a subnet in the Amazon VPC User Guide. 3. Create a transit gateway configured for multicast traffic. For more information, see the section called “Create a transit gateway”. 4. Create a VPC attachment. For more information, see the section called “Create a VPC attachment”. 5. Create a multicast domain configured for no IGMP support, and support for statically adding sources. For more information, see the section called “Create a static source multicast domain”. Use the following settings: • Disable IGMPv2 support. • To manually add sources, enable Static sources support. The sources are the only resources that can send multicast traffic when the attribute is enabled. Otherwise, any instances that are in subnets associated with the multicast domain can send multicast traffic, and the group members receive the multicast traffic. 6. Create an association between subnets in the transit gateway VPC attachment and the multicast domain. For more information see the section called “Associating VPC attachments and subnets with a multicast domain”. Example: Manage static source configurations 111 Amazon VPC AWS Transit Gateway 7. If you enable Static sources support, add the source to the multicast group. For more information, see the section called “Register sources with a multicast group”. 8. Add the members to the multicast group. For more information, see the section called “Register members with a multicast group”. Example: Manage static group member configurations in Amazon VPC Transit Gateways This example shows statically adding multicast members to a group. Hosts cannot use the IGMP protocol to join or leave multicast groups. Any instances that are in subnets associated with the multicast domain can send multicast traffic, and the group members receive the multicast traffic. Use the following steps to complete the configuration: 1. Create a VPC. For more information, see Create a VPC in the Amazon VPC User Guide. 2. Create a subnet in the VPC. For more information, see Create a subnet in the Amazon VPC User Guide. 3. Create a transit gateway configured for multicast traffic. For |
vpc-tgw-042 | vpc-tgw.pdf | 42 | This example shows statically adding multicast members to a group. Hosts cannot use the IGMP protocol to join or leave multicast groups. Any instances that are in subnets associated with the multicast domain can send multicast traffic, and the group members receive the multicast traffic. Use the following steps to complete the configuration: 1. Create a VPC. For more information, see Create a VPC in the Amazon VPC User Guide. 2. Create a subnet in the VPC. For more information, see Create a subnet in the Amazon VPC User Guide. 3. Create a transit gateway configured for multicast traffic. For more information, see the section called “Create a transit gateway”. 4. Create a VPC attachment. For more information, see the section called “Create a VPC attachment”. 5. Create a multicast domain configured for no IGMP support, and support for statically adding sources. For more information, see the section called “Create a static source multicast domain”. Use the following settings: • Disable IGMPv2 support. • Disable Static sources support. 6. Create an association between subnets in the transit gateway VPC attachment and the multicast domain. For more information see the section called “Associating VPC attachments and subnets with a multicast domain”. 7. Add the members to the multicast group. For more information, see the section called “Register members with a multicast group”. Example: Manage static group member configurations 112 Amazon VPC AWS Transit Gateway Amazon VPC Transit Gateways Flow Logs Transit Gateway Flow Logs is a feature of Amazon VPC Transit Gateways that enables you to capture information about the IP traffic going to and from your transit gateways. Flow log data can be published to Amazon CloudWatch Logs, Amazon S3, or Firehose. After you create a flow log, you can retrieve and view its data in the chosen destination. Flow log data is collected outside of the path of your network traffic, and therefore does not affect network throughput or latency. You can create or delete flow logs without any risk of impact to network performance. Transit Gateway Flow Logs capture information related only to transit gateways, described in the section called “Transit Gateway Flow Log records”. If you want to capture information about IP traffic going to and from network interfaces in your VPCs, use VPC Flow Logs. See Logging IP traffic using VPC Flow Logs in the Amazon VPC User Guide for more information. Note To create a transit gateway flow log, you must be the owner of the transit gateway. If you are not the owner, the transit gateway owner must give you permission. Flow log data for a monitored transit gateway is recorded as flow log records, which are log events consisting of fields that describe the traffic flow. For more information, see Transit Gateway Flow Log records. To create a flow log, you specify: • The resource for which to create the flow log • The destinations to which you want to publish the flow log data After you create a flow log, it can take several minutes to begin collecting and publishing data to the chosen destinations. Flow logs do not capture real-time log streams for your transit gateways. You can apply tags to your flow logs. Each tag consists of a key and an optional value, both of which you define. Tags can help you organize your flow logs, for example by purpose or owner. If you no longer require a flow log, you can delete it. Deleting a flow log disables the flow log service for the resource, and no new flow log records are created or published to CloudWatch Logs or Amazon S3. Deleting the flow log does not delete any existing flow log records or log 113 Amazon VPC AWS Transit Gateway streams (for CloudWatch Logs) or log file objects (for Amazon S3) for a transit gateway. To delete an existing log stream, use the CloudWatch Logs console. To delete existing log file objects, use the Amazon S3 console. After you've deleted a flow log, it can take several minutes to stop collecting data. For more information, see Delete an Amazon VPC Transit Gateways Flow Logs record. You can create flow logs for your transit gateways that can publish data to CloudWatch Logs, Amazon S3, or Amazon Data Firehose. For more information, see the following: • Create a flow log that publishes to CloudWatch Logs • Create a flow log that publishes to Amazon S3 • Create a flow log that publishes to Firehose Limitations The following limitations apply to Transit Gateway Flow Logs: • Multicast traffic is not supported. • Connect attachments are not supported. All Connect flow logs appear under the transport attachment and must therefore be enabled on the transit gateway or the Connect transport attachment. Transit Gateway Flow Log records A flow log record represents a |
vpc-tgw-043 | vpc-tgw.pdf | 43 | to CloudWatch Logs, Amazon S3, or Amazon Data Firehose. For more information, see the following: • Create a flow log that publishes to CloudWatch Logs • Create a flow log that publishes to Amazon S3 • Create a flow log that publishes to Firehose Limitations The following limitations apply to Transit Gateway Flow Logs: • Multicast traffic is not supported. • Connect attachments are not supported. All Connect flow logs appear under the transport attachment and must therefore be enabled on the transit gateway or the Connect transport attachment. Transit Gateway Flow Log records A flow log record represents a network flow in your transit gateway. Each record is a string with fields separated by spaces. A record includes values for the different components of the traffic flow, for example, the source, destination, and protocol. When you create a flow log, you can use the default format for the flow log record, or you can specify a custom format. Contents • Default format • Custom format • Available fields Limitations 114 Amazon VPC Default format AWS Transit Gateway With the default format, the flow log records includes all version 2 to version 6 fields, in the order shown in the available fields table. You cannot customize or change the default format. To capture additional fields or a different subset of fields, specify a custom format instead. Custom format With a custom format, you specify which fields are included in the flow log records and in which order. This enables you to create flow logs that are specific to your needs, and to omit fields that are not relevant. Using a custom format can reduce the need for separate processes to extract specific information from the published flow logs. You can specify any number of the available flow log fields, but you must specify at least one. Available fields The following table describes all of the available fields for a transit gateway flow log record. The Version column indicates which version the field was introduced in. When publishing flow log data to Amazon S3, the data type for the fields depends on the flow log format. If the format is plain text, all fields are of type STRING. If the format is Parquet, see the table for the field data types. If a field is not applicable or could not be computed for a specific record, the record displays a '-' symbol for that entry. Metadata fields that do not come directly from the packet header are best effort approximations, and their values might be missing or inaccurate. Field version Description Version Indicates the version in which the field was introduced. The default format includes all version 2 fields, in the same order that they appear in the table. Parquet data type: INT_32 resource-type The type of resource on which the subscription is created. For Transit Gateway Flow Logs, this will be TransitGateway. Parquet data type: STRING 2 6 Default format 115 Amazon VPC Field Description AWS Transit Gateway Version account-id The AWS account ID of the owner of the source transit gateway. Parquet data type: STRING tgw-id The ID of the transit gateway for which traffic is being recorded. Parquet data type: STRING tgw-attac hment-id The ID of the transit gateway attachment for which traffic is being recorded. tgw-src-vpc- account-id tgw-dst-vpc- account-id Parquet data type: STRING The AWS account ID for the source VPC traffic. Parquet data type: STRING The AWS account ID for the destination VPC traffic. Parquet data type: STRING tgw-src-vpc-id The ID of the source VPC for the transit gateway Parquet data type: STRING tgw-dst-vpc-id The ID of the destination VPC for the transit gateway. Parquet data type: STRING tgw-src-subnet- id tgw-dst-subnet- id The ID of the subnet for the transit gateway source traffic. Parquet data type: STRING The ID of the subnet for the transit gateway destination traffic. Parquet data type: STRING 2 6 6 6 6 6 6 6 6 tgw-src-eni The ID of the source transit gateway attachment ENI for the flow. 6 Parquet data type: STRING Available fields 116 Amazon VPC Field Description AWS Transit Gateway Version tgw-dst-eni The ID of the destination transit gateway attachment ENI for the flow. Parquet data type: STRING tgw-src-az-id The ID of the Availability Zone that contains the source transit gateway for which traffic is recorded. If the traffic is from a sublocation, the record displays a '-' symbol for this field. Parquet data type: STRING tgw-dst-az-id The ID of the Availability Zone that contains the destination transit gateway for which traffic is recorded. Parquet data type: STRING tgw-pair- attachment-id Depending on the flow direction, this is either the egress or ingress attachment ID of the flow. Parquet data type: STRING srcaddr The source address for incoming traffic. Parquet data type: STRING dstaddr The destination address for |
vpc-tgw-044 | vpc-tgw.pdf | 44 | STRING tgw-src-az-id The ID of the Availability Zone that contains the source transit gateway for which traffic is recorded. If the traffic is from a sublocation, the record displays a '-' symbol for this field. Parquet data type: STRING tgw-dst-az-id The ID of the Availability Zone that contains the destination transit gateway for which traffic is recorded. Parquet data type: STRING tgw-pair- attachment-id Depending on the flow direction, this is either the egress or ingress attachment ID of the flow. Parquet data type: STRING srcaddr The source address for incoming traffic. Parquet data type: STRING dstaddr The destination address for outgoing traffic. Parquet data type: STRING srcport The source port of the traffic. Parquet data type: INT_32 dstport The destination port of the traffic. Parquet data type: INT_32 6 6 6 6 2 2 2 2 Available fields 117 Amazon VPC Field Description AWS Transit Gateway Version protocol The IANA protocol number of the traffic. For more information, see Assigned Internet Protocol Numbers. Parquet data type: INT_32 packets The number of packets transferred during the flow. Parquet data type: INT_64 bytes The number of bytes transferred during the flow. start end Parquet data type: INT_64 The time, in Unix seconds, when the first packet of the flow was received within the aggregation interval. This might be up to 60 seconds after the packet was transmitted or received on the transit gateway. Parquet data type: INT_64 The time, in Unix seconds, when the last packet of the flow was received within the aggregation interval. This might be up to 60 seconds after the packet was transmitted or received on the transit gateway. Parquet data type: INT_64 log-status The status of the flow log: 2 2 2 2 2 2 • OK — Data is logging normally to the chosen destinations. • NODATA — There was no network traffic to or from the network interface during the aggregation interval. • SKIPDATA — Some flow log records were skipped during the aggregation interval. This might be because of an internal capacity constraint, or an internal error. Parquet data type: STRING Available fields 118 Amazon VPC Field type Description AWS Transit Gateway Version The type of traffic. Possible values are IPv4 | IPv6 | EFA. For more information, see Elastic Fabric Adapter in the Amazon EC2 User Guide. Parquet data type: STRING packets-lost-no- route packets-lost- blackhole packets-lost- mtu-exceeded packets-lost-ttl- expired The packets lost due to no route being specified. Parquet data type: INT_64 The packets lost due to a black hole. Parquet data type: INT_64 The packets lost due to the size exceeding the MTU. Parquet data type: INT_64 The packets lost due to the expiration of time-to-live. Parquet data type: INT_64 3 6 6 6 6 Available fields 119 Amazon VPC Field Description tcp-flags The bitmask value for the following TCP flags: AWS Transit Gateway Version 3 • FIN — 1 • SYN — 2 • RST — 4 • PSH — 8 • ACK — 16 • SYN-ACK — 18 • URG — 32 Important When a flow log entry consists of only ACK packets, the flag value is 0, not 16. For general information about TCP flags (such as the meaning of flags like FIN, SYN, and ACK), see TCP segment structure on Wikipedia. TCP flags can be OR-ed during the aggregation interval. For short connections, the flags might be set on the same line in the flow log record, for example, 19 for SYN-ACK and FIN, and 3 for SYN and FIN. Parquet data type: INT_32 region The Region that contains the transit gateway where traffic is recorded. 4 Parquet data type: STRING Available fields 120 Amazon VPC Field Description flow-direction The direction of the flow with respect to the interface where traffic is captured. The possible values are: ingress | egress. Parquet data type: STRING pkt-src-aws- service The name of the subset of IP address ranges for the srcaddr if the source IP address is for an AWS service. The possible values AWS Transit Gateway Version 5 5 are: AMAZON | AMAZON_APPFLOW | AMAZON_CONNECT | API_GATEWAY | CHIME_MEETINGS | CHIME_VOICECONNECT OR | CLOUD9 | CLOUDFRONT | CODEBUILD | DYNAMODB | EBS | EC2 | EC2_INSTANCE_CONNECT | GLOBALACCELERATOR | KINESIS_VIDEO_STREAMS | ROUTE53 | ROUTE53_HEALTHCHECKS | ROUTE53_HEALTHCHECKS_PUBLISHING | ROUTE53_RESOLVER | S3 | WORKSPACES_GATEWAYS. Parquet data type: STRING pkt-dst-aws- service The name of the subset of IP address ranges for the dstaddr field, if the destination IP address is for an AWS service. For a list of 5 possible values, see the pkt-src-aws-service field. Parquet data type: STRING Control the use of flow logs By default, users do not have permission to work with flow logs. You can create a user policy that grants users the permissions to create, describe, and delete flow logs. For more information, see Granting IAM Users Required |
vpc-tgw-045 | vpc-tgw.pdf | 45 | | ROUTE53 | ROUTE53_HEALTHCHECKS | ROUTE53_HEALTHCHECKS_PUBLISHING | ROUTE53_RESOLVER | S3 | WORKSPACES_GATEWAYS. Parquet data type: STRING pkt-dst-aws- service The name of the subset of IP address ranges for the dstaddr field, if the destination IP address is for an AWS service. For a list of 5 possible values, see the pkt-src-aws-service field. Parquet data type: STRING Control the use of flow logs By default, users do not have permission to work with flow logs. You can create a user policy that grants users the permissions to create, describe, and delete flow logs. For more information, see Granting IAM Users Required Permissions for Amazon EC2 Resources in the Amazon EC2 API Reference. The following is an example policy that grants users full permissions to create, describe, and delete flow logs. { "Version": "2012-10-17", "Statement": [ { Control the use of flow logs 121 Amazon VPC AWS Transit Gateway "Effect": "Allow", "Action": [ "ec2:DeleteFlowLogs", "ec2:CreateFlowLogs", "ec2:DescribeFlowLogs" ], "Resource": "*" } ] } Some additional IAM role and permission configuration is required, depending on whether you're publishing to CloudWatch Logs or Amazon S3. For more information, see Transit Gateway Flow Logs records in Amazon CloudWatch Logs and Transit Gateways Flow Logs records in Amazon S3 . Transit Gateway Flow Logs pricing Data ingestion and storage charges for vended logs apply when you publish transit gateway flow logs. For more information about pricing when publishing vended logs, open Amazon CloudWatch Pricing, and then under Paid tier, select Logs and find Vended Logs. Create or update an IAM role for Amazon VPC Transit Gateways Flow Logs You can update an existing role or use the following procedure to create a new role for use with flow logs using the AWS Identity and Access Management console. To create an IAM role for flow logs 1. Open the IAM console at https://console.aws.amazon.com/iam/. 2. 3. In the navigation pane, choose Roles, Create role. For Select type of trusted entity, choose AWS service. For Use case, choose EC2. Choose Next. 4. On the Add permissions page, choose Next: Tags and optionally add tags. Choose Next. 5. On the Name, revew, and create page enter a name for your role and optionally provide a Description. Choose Create role. 6. Choose the name of your role. For Add permissions, choose Create inline policy, and then choose the JSON tab. Transit Gateway Flow Logs pricing 122 Amazon VPC AWS Transit Gateway 7. Copy the first policy from IAM roles for publishing flow logs to CloudWatch Logs and paste it 8. 9. in the window. Choose Review policy. Enter a name for your policy, and choose Create policy. Select the name of your role. For Trust relationships, choose Edit trust relationship. In the existing policy document, change the service from ec2.amazonaws.com to vpc-flow- logs.amazonaws.com. Choose Update Trust Policy. 10. On the Summary page, note the ARN for your role. You need this ARN when you create your flow log. Transit Gateway Flow Logs records in Amazon CloudWatch Logs Flow logs can publish flow log data directly to Amazon CloudWatch. When published to CloudWatch Logs, the flow log data is published to a log group, and each transit gateway has a unique log stream in the log group. Log streams contain flow log records. You can create multiple flow logs that publish data to the same log group. If the same transit gateway is present in one or more flow logs in the same log group, it has one combined log stream. If you've specified that one flow log should capture rejected traffic, and the other flow log should capture accepted traffic, then the combined log stream captures all traffic. Data ingestion and archival charges for vended logs apply when you publish flow logs to CloudWatch Logs. For more information, see Amazon CloudWatch Pricing. In CloudWatch Logs, the timestamp field corresponds to the start time that's captured in the flow log record. The ingestionTime field provides the date and time when the flow log record was received by CloudWatch Logs. The timestamp is later than the end time that's captured in the flow log record. For more information about CloudWatch Logs, see Logs sent to CloudWatch Logs in the Amazon CloudWatch Logs User Guide. Contents • IAM roles for publishing flow logs to CloudWatch Logs • Permissions for IAM users to pass a role • Create a Transit Gateways Flow Logs record that publishes to Amazon CloudWatch Logs • View Transit Gateway Flow Logs records in Amazon CloudWatch CloudWatch Logs 123 Amazon VPC AWS Transit Gateway • Process Transit Gateway Flow Logs records in Amazon CloudWatch Logs IAM roles for publishing flow logs to CloudWatch Logs The IAM role that's associated with your flow log must have sufficient permissions to publish flow logs to the specified log group in CloudWatch Logs. The IAM role |
vpc-tgw-046 | vpc-tgw.pdf | 46 | Contents • IAM roles for publishing flow logs to CloudWatch Logs • Permissions for IAM users to pass a role • Create a Transit Gateways Flow Logs record that publishes to Amazon CloudWatch Logs • View Transit Gateway Flow Logs records in Amazon CloudWatch CloudWatch Logs 123 Amazon VPC AWS Transit Gateway • Process Transit Gateway Flow Logs records in Amazon CloudWatch Logs IAM roles for publishing flow logs to CloudWatch Logs The IAM role that's associated with your flow log must have sufficient permissions to publish flow logs to the specified log group in CloudWatch Logs. The IAM role must belong to your AWS account. The IAM policy that's attached to your IAM role must include at least the following permissions. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "logs:CreateLogGroup", "logs:CreateLogStream", "logs:PutLogEvents", "logs:DescribeLogGroups", "logs:DescribeLogStreams" ], "Resource": "*" } ] } Also ensure that your role has a trust relationship that allows the flow logs service to assume the role. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": "vpc-flow-logs.amazonaws.com" }, "Action": "sts:AssumeRole" } ] IAM roles for publishing flow logs to CloudWatch Logs 124 Amazon VPC } AWS Transit Gateway We recommend that you use the aws:SourceAccount and aws:SourceArn condition keys to protect yourself against the confused deputy problem. For example, you could add the following condition block to the previous trust policy. The source account is the owner of the flow log and the source ARN is the flow log ARN. If you don't know the flow log ID, you can replace that portion of the ARN with a wildcard (*) and then update the policy after you create the flow log. "Condition": { "StringEquals": { "aws:SourceAccount": "account_id" }, "ArnLike": { "aws:SourceArn": "arn:aws:ec2:region:account_id:vpc-flow-log/flow-log-id" } } Permissions for IAM users to pass a role Users must also have permissions to use the iam:PassRole action for the IAM role that's associated with the flow log. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": ["iam:PassRole"], "Resource": "arn:aws:iam::account-id:role/flow-log-role-name" } ] } Create a Transit Gateways Flow Logs record that publishes to Amazon CloudWatch Logs You can create flow logs for transit gateways. If you perform these steps as an IAM user, ensure that you have permissions to use the iam:PassRole action. For more information, see Permissions for IAM users to pass a role. Permissions for IAM users to pass a role 125 Amazon VPC AWS Transit Gateway You can create an Amazon CloudWatch flow log using either the Amazon VPC Console or the AWS CLI. To create a transit gateway flow log using the console 1. Sign in to the AWS Management Console and open the Amazon VPC console at https:// console.aws.amazon.com/vpc/. 2. In the navigation pane, choose Transit gateways. 3. Choose the checkboxes for one or more transit gateways and choose Actions, Create flow log. 4. 5. For Destination, choose Send to CloudWatch Logs. For Destination log group, choose the name of a current destination log group. Note If the destination log group does not yet exist, entering a new name in this field will create a new destination log group. 6. For IAM role, specify the name of the role that has permissions to publish logs to CloudWatch Logs. 7. For Log record format, select the format for the flow log record. • To use the default format, choose AWS default format. • To use a custom format, choose Custom format and then select fields from Log format. 8. (Optional) Choose Add new tag to apply tags to the flow log. 9. Choose Create flow log. To create a flow log using the command line Use one of the following commands. • create-flow-logs (AWS CLI) • New-EC2FlowLog (AWS Tools for Windows PowerShell) The following AWS CLI example creates a flow log that captures transit gateway information. The flow logs are delivered to a log group in CloudWatch Logs called my-flow-logs, in account 123456789101, using the IAM role publishFlowLogs. Create a flow log that publishes to CloudWatch Logs 126 Amazon VPC AWS Transit Gateway aws ec2 create-flow-logs --resource-type TransitGateway --resource-ids tgw-1a2b3c4d --log-group-name my-flow-logs --deliver-logs-permission-arn arn:aws:iam::123456789101:role/publishFlowLogs View Transit Gateway Flow Logs records in Amazon CloudWatch You can view your flow log records using the CloudWatch Logs console or Amazon S3 console, depending on the chosen destination type. It might take a few minutes after you've created your flow log for it to be visible in the console. To view flow log records published to CloudWatch Logs 1. Open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/. 2. In the navigation pane, choose Logs, and select the log group that contains your flow log. A list of log streams for each transit gateway is displayed. 3. Select the log stream that contains the ID of the transit gateway that you want to view the flow log records for. For more information, |
vpc-tgw-047 | vpc-tgw.pdf | 47 | or Amazon S3 console, depending on the chosen destination type. It might take a few minutes after you've created your flow log for it to be visible in the console. To view flow log records published to CloudWatch Logs 1. Open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/. 2. In the navigation pane, choose Logs, and select the log group that contains your flow log. A list of log streams for each transit gateway is displayed. 3. Select the log stream that contains the ID of the transit gateway that you want to view the flow log records for. For more information, see Transit Gateway Flow Log records. Process Transit Gateway Flow Logs records in Amazon CloudWatch Logs You can work with flow log records as you would with any other log events collected by CloudWatch Logs. For more information about monitoring log data and metric filters, see Creating metrics from log events using filters in the Amazon CloudWatch User Guide. Example: Create a CloudWatch metric filter and alarm for a flow log In this example, you have a flow log for tgw-123abc456bca. You want to create an alarm that alerts you if there have been 10 or more rejected attempts to connect to your instance over TCP port 22 (SSH) within a 1-hour time period. First, you must create a metric filter that matches the pattern of the traffic for which to create the alarm. Then, you can create an alarm for the metric filter. To create a metric filter for rejected SSH traffic and create an alarm for the filter 1. Open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/. 2. 3. 4. In the navigation pane, choose Logs, Log groups. Select the checkbox for the log group, and then choose Actions, Create metric filter. For Filter Pattern, enter the following. View flow logs records 127 Amazon VPC AWS Transit Gateway [version, resource_type, account_id,tgw_id="tgw-123abc456bca”, tgw_attachment_id, tgw_src_vpc_account_id, tgw_dst_vpc_account_id, tgw_src_vpc_id, tgw_dst_vpc_id, tgw_src_subnet_id, tgw_dst_subnet_id, tgw_src_eni, tgw_dst_eni, tgw_src_az_id, tgw_dst_az_id, tgw_pair_attachment_id, srcaddr= "10.0.0.1", dstaddr, srcport=“80”, dstport, protocol=“6”, packets, bytes,start,end, log_status, type,packets_lost_no_route, packets_lost_blackhole, packets_lost_mtu_exceeded, packets_lost_ttl_expired, tcp_flags,region, flow_direction, pkt_src_aws_service, pkt_dst_aws_service] 5. 6. For Select log data to test, select the log stream for your transit gateway. (Optional) To view the lines of log data that match the filter pattern, choose Test pattern. When you're ready, choose Next. Enter a filter name, metric namespace, and metric name. Set the metric value to 1. When you're done, choose Next and then choose Create metric filter. 7. In the navigation pane, choose Alarms, All alarms. 8. Choose Create alarm. 9. Choose the namespace for the metric filter that you created. It can take a few minutes for a new metric to display in the console. 10. Select the metric name that you created, and then choose Select metric. 11. Configure the alarm as follows, and then choose Next: • For Statistic, choose Sum. This ensure that you capture the total number of data points for the specified time period. • For Period, choose 1 hour. • For Whenever, choose Greater/Equal and enter 10 for the threshold. • For Additional configuration, Datapoints to alarm, leave the default of 1. 12. For Notification, select an existing SNS topic, or choose Create new topic to create a new one. Choose Next. 13. Enter a name and description for the alarm and choose Next. 14. When you are done configuring the alarm, choose Create alarm. Transit Gateways Flow Logs records in Amazon S3 Flow logs can publish flow log data to Amazon S3. Amazon S3 128 Amazon VPC AWS Transit Gateway When publishing to Amazon S3, flow log data is published to an existing Amazon S3 bucket that you specify. Flow log records for all of the monitored transit gateways are published to a series of log file objects that are stored in the bucket. Data ingestion and archival charges are applied by Amazon CloudWatch for vended logs when you publish flow logs to Amazon S3. For more information on CloudWatch pricing for vended logs, open Amazon CloudWatch Pricing, choose Logs, and then find Vended Logs. To create an Amazon S3 bucket for use with flow logs, see Create a bucket in the Amazon S3 User Guide. For more information about multiple account logging, see Central Logging in the AWS Solutions Library. For more information about CloudWatch Logs, see Logs sent to Amazon S3 in the Amazon CloudWatch Logs User Guide. Contents • Flow log files • IAM policy for IAM principals that publish flow logs to Amazon S3 • Amazon S3 bucket permissions for flow logs • Required key policy for use with SSE-KMS • Amazon S3 log file permissions • Create the Transit Gateway Flow Logs source account role for Amazon S3 • Create a Transit Gateway Flow Logs record that publishes to Amazon S3 • View Transit Gateway Flow Logs records in Amazon S3 |
vpc-tgw-048 | vpc-tgw.pdf | 48 | in the AWS Solutions Library. For more information about CloudWatch Logs, see Logs sent to Amazon S3 in the Amazon CloudWatch Logs User Guide. Contents • Flow log files • IAM policy for IAM principals that publish flow logs to Amazon S3 • Amazon S3 bucket permissions for flow logs • Required key policy for use with SSE-KMS • Amazon S3 log file permissions • Create the Transit Gateway Flow Logs source account role for Amazon S3 • Create a Transit Gateway Flow Logs record that publishes to Amazon S3 • View Transit Gateway Flow Logs records in Amazon S3 • Processed flow log records in Amazon S3 Flow log files VPC Flow Logs is a feature that collects flow log records, consolidates them into log files, and then publishes the log files to the Amazon S3 bucket at 5-minute intervals. Each log file contains flow log records for the IP traffic recorded in the previous five minutes. The maximum file size for a log file is 75 MB. If the log file reaches the file size limit within the 5- minute period, the flow log stops adding flow log records to it. Then it publishes the flow log to the Amazon S3 bucket, and creates a new log file. Flow log files 129 Amazon VPC AWS Transit Gateway In Amazon S3, the Last modified field for the flow log file indicates the date and time when the file was uploaded to the Amazon S3 bucket. This is later than the timestamp in the file name, and differs by the amount of time taken to upload the file to the Amazon S3 bucket. Log file format You can specify one of the following formats for the log files. Each file is compressed into a single Gzip file. • Text – Plain text. This is the default format. • Parquet – Apache Parquet is a columnar data format. Queries on data in Parquet format are 10 to 100 times faster compared to queries on data in plain text. Data in Parquet format with Gzip compression takes 20 percent less storage space than plain text with Gzip compression. Log file options You can optionally specify the following options. • Hive-compatible S3 prefixes – Enable Hive-compatible prefixes instead of importing partitions into your Hive-compatible tools. Before you run queries, use the MSCK REPAIR TABLE command. • Hourly partitions – If you have a large volume of logs and typically target queries to a specific hour, you can get faster results and save on query costs by partitioning logs on an hourly basis. Log file S3 bucket structure Log files are saved to the specified Amazon S3 bucket using a folder structure that is based on the flow log's ID, Region, creation date, and destination options. By default, the files are delivered to the following location. bucket-and-optional-prefix/AWSLogs/account_id/vpcflowlogs/region/year/month/day/ If you enable Hive-compatible S3 prefixes, the files are delivered to the following location. bucket-and-optional-prefix/AWSLogs/aws-account-id=account_id/service=vpcflowlogs/aws- region=region/year=year/month=month/day=day/ If you enable hourly partitions, the files are delivered to the following location. Flow log files 130 Amazon VPC AWS Transit Gateway bucket-and-optional-prefix/AWSLogs/account_id/vpcflowlogs/region/year/month/day/hour/ If you enable Hive-compatible partitions and partition the flow log per hour, the files are delivered to the following location. bucket-and-optional-prefix/AWSLogs/aws-account-id=account_id/service=vpcflowlogs/aws- region=region/year=year/month=month/day=day/hour=hour/ Log file names The file name of a log file is based on the flow log ID, Region, and creation date and time. File names use the following format. aws_account_id_vpcflowlogs_region_flow_log_id_YYYYMMDDTHHmmZ_hash.log.gz The following is an example of a log file for a flow log created by AWS account 123456789012, for a resource in the us-east-1 Region, on June 20, 2018 at 16:20 UTC. The file contains the flow log records with an end time between 16:20:00 and 16:24:59. 123456789012_vpcflowlogs_us-east-1_fl-1234abcd_20180620T1620Z_fe123456.log.gz IAM policy for IAM principals that publish flow logs to Amazon S3 The IAM principal that creates the flow log must have the following permissions, which are required to publish flow logs to the destination Amazon S3 bucket. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "logs:CreateLogDelivery", "logs:DeleteLogDelivery" ], "Resource": "*" } ] } IAM policy for IAM principals that publish flow logs to Amazon S3 131 Amazon VPC AWS Transit Gateway Amazon S3 bucket permissions for flow logs By default, Amazon S3 buckets and the objects they contain are private. Only the bucket owner can access the bucket and the objects stored in it. However, the bucket owner can grant access to other resources and users by writing an access policy. If the user creating the flow log owns the bucket and has PutBucketPolicy and GetBucketPolicy permissions for the bucket, we automatically attach the following policy to the bucket. This policy overwrites any existing policy attached to the bucket. Otherwise, the bucket owner must add this policy to the bucket, specifying the AWS account ID of the flow log creator, or flow log creation fails. |
vpc-tgw-049 | vpc-tgw.pdf | 49 | objects they contain are private. Only the bucket owner can access the bucket and the objects stored in it. However, the bucket owner can grant access to other resources and users by writing an access policy. If the user creating the flow log owns the bucket and has PutBucketPolicy and GetBucketPolicy permissions for the bucket, we automatically attach the following policy to the bucket. This policy overwrites any existing policy attached to the bucket. Otherwise, the bucket owner must add this policy to the bucket, specifying the AWS account ID of the flow log creator, or flow log creation fails. For more information, see Bucket policies in the Amazon Simple Storage Service User Guide. { "Version": "2012-10-17", "Statement": [ { "Sid": "AWSLogDeliveryWrite", "Effect": "Allow", "Principal": {"Service": "delivery.logs.amazonaws.com"}, "Action": "s3:PutObject", "Resource": "my-s3-arn", "Condition": { "StringEquals": { "s3:x-amz-acl": "bucket-owner-full-control", "aws:SourceAccount": account_id }, "ArnLike": { "aws:SourceArn": "arn:aws:logs:region:account_id:*" } } }, { "Sid": "AWSLogDeliveryCheck", "Effect": "Allow", "Principal": {"Service": "delivery.logs.amazonaws.com"}, "Action": ["s3:GetBucketAcl", "s3:ListBucket"], "Resource": "arn:aws:s3:::bucket_name", "Condition": { "StringEquals": { "aws:SourceAccount": account_id Amazon S3 bucket permissions for flow logs 132 Amazon VPC }, "ArnLike": { "aws:SourceArn": "arn:aws:logs:region:account_id:*" AWS Transit Gateway } } } ] } The ARN that you specify for my-s3-arn depends on whether you use Hive-compatible S3 prefixes. • Default prefixes arn:aws:s3:::bucket_name/optional_folder/AWSLogs/account_id/* • Hive-compatible S3 prefixes arn:aws:s3:::bucket_name/optional_folder/AWSLogs/aws-account-id=account_id/* As a best practice, we recommend that you grant these permissions to the log delivery service principal instead of individual AWS account ARNs. It is also a best practice to use the aws:SourceAccount and aws:SourceArn condition keys to protect against the confused deputy problem. The source account is the owner of the flow log and the source ARN is the wildcard (*) ARN of the logs service. Required key policy for use with SSE-KMS You can protect the data in your Amazon S3 bucket by enabling either Server-Side Encryption with Amazon S3-Managed Keys (SSE-S3) or Server-Side Encryption with KMS Keys (SSE-KMS). For more information, see Protecting data using server-side encryption in the Amazon S3 User Guide. With SSE-KMS, you can use either an AWS managed key or a customer managed key. With an AWS managed key, you can't use cross-account delivery. Flow logs are delivered from the log delivery account, so you must grant access for cross-account delivery. To grant cross-account access to your S3 bucket, use a customer managed key and specify the Amazon Resource Name (ARN) of the customer managed key when you enable bucket encryption. For more information, see Specifying server-side encryption with AWS KMS in the Amazon S3 User Guide. Required key policy for use with SSE-KMS 133 Amazon VPC AWS Transit Gateway When you use SSE-KMS with a customer managed key, you must add the following to the key policy for your key (not the bucket policy for your S3 bucket), so that VPC Flow Logs can write to your S3 bucket. Note Using S3 Bucket Keys allows you to save on AWS Key Management Service (AWS KMS) request costs by decreasing your requests to AWS KMS for Encrypt, GenerateDataKey, and Decrypt operations through the use of a bucket-level key. By design, subsequent requests that take advantage of this bucket-level key do not result in AWS KMS API requests or validate access against the AWS KMS key policy. { "Sid": "Allow Transit Gateway Flow Logs to use the key", "Effect": "Allow", "Principal": { "Service": [ "delivery.logs.amazonaws.com" ] }, "Action": [ "kms:Encrypt", "kms:Decrypt", "kms:ReEncrypt*", "kms:GenerateDataKey*", "kms:DescribeKey" ], "Resource": "*" } Amazon S3 log file permissions In addition to the required bucket policies, Amazon S3 uses access control lists (ACLs) to manage access to the log files created by a flow log. By default, the bucket owner has FULL_CONTROL permissions on each log file. The log delivery owner, if different from the bucket owner, has no permissions. The log delivery account has READ and WRITE permissions. For more information, see Access control list (ACL) overview in the Amazon Simple Storage Service User Guide. Amazon S3 log file permissions 134 Amazon VPC AWS Transit Gateway Create the Transit Gateway Flow Logs source account role for Amazon S3 From the source account, create the source role in the AWS Identity and Access Management console. To create the source account role 1. Sign in to the AWS Management Console and open the IAM console at https:// console.aws.amazon.com/iam/. 2. In the navigation pane, choose Policies. 3. Choose Create policy. 4. On the Create policy page, do the following: 1. Choose JSON. 2. Replace the contents of this window with the permissions policy at the start of this section. 3. Choose Next: Tags and Next: Review. 4. Enter a name for your policy and an optional description, and then choose Create policy. 5. In the navigation pane, choose Roles. 6. Choose Create role. 7. For the Trusted entity type, choose Custom trust policy. For Custom trust policy, replace "Principal": |
vpc-tgw-050 | vpc-tgw.pdf | 50 | Management Console and open the IAM console at https:// console.aws.amazon.com/iam/. 2. In the navigation pane, choose Policies. 3. Choose Create policy. 4. On the Create policy page, do the following: 1. Choose JSON. 2. Replace the contents of this window with the permissions policy at the start of this section. 3. Choose Next: Tags and Next: Review. 4. Enter a name for your policy and an optional description, and then choose Create policy. 5. In the navigation pane, choose Roles. 6. Choose Create role. 7. For the Trusted entity type, choose Custom trust policy. For Custom trust policy, replace "Principal": {}, with the following, which specifies the log delivery service. Choose Next. "Principal": { "Service": "delivery.logs.amazonaws.com" }, 8. On the Add permissions page, select the checkbox for the policy that you created earlier in this procedure, and then choose Next. 9. Enter a name for your role and optionally provide a description. 10. Choose Create role. Create the source account role 135 Amazon VPC AWS Transit Gateway Create a Transit Gateway Flow Logs record that publishes to Amazon S3 After you have created and configured your Amazon S3 bucket, you can create flow logs for transit gateways. You can create an Amazon S3 flow log using either the Amazon VPC Console or the AWS CLI. To create a transit gateway flow log that publishes to Amazon S3 using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. 3. In the navigation pane, choose Transit gateways or Transit gateway attachments. Select the checkboxes for one or more transit gateways or transit gateway attachments. 4. Choose Actions, Create flow log. 5. Configure the flow log settings. For more information, see To configure flow log settings. To configure flow log settings using the console 1. 2. For Destination, choose Send to an S3 bucket. For S3 bucket ARN, specify the Amazon Resource Name (ARN) of an existing Amazon S3 bucket. You can optionally include a subfolder. For example, to specify a subfolder named my- logs in a bucket named my-bucket, use the following ARN: arn:aws::s3:::my-bucket/my-logs/ The bucket cannot use AWSLogs as a subfolder name, as this is a reserved term. If you own the bucket, we automatically create a resource policy and attach it to the bucket. For more information, see Amazon S3 bucket permissions for flow logs. 3. For Log record format, specify the format for the flow log record. • To use the default flow log record format, choose AWS default format. • To create a custom format, choose Custom format. For Log format, choose the fields to include in the flow log record. 4. For Log file format, specify the format for the log file. • Text – Plain text. This is the default format. Create a flow log that publishes to Amazon S3 136 Amazon VPC AWS Transit Gateway • Parquet – Apache Parquet is a columnar data format. Queries on data in Parquet format are 10 to 100 times faster compared to queries on data in plain text. Data in Parquet format with Gzip compression takes 20 percent less storage space than plain text with Gzip compression. 5. 6. 7. (Optional) To use Hive-compatible S3 prefixes, choose Hive-compatible S3 prefix, Enable. (Optional) To partition your flow logs per hour, choose Every 1 hour (60 mins). (Optional) To add a tag to the flow log, choose Add new tag and specify the tag key and value. 8. Choose Create flow log. To create a flow log that publishes to Amazon S3 using a command line tool Use one of the following commands. • create-flow-logs (AWS CLI) • New-EC2FlowLog (AWS Tools for Windows PowerShell) The following AWS CLI example creates a flow log that captures all transit gateway traffic for VPC tgw-00112233344556677 and delivers the flow logs to an Amazon S3 bucket called flow-log- bucket. The --log-format parameter specifies a custom format for the flow log records. aws ec2 create-flow-logs --resource-type TransitGateway --resource-ids tgw-00112233344556677 --log-destination-type s3 --log-destination arn:aws:s3:::flow- log-bucket/my-custom-flow-logs/' View Transit Gateway Flow Logs records in Amazon S3 To view flow log records published to Amazon S3 1. Open the Amazon S3 console at https://console.aws.amazon.com/s3/. 2. 3. For Bucket name, select the bucket to which the flow logs are published. For Name, select the checkbox next to the log file. On the object overview panel, choose Download. View flow logs records 137 Amazon VPC AWS Transit Gateway Processed flow log records in Amazon S3 The log files are compressed. If you open the log files using the Amazon S3 console, they are decompressed and the flow log records are displayed. If you download the files, you must decompress them to view the flow log records. Transit Gateway Flow Logs records in Amazon Data Firehose Topics • IAM roles for cross account delivery • Create the Transit Gateway Flow |
vpc-tgw-051 | vpc-tgw.pdf | 51 | are published. For Name, select the checkbox next to the log file. On the object overview panel, choose Download. View flow logs records 137 Amazon VPC AWS Transit Gateway Processed flow log records in Amazon S3 The log files are compressed. If you open the log files using the Amazon S3 console, they are decompressed and the flow log records are displayed. If you download the files, you must decompress them to view the flow log records. Transit Gateway Flow Logs records in Amazon Data Firehose Topics • IAM roles for cross account delivery • Create the Transit Gateway Flow Logs source account role for Amazon Data Firehose • Create the Transit Gateway Flow Logs destination account role for Amazon Data Firehose • Create a Transit Gateway Flow Logs record that publishes to Amazon Data Firehose Flow logs can publish flow log data directly to Firehose. You can choose to publish flow logs to the same account as the resource monitor or to a different account. Prerequisities When publishing to Firehose, flow log data is published to a Firehose delivery stream, in plain text format. You must first have created a Firehose delivery stream. For the steps to create a delivery stream, see Creating an Amazon Data Firehose Delivery Stream in the Amazon Data Firehose Developer Guide. Pricing Standard ingestion and delivery charges apply. For more information, open Amazon CloudWatch Pricing, select Logs and find Vended Logs. IAM roles for cross account delivery When you publish to Kinesis Data Firehose, you can choose a delivery stream that's in the same account as the resource to monitor (the source account), or in a different account (the destination account). To enable cross account delivery of flow logs to Firehose, you must create an IAM role in the source account and an IAM role in the destination account. Roles • Source account role Processed flow log records in Amazon S3 138 Amazon VPC • Destination account role Source account role AWS Transit Gateway In the source account, create a role that grants the following permissions. In this example, the name of the role is mySourceRole, but you can choose a different name for this role. The last statement allows the role in the destination account to assume this role. The condition statements ensure that this role is passed only to the log delivery service, and only when monitoring the specified resource. When you create your policy, specify the VPCs, network interfaces, or subnets that you're monitoring with the condition key iam:AssociatedResourceARN. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "iam:PassRole", "Resource": "arn:aws:iam::source-account:role/mySourceRole", "Condition": { "StringEquals": { "iam:PassedToService": "delivery.logs.amazonaws.com" }, "StringLike": { "iam:AssociatedResourceARN": [ "arn:aws:ec2:region:source-account:transit-gateway/ tgw-0fb8421e2da853bf" ] } } }, { "Effect": "Allow", "Action": [ "logs:CreateLogDelivery", "logs:DeleteLogDelivery", "logs:ListLogDeliveries", "logs:GetLogDelivery" ], "Resource": "*" }, { "Effect": "Allow", IAM roles for cross account delivery 139 Amazon VPC AWS Transit Gateway "Action": "sts:AssumeRole", "Resource": "arn:aws:iam::destination-account:role/ AWSLogDeliveryFirehoseCrossAccountRole" } ] } Ensure that this role has the following trust policy, which allows the log delivery service to assume the role. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": "delivery.logs.amazonaws.com" }, "Action": "sts:AssumeRole" } ] } Destination account role In the destination account, create a role with a name that starts with AWSLogDeliveryFirehoseCrossAccountRole. This role must grant the following permissions. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "iam:CreateServiceLinkedRole", "firehose:TagDeliveryStream" ], "Resource": "*" } ] } IAM roles for cross account delivery 140 Amazon VPC AWS Transit Gateway Ensure that this role has the following trust policy, which allows the role that you created in the source account to assume this role. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::source-account:role/mySourceRole" }, "Action": "sts:AssumeRole" } ] } Create the Transit Gateway Flow Logs source account role for Amazon Data Firehose From the source account, create the source role in the AWS Identity and Access Management console. To create the source account role 1. Sign in to the AWS Management Console and open the IAM console at https:// console.aws.amazon.com/iam/. 2. In the navigation pane, choose Policies. 3. Choose Create policy. 4. On the Create policy page, do the following: 1. Choose JSON. 2. Replace the contents of this window with the permissions policy at the start of this section. 3. Choose Next: Tags and Next: Review. 4. Enter a name for your policy and an optional description, and then choose Create policy. 5. In the navigation pane, choose Roles. 6. Choose Create role. 7. For the Trusted entity type, choose Custom trust policy. For Custom trust policy, replace "Principal": {}, with the following, which specifies the log delivery service. Choose Next. Create the source account role 141 Amazon VPC AWS Transit Gateway "Principal": { "Service": "delivery.logs.amazonaws.com" }, 8. On the Add permissions page, select the checkbox for the policy that you created |
vpc-tgw-052 | vpc-tgw.pdf | 52 | policy at the start of this section. 3. Choose Next: Tags and Next: Review. 4. Enter a name for your policy and an optional description, and then choose Create policy. 5. In the navigation pane, choose Roles. 6. Choose Create role. 7. For the Trusted entity type, choose Custom trust policy. For Custom trust policy, replace "Principal": {}, with the following, which specifies the log delivery service. Choose Next. Create the source account role 141 Amazon VPC AWS Transit Gateway "Principal": { "Service": "delivery.logs.amazonaws.com" }, 8. On the Add permissions page, select the checkbox for the policy that you created earlier in this procedure, and then choose Next. 9. Enter a name for your role and optionally provide a description. 10. Choose Create role. Create the Transit Gateway Flow Logs destination account role for Amazon Data Firehose From the destination account, create the destination role in the AWS Identity and Access Management console. To create the destination account role 1. Sign in to the AWS Management Console and open the IAM console at https:// console.aws.amazon.com/iam/. 2. In the navigation pane, choose Policies. 3. Choose Create policy. 4. On the Create policy page, do the following: 1. Choose JSON. 2. Replace the contents of this window with the permissions policy at the start of this section. 3. Choose Next: Tags and Next: Review. 4. Enter a name for your policy that starts with AWSLogDeliveryFirehoseCrossAccountRole, and then choose Create policy. 5. In the navigation pane, choose Roles. 6. Choose Create role. 7. For the Trusted entity type, choose Custom trust policy. For Custom trust policy, replace "Principal": {}, with the following, which specifies the log delivery service. Choose Next. "Principal": { "AWS": "arn:aws:iam::source-account:role/mySourceRole" Create the destination account role 142 Amazon VPC }, AWS Transit Gateway 8. On the Add permissions page, select the checkbox for the policy that you created earlier in this procedure, and then choose Next. 9. Enter a name for your role and optionally provide a description. 10. Choose Create role. Create a Transit Gateway Flow Logs record that publishes to Amazon Data Firehose Create a Transit Gateway Flow Log that publishes to Amazon Data Firehose. Before you can create the flow log, ensure that you've set up the source and destination IAM account roles for cross- account delivery and that you've created the Firehose delivery stream. See Amazon Data Firehose flow logs for more information. You can create a Firehose flow log using either the Amazon VPC Console or the AWS CLI. To create a transit gateway flow log that publishes to Firehose using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. 3. In the navigation pane, choose Transit gateways or Transit gateway attachments. Select the checkboxes for one or more transit gateways or transit gateway attachments. 4. Choose Actions, Create flow log. 5. 6. For Destination choose Send to a Firehose Delivery System. For the Firehose Delivery Stream ARN, choose the ARN of a delivery stream you created where the flow log is to be published. 7. For Log record format, specify the format for the flow log record. • To use the default flow log record format, choose AWS default format. • To create a custom format, choose Custom format. For Log format, choose the fields to include in the flow log record. 8. (Optional) To add a tag to the flow log, choose Add new tag and specify the tag key and value. 9. Choose Create flow log. Create a flow log that publishes to Firehose 143 Amazon VPC AWS Transit Gateway To create a flow log that publishes to Firehose using the command line tool Use one of the following commands: • create-flow-logs (AWS CLI) • New-EC2FlowLog (AWS Tools for Windows PowerShell) The following AWS CLI example creates a flow log that captures transit gateway information and delivers the flow log to the specified Firehose delivery stream. aws ec2 create-flow-logs \ --resource-type TransitGateway \ --resource-ids tgw-1a2b3c4d \ --log-destination-type kinesis-data-firehose \ --log-destination arn:aws:firehose:us- east-1:123456789012:deliverystream:flowlogs_stream The following AWS CLI example creates a flow log that captures transit gateway information and delivers the flow log to a different Firehose delivery stream from the source account. aws ec2 create-flow-logs \ --resource-type TransitGateway \ --resource-ids gw-1a2b3c4d \ --log-destination-type kinesis-data-firehose \ --log-destination arn:aws:firehose:us- east-1:123456789012:deliverystream:flowlogs_stream \ --deliver-logs-permission-arn arn:aws:iam::source-account:role/mySourceRole \ --deliver-cross-account-role arn:aws:iam::destination-account:role/ AWSLogDeliveryFirehoseCrossAccountRole Create and manage Amazon VPC Transit Gateways Flow Logs using APIs or the CLI You can perform the tasks described on this page using the command line. The following limitations apply when using the create-flow-logs command: • --resource-ids has a maximum constraint of 25 TransitGateway or TransitGatewayAttachment resource types. Create and manage flow logs using the APIs or CLI 144 Amazon VPC AWS Transit Gateway • --traffic-type is not a required field by default. An error is returned if you provide this for transit gateway resource |
vpc-tgw-053 | vpc-tgw.pdf | 53 | \ --log-destination-type kinesis-data-firehose \ --log-destination arn:aws:firehose:us- east-1:123456789012:deliverystream:flowlogs_stream \ --deliver-logs-permission-arn arn:aws:iam::source-account:role/mySourceRole \ --deliver-cross-account-role arn:aws:iam::destination-account:role/ AWSLogDeliveryFirehoseCrossAccountRole Create and manage Amazon VPC Transit Gateways Flow Logs using APIs or the CLI You can perform the tasks described on this page using the command line. The following limitations apply when using the create-flow-logs command: • --resource-ids has a maximum constraint of 25 TransitGateway or TransitGatewayAttachment resource types. Create and manage flow logs using the APIs or CLI 144 Amazon VPC AWS Transit Gateway • --traffic-type is not a required field by default. An error is returned if you provide this for transit gateway resource types. This limit applies only to transit gateway resource types. • --max-aggregation-interval has a default value of 60, and is the only accepted value for transit gateway resource types. An error is returned if you try to pass any other value. This limit applies only to transit gateway resource types. • --resource-type supports two new resource types, TransitGateway and TransitGatewayAttachment. • --log-format includes all log fields for transit gateway resource types if you do not set which fields you want to include. This applies only to transit gateway resource types. Create a flow log • create-flow-logs (AWS CLI) • New-EC2FlowLog (AWS Tools for Windows PowerShell) Describe your flow logs • describe-flow-logs (AWS CLI) • Get-EC2FlowLog (AWS Tools for Windows PowerShell) View your flow log records (log events) • get-log-events (AWS CLI) • Get-CWLLogEvent (AWS Tools for Windows PowerShell) Delete a flow log • delete-flow-logs (AWS CLI) • Remove-EC2FlowLog (AWS Tools for Windows PowerShell) View Amazon VPC Transit Gateways Flow Logs records View information about your transit gateway flow logs through the Amazon VPC. When you choose a resource, all of the flow logs for that resource are listed. The information displayed includes the ID of the flow log, the flow log configuration, and information about the status of the flow log. View flow logs 145 Amazon VPC AWS Transit Gateway To view information about flow logs for transit gateways 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. 3. In the navigation pane, choose Transit gateways or Transit gateway attachments. Select a transit gateway or transit gateway attachment and choose Flow Logs. Information about the flow logs is displayed on the tab. The Destination type column indicates the destination to which the flow logs are published. Manage Amazon VPC Transit Gateways Flow Logs tags You can add or remove tags for a flow log in the Amazon EC2 and Amazon VPC consoles. To add or remove tags for a transit gateway flow log 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. 3. In the navigation pane, choose Transit gateways or Transit gateway attachments. Select a transit gateway or transit gateway attachment 4. Choose Manage tags for the required flow log. 5. To add a new tag, choose Create Tag. To remove a tag, choose the delete button (x). 6. Choose Save. Search Amazon VPC Transit Gateways Flow Logs records You can search your flow log records that are published to CloudWatch Logs by using the CloudWatch Logs console. You can use metric filters to filter flow log records. Flow log records are space delimited. To search flow log records using the CloudWatch Logs console 1. Open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/. 2. 3. 4. In the navigation pane, choose Logs, and then choose Log groups. Select the log group that contains your flow log. A list of log streams for each transit gateway is displayed. Select the individual log stream if you know the transit gateway that you are searching for. Alternatively, choose Search Log Group to search the entire log group. This might take some Manage flow log tags 146 Amazon VPC AWS Transit Gateway time if there are many transit gateways in your log group, or depending on the time range that you select. 5. For Filter events, enter the following string. This assumes that the flow log record uses the default format. [version, resource_type, account_id,tgw_id, tgw_attachment_id, tgw_src_vpc_account_id, tgw_dst_vpc_account_id, tgw_src_vpc_id, tgw_dst_vpc_id, tgw_src_subnet_id, tgw_dst_subnet_id, tgw_src_eni, tgw_dst_eni, tgw_src_az_id, tgw_dst_az_id, tgw_pair_attachment_id, srcaddr, dstaddr, srcport, dstport, protocol, packets, bytes,start,end, log_status, type,packets_lost_no_route, packets_lost_blackhole, packets_lost_mtu_exceeded, packets_lost_ttl_expired, tcp_flags,region, flow_direction, pkt_src_aws_service, pkt_dst_aws_service] 6. Modify the filter as needed by specifying values for the fields. The following examples filter by specific source IP addresses. [version, resource_type, account_id,tgw_id, tgw_attachment_id, tgw_src_vpc_account_id, tgw_dst_vpc_account_id, tgw_src_vpc_id, tgw_dst_vpc_id, tgw_src_subnet_id, tgw_dst_subnet_id, tgw_src_eni, tgw_dst_eni, tgw_src_az_id, tgw_dst_az_id, tgw_pair_attachment_id, srcaddr= 10.0.0.1, dstaddr, srcport, dstport, protocol, packets, bytes,start,end, log_status, type,packets_lost_no_route, packets_lost_blackhole, packets_lost_mtu_exceeded, packets_lost_ttl_expired, tcp_flags,region, flow_direction, pkt_src_aws_service, pkt_dst_aws_service] [version, resource_type, account_id,tgw_id, tgw_attachment_id, tgw_src_vpc_account_id, tgw_dst_vpc_account_id, tgw_src_vpc_id, tgw_dst_vpc_id, tgw_src_subnet_id, tgw_dst_subnet_id, tgw_src_eni, tgw_dst_eni, tgw_src_az_id, tgw_dst_az_id, tgw_pair_attachment_id, srcaddr= 10.0.2.*, dstaddr, srcport, dstport, protocol, packets, bytes,start,end, log_status, type,packets_lost_no_route, packets_lost_blackhole, packets_lost_mtu_exceeded, packets_lost_ttl_expired, tcp_flags,region, flow_direction, pkt_src_aws_service, pkt_dst_aws_service] The following example filters by transit gateway ID tgw-123abc456bca, destination port, and number of bytes. [version, resource_type, account_id,tgw_id=tgw-123abc456bca, tgw_attachment_id, tgw_src_vpc_account_id, tgw_dst_vpc_account_id, tgw_src_vpc_id, tgw_dst_vpc_id, tgw_src_subnet_id, tgw_dst_subnet_id, tgw_src_eni, tgw_dst_eni, tgw_src_az_id, |
vpc-tgw-054 | vpc-tgw.pdf | 54 | following examples filter by specific source IP addresses. [version, resource_type, account_id,tgw_id, tgw_attachment_id, tgw_src_vpc_account_id, tgw_dst_vpc_account_id, tgw_src_vpc_id, tgw_dst_vpc_id, tgw_src_subnet_id, tgw_dst_subnet_id, tgw_src_eni, tgw_dst_eni, tgw_src_az_id, tgw_dst_az_id, tgw_pair_attachment_id, srcaddr= 10.0.0.1, dstaddr, srcport, dstport, protocol, packets, bytes,start,end, log_status, type,packets_lost_no_route, packets_lost_blackhole, packets_lost_mtu_exceeded, packets_lost_ttl_expired, tcp_flags,region, flow_direction, pkt_src_aws_service, pkt_dst_aws_service] [version, resource_type, account_id,tgw_id, tgw_attachment_id, tgw_src_vpc_account_id, tgw_dst_vpc_account_id, tgw_src_vpc_id, tgw_dst_vpc_id, tgw_src_subnet_id, tgw_dst_subnet_id, tgw_src_eni, tgw_dst_eni, tgw_src_az_id, tgw_dst_az_id, tgw_pair_attachment_id, srcaddr= 10.0.2.*, dstaddr, srcport, dstport, protocol, packets, bytes,start,end, log_status, type,packets_lost_no_route, packets_lost_blackhole, packets_lost_mtu_exceeded, packets_lost_ttl_expired, tcp_flags,region, flow_direction, pkt_src_aws_service, pkt_dst_aws_service] The following example filters by transit gateway ID tgw-123abc456bca, destination port, and number of bytes. [version, resource_type, account_id,tgw_id=tgw-123abc456bca, tgw_attachment_id, tgw_src_vpc_account_id, tgw_dst_vpc_account_id, tgw_src_vpc_id, tgw_dst_vpc_id, tgw_src_subnet_id, tgw_dst_subnet_id, tgw_src_eni, tgw_dst_eni, tgw_src_az_id, tgw_dst_az_id, tgw_pair_attachment_id, srcaddr, dstaddr, srcport, dstport = 80 || dstport = 8080, protocol, packets, bytes >= 500,start,end, log_status, Search flow log records 147 Amazon VPC AWS Transit Gateway type,packets_lost_no_route, packets_lost_blackhole, packets_lost_mtu_exceeded, packets_lost_ttl_expired, tcp_flags,region, flow_direction, pkt_src_aws_service, pkt_dst_aws_service] Delete an Amazon VPC Transit Gateways Flow Logs record You can delete a transit gateway flow log using the Amazon VPC console. These procedures disable the flow log service for a resource. Deleting a flow log does not delete the existing log streams from CloudWatch Logs or log files from Amazon S3. Existing flow log data must be deleted using the respective service's console. In addition, deleting a flow log that publishes to Amazon S3 does not remove the bucket policies and log file access control lists (ACLs). To delete a transit gateway flow log 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. In the navigation pane, choose Transit gateways. 3. Choose a Transit gateway ID. 4. In the Flow logs section, choose the flow logs that you want to delete. 5. Choose Actions, and then choose Delete flow logs. 6. Confirm that you want to delete the flow by choosing Delete. Delete a flow log record 148 Amazon VPC AWS Transit Gateway Metrics and events in Amazon VPC Transit Gateways You can use the following features to monitor your transit gateways, analyze traffic patterns, and troubleshoot issues with your transit gateways. CloudWatch metrics You can use Amazon CloudWatch to retrieve statistics about data points for your transit gateways as an ordered set of time series data, known as metrics. You can use these metrics to verify that your system is performing as expected. For more information, see CloudWatch metrics in Amazon VPC Transit Gateways. Transit Gateway Flow Logs You can use Transit Gateway Flow Logs to capture detailed information about the network traffic on your transit gateways. For more information, see Transit Gateway Flow Logs. VPC Flow Logs You can use VPC Flow Logs to capture detailed information about the traffic going to and from the VPCs that are attached to your transit gateways. For more information, see VPC Flow Logs in the Amazon VPC User Guide. CloudTrail logs You can use AWS CloudTrail to capture detailed information about the calls made to the transit gateway API and store them as log files in Amazon S3. You can use these CloudTrail logs to determine which calls were made, the source IP address where the call came from, who made the call, when the call was made, and so on. For more information, see CloudTrail logs. CloudWatch Events using Network Manager You can use AWS Network Manager to forward events to CloudWatch, and then route those events to target functions or streams. Network Manager generates events for topology changes, routing updates, and status updates, all of which can be used to alert you to changes in your transit gateways. For more information, see Monitoring your global network with CloudWatch Events in the AWS Global Networks for Transit Gateways User Guide. 149 Amazon VPC AWS Transit Gateway CloudWatch metrics in Amazon VPC Transit Gateways Amazon VPC publishes data points to Amazon CloudWatch for your transit gateways and transit gateway attachments. CloudWatch enables you to retrieve statistics about those data points as an ordered set of time series data, known as metrics. Think of a metric as a variable to monitor, and the data points as the values of that variable over time. Each data point has an associated timestamp and an optional unit of measurement. You can use metrics to verify that your system is performing as expected. For example, you can create a CloudWatch alarm to monitor a specified metric and initiate an action (such as sending a notification to an email address) if the metric goes outside what you consider an acceptable range. Amazon VPC measures and sends its metrics to CloudWatch in 60-second intervals. For more information, see the Amazon CloudWatch User Guide. Contents • Transit gateway metrics • Attachment-level and availability zone metrics • Transit gateway metric dimensions Transit gateway metrics The AWS/TransitGateway namespace includes the following metrics. All metrics are always reported. Their values are dependent on the traffic through the transit gateway. See Transit gateway metric dimensions for |
vpc-tgw-055 | vpc-tgw.pdf | 55 | CloudWatch alarm to monitor a specified metric and initiate an action (such as sending a notification to an email address) if the metric goes outside what you consider an acceptable range. Amazon VPC measures and sends its metrics to CloudWatch in 60-second intervals. For more information, see the Amazon CloudWatch User Guide. Contents • Transit gateway metrics • Attachment-level and availability zone metrics • Transit gateway metric dimensions Transit gateway metrics The AWS/TransitGateway namespace includes the following metrics. All metrics are always reported. Their values are dependent on the traffic through the transit gateway. See Transit gateway metric dimensions for the supported dimensions. Metric Description BytesDropCountBlac The number of bytes dropped because they matched a blackhole khole route. Statistics: The only meaningful statistic is Sum. BytesDropCountNoRo The number of bytes dropped because they did not match a route. ute CloudWatch metrics 150 Amazon VPC Metric Description Statistics: The only meaningful statistic is Sum. AWS Transit Gateway BytesIn The number of bytes received by the transit gateway. Statistics: The only meaningful statistic is Sum. BytesOut The number of bytes sent from the transit gateway. Statistics: The only meaningful statistic is Sum. PacketsIn The number of packets received by the transit gateway. Statistics: The only meaningful statistic is Sum. PacketsOut The number of packets sent by the transit gateway. Statistics: The only meaningful statistic is Sum. PacketDropCountBla The number of packets dropped because they matched a ckhole blackhole route. Statistics: The only meaningful statistic is Sum. PacketDropCountNoR oute The number of packets dropped because they did not match a route. Statistics: The only meaningful statistic is Sum. PacketDropCountTTL The number of packets dropped because the TTL expired. Expired Statistics: The only meaningful statistic is Sum. Attachment-level and availability zone metrics The following metrics are available for transit gateway attachments. All attachment metrics are published to the transit gateway owner's account. Individual attachment metrics are also published to the attachment owner's account. The attachment owner can view only the metrics for their own attachment. For more information on the supported attachment types, see the section called “Resource attachments”. Attachment-level and availability zone metrics 151 Amazon VPC AWS Transit Gateway Availability zone metrics are available for enabled for availabilty zones (AZs) on transit gateway attachments. Only VPC attachments support per-AZ metrics. All AZ-level metrics are published to the transit gateway owner's account. Individual AZ metrics for an attachment are also published to the attachment owner's account. The attachment owner can view only the per-AZ metrics for their own attachment. All metrics are always reported. Their values are dependent on the traffic in and/or out of the transit gateway attachment. See Transit gateway metric dimensions for the supported dimensions. Metric Description BytesDropCountBlac The number of bytes dropped because they matched a blackhole khole route on the transit gateway attachment. Statistics: The only meaningful statistic is Sum. BytesDropCountNoRo ute The number of bytes dropped because they did not match a route on the transit gateway attachment. BytesIn BytesOut Statistics: The only meaningful statistic is Sum. The number of bytes received by the transit gateway from the attachment. Statistics: The only meaningful statistic is Sum. The number of bytes sent from the transit gateway to the attachment. Statistics: The only meaningful statistic is Sum. PacketsIn The number of packets received by the transit gateway from the attachment. Statistics: The only meaningful statistic is Sum. PacketsOut The number of packets sent by the transit gateway to the attachment. Statistics: The only meaningful statistic is Sum. Attachment-level and availability zone metrics 152 Amazon VPC Metric Description AWS Transit Gateway PacketDropCountBla The number of packets dropped because they matched a ckhole blackhole route on the transit gateway attachment. Statistics: The only meaningful statistic is Sum. PacketDropCountNoR oute The number of packets dropped because they did not match a route. Statistics: The only meaningful statistic is Sum. PacketDropCountTTL The number of packets dropped because the TTL expired. Expired Statistics: The only meaningful statistic is Sum. Transit gateway metric dimensions Filter transit gateway metric data using the following dimensions: Dimension Description TransitGateway Filters the metric data by transit gateway. Filters the metric data by transit gateway attachment. Filters the metric data by both transit gateway and availability zone. Filters the metric data by both transit gateway attachment and availability zone. TransitGa tewayAtta chment TransitGa teway , Availabil ityZone TransitGa tewayAtta chment , Availabil ityZone Transit gateway metric dimensions 153 Amazon VPC AWS Transit Gateway Log Amazon VPC Transit Gateways API calls using AWS CloudTrail Amazon VPC Transit Gateways is integrated with AWS CloudTrail, a service that provides a record of actions taken by a user, role, or an AWS service. CloudTrail captures all API calls for Transit Gateway as events. The calls captured include calls from the Transit Gateway console and code calls to the Transit Gateway API operations. Using the information |
vpc-tgw-056 | vpc-tgw.pdf | 56 | by both transit gateway attachment and availability zone. TransitGa tewayAtta chment TransitGa teway , Availabil ityZone TransitGa tewayAtta chment , Availabil ityZone Transit gateway metric dimensions 153 Amazon VPC AWS Transit Gateway Log Amazon VPC Transit Gateways API calls using AWS CloudTrail Amazon VPC Transit Gateways is integrated with AWS CloudTrail, a service that provides a record of actions taken by a user, role, or an AWS service. CloudTrail captures all API calls for Transit Gateway as events. The calls captured include calls from the Transit Gateway console and code calls to the Transit Gateway API operations. Using the information collected by CloudTrail, you can determine the request that was made to Transit Gateway, the IP address from which the request was made, when it was made, and additional details. Every event or log entry contains information about who generated the request. The identity information helps you determine the following: • Whether the request was made with root user or user credentials. • Whether the request was made on behalf of an IAM Identity Center user. • Whether the request was made with temporary security credentials for a role or federated user. • Whether the request was made by another AWS service. CloudTrail is active in your AWS account when you create the account and you automatically have access to the CloudTrail Event history. The CloudTrail Event history provides a viewable, searchable, downloadable, and immutable record of the past 90 days of recorded management events in an AWS Region. For more information, see Working with CloudTrail Event history in the AWS CloudTrail User Guide. There are no CloudTrail charges for viewing the Event history. For an ongoing record of events in your AWS account past 90 days, create a trail or a CloudTrail Lake event data store. CloudTrail trails A trail enables CloudTrail to deliver log files to an Amazon S3 bucket. All trails created using the AWS Management Console are multi-Region. You can create a single-Region or a multi-Region trail by using the AWS CLI. Creating a multi-Region trail is recommended because you capture activity in all AWS Regions in your account. If you create a single-Region trail, you can view only the events logged in the trail's AWS Region. For more information about trails, see Creating a trail for your AWS account and Creating a trail for an organization in the AWS CloudTrail User Guide. CloudTrail logs 154 Amazon VPC AWS Transit Gateway You can deliver one copy of your ongoing management events to your Amazon S3 bucket at no charge from CloudTrail by creating a trail, however, there are Amazon S3 storage charges. For more information about CloudTrail pricing, see AWS CloudTrail Pricing. For information about Amazon S3 pricing, see Amazon S3 Pricing. CloudTrail Lake event data stores CloudTrail Lake lets you run SQL-based queries on your events. CloudTrail Lake converts existing events in row-based JSON format to Apache ORC format. ORC is a columnar storage format that is optimized for fast retrieval of data. Events are aggregated into event data stores, which are immutable collections of events based on criteria that you select by applying advanced event selectors. The selectors that you apply to an event data store control which events persist and are available for you to query. For more information about CloudTrail Lake, see Working with AWS CloudTrail Lake in the AWS CloudTrail User Guide. CloudTrail Lake event data stores and queries incur costs. When you create an event data store, you choose the pricing option you want to use for the event data store. The pricing option determines the cost for ingesting and storing events, and the default and maximum retention period for the event data store. For more information about CloudTrail pricing, see AWS CloudTrail Pricing. Transit Gateway management events Management events provide information about management operations that are performed on resources in your AWS account. These are also known as control plane operations. By default, CloudTrail logs management events. Amazon VPC Transit Gateways logs all Transit Gateway control plane operations as management events. For a list of the Amazon VPC Transit Gateways control plane operations that Transit Gateway logs to CloudTrail, see the Amazon VPC Transit Gateways API Reference. Transit Gateway event examples An event represents a single request from any source and includes information about the requested API operation, the date and time of the operation, request parameters, and so on. CloudTrail log files aren't an ordered stack trace of the public API calls, so events don't appear in any specific order. A trail is a configuration that enables delivery of events as log files to an Amazon S3 bucket that you specify. CloudTrail log files contain one or more log entries. An event represents a single Management events 155 Amazon VPC AWS Transit Gateway request from any source and |
vpc-tgw-057 | vpc-tgw.pdf | 57 | event examples An event represents a single request from any source and includes information about the requested API operation, the date and time of the operation, request parameters, and so on. CloudTrail log files aren't an ordered stack trace of the public API calls, so events don't appear in any specific order. A trail is a configuration that enables delivery of events as log files to an Amazon S3 bucket that you specify. CloudTrail log files contain one or more log entries. An event represents a single Management events 155 Amazon VPC AWS Transit Gateway request from any source and includes information about the requested action, the date and time of the action, request parameters, and so on. CloudTrail log files aren't an ordered stack trace of the public API calls, so they don't appear in any specific order. The log files include events for all API calls for your AWS account, not just transit gateway API calls. You can locate calls to the transit gateway API by checking for eventSource elements with the value ec2.amazonaws.com. To view a record for a specific action, such as CreateTransitGateway, check for eventName elements with the action name. The following is an example CloudTrail log record for the transit gateway API for a user who created a transit gateway using the console. You can identify the console using the userAgent element. You can identify the requested API call using the eventName elements. Information about the user (Alice) can be found in the userIdentity element. Example Example: CreateTransitGateway { "eventVersion": "1.05", "userIdentity": { "type": "IAMUser", "principalId": "123456789012", "arn": "arn:aws:iam::123456789012:user/Alice", "accountId": "123456789012", "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "userName": "Alice" }, "eventTime": "2018-11-15T05:25:50Z", "eventSource": "ec2.amazonaws.com", "eventName": "CreateTransitGateway", "awsRegion": "us-west-2", "sourceIPAddress": "198.51.100.1", "userAgent": "console.ec2.amazonaws.com", "requestParameters": { "CreateTransitGatewayRequest": { "Options": { "DefaultRouteTablePropagation": "enable", "AutoAcceptSharedAttachments": "disable", "DefaultRouteTableAssociation": "enable", "VpnEcmpSupport": "enable", "DnsSupport": "enable" }, "TagSpecification": { Event examples 156 Amazon VPC AWS Transit Gateway "ResourceType": "transit-gateway", "tag": 1, "Tag": { "Value": "my-tgw", "tag": 1, "Key": "Name" } } } }, "responseElements": { "CreateTransitGatewayResponse": { "xmlns": "http://ec2.amazonaws.com/doc/2016-11-15/", "requestId": "a07c1edf-c201-4e44-bffb-3ce90EXAMPLE", "transitGateway": { "tagSet": { "item": { "value": "my-tgw", "key": "Name" } }, "creationTime": "2018-11-15T05:25:50.000Z", "transitGatewayId": "tgw-0a13743bd6c1f5fcb", "options": { "propagationDefaultRouteTableId": "tgw-rtb-0123cd602be10b00a", "amazonSideAsn": 64512, "defaultRouteTablePropagation": "enable", "vpnEcmpSupport": "enable", "autoAcceptSharedAttachments": "disable", "defaultRouteTableAssociation": "enable", "dnsSupport": "enable", "associationDefaultRouteTableId": "tgw-rtb-0123cd602be10b00a" }, "state": "pending", "ownerId": 123456789012 } } }, "requestID": "a07c1edf-c201-4e44-bffb-3ce90EXAMPLE", "eventID": "e8fa575f-4964-4ab9-8ca4-6b5b4EXAMPLE", "eventType": "AwsApiCall", "recipientAccountId": "123456789012" } Event examples 157 Amazon VPC AWS Transit Gateway Identity and access management in Amazon VPC Transit Gateways AWS uses security credentials to identify you and to grant you access to your AWS resources. You can use features of AWS Identity and Access Management (IAM) to allow other users, services, and applications to use your AWS resources fully or in a limited way, without sharing your security credentials. By default, IAM users don't have permission to create, view, or modify AWS resources. To allow a user to access resources such as a transit gateway, and to perform tasks, you must create an IAM policy that grants the user permission to use the specific resources and API actions they'll need, then attach the policy to the group to which that user belongs. When you attach a policy to a user or group of users, it allows or denies the users permission to perform the specified tasks on the specified resources. To work with a transit gateway, one of the following AWS managed policies might meet your needs: • AmazonEC2FullAccess • AmazonEC2ReadOnlyAccess • PowerUserAccess • ReadOnlyAccess Example policies to manage transit gateways The following are example IAM policies for working with transit gateways. Create a transit gateway with required tags The following example enables users to create transit gateway. The aws:RequestTag condition key requires users to tag the transit gateway with the tag stack=prod. The aws:TagKeys condition key uses the ForAllValues modifier to indicate that only the key stack is allowed in the request (no other tags can be specified). If users don't pass this specific tag when they create the transit gateway, or if they don't specify tags at all, the request fails. The second statement uses the ec2:CreateAction condition key to allow users to create tags only in the context of CreateTransitGateway. Example policies to manage transit gateways 158 Amazon VPC AWS Transit Gateway { "Version": "2012-10-17", "Statement": [ { "Sid": "AllowCreateTaggedTGWs", "Effect": "Allow", "Action": "ec2:CreateTransitGateway", "Resource": "arn:aws:ec2:region:account-id:transit-gateway/*", "Condition": { "StringEquals": { "aws:RequestTag/stack": "prod" }, "ForAllValues:StringEquals": { "aws:TagKeys": [ "stack" ] } } }, { "Effect": "Allow", "Action": [ "ec2:CreateTags" ], "Resource": "arn:aws:ec2:region:account-id:transit-gateway/*", "Condition": { "StringEquals": { "ec2:CreateAction": "CreateTransitGateway" } } } ] } Working with transit gateway route tables The following example enables users to create and delete transit gateway route tables for a specific transit gateway only (tgw-11223344556677889). Users can also create and replace routes in any transit gateway route table, but only for attachments that have the tag network=new- york-office. { Example |
vpc-tgw-058 | vpc-tgw.pdf | 58 | "Version": "2012-10-17", "Statement": [ { "Sid": "AllowCreateTaggedTGWs", "Effect": "Allow", "Action": "ec2:CreateTransitGateway", "Resource": "arn:aws:ec2:region:account-id:transit-gateway/*", "Condition": { "StringEquals": { "aws:RequestTag/stack": "prod" }, "ForAllValues:StringEquals": { "aws:TagKeys": [ "stack" ] } } }, { "Effect": "Allow", "Action": [ "ec2:CreateTags" ], "Resource": "arn:aws:ec2:region:account-id:transit-gateway/*", "Condition": { "StringEquals": { "ec2:CreateAction": "CreateTransitGateway" } } } ] } Working with transit gateway route tables The following example enables users to create and delete transit gateway route tables for a specific transit gateway only (tgw-11223344556677889). Users can also create and replace routes in any transit gateway route table, but only for attachments that have the tag network=new- york-office. { Example policies to manage transit gateways 159 Amazon VPC AWS Transit Gateway "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "ec2:DeleteTransitGatewayRouteTable", "ec2:CreateTransitGatewayRouteTable" ], "Resource": [ "arn:aws:ec2:region:account-id:transit-gateway/tgw-11223344556677889", "arn:aws:ec2:*:*:transit-gateway-route-table/*" ] }, { "Effect": "Allow", "Action": [ "ec2:CreateTransitGatewayRoute", "ec2:ReplaceTransitGatewayRoute" ], "Resource": "arn:aws:ec2:*:*:transit-gateway-attachment/*", "Condition": { "StringEquals": { "ec2:ResourceTag/network": "new-york-office" } } }, { "Effect": "Allow", "Action": [ "ec2:CreateTransitGatewayRoute", "ec2:ReplaceTransitGatewayRoute" ], "Resource": "arn:aws:ec2:*:*:transit-gateway-route-table/*" } ] } Use service-linked roles for transit gateways in Amazon VPC Transit Gateways Amazon VPC uses service-linked roles for the permissions that it requires to call other AWS services on your behalf. For more information, see Service-linked roles in the IAM User Guide. Service-linked roles 160 Amazon VPC AWS Transit Gateway Transit gateway service-linked role Amazon VPC uses service-linked roles for the permissions that it requires to call other AWS services on your behalf when you work with a transit gateway. Permissions granted by the service-linked role Amazon VPC uses the service-linked role named AWSServiceRoleForVPCTransitGateway to call the following actions on your behalf when you work with a transit gateway: • ec2:CreateNetworkInterface • ec2:DescribeNetworkInterfaces • ec2:ModifyNetworkInterfaceAttribute • ec2:DeleteNetworkInterface • ec2:CreateNetworkInterfacePermission • ec2:AssignIpv6Addresses • ec2:UnAssignIpv6Addresses The AWSServiceRoleForVPCTransitGateway role trusts the following services to assume the role: • transitgateway.amazonaws.com AWSServiceRoleForVPCTransitGateway uses the managed policy AWSVPCTransitGatewayServiceRolePolicy. You must configure permissions to allow an IAM entity (such as a user, group, or role) to create, edit, or delete a service-linked role. For more information, see Service-linked role permissions in the IAM User Guide. Create the service-linked role You don't need to manually create the AWSServiceRoleForVPCTransitGateway role. Amazon VPC creates this role for you when you attach a VPC in your account to a transit gateway. Edit the service-linked role You can edit the description of AWSServiceRoleForVPCTransitGateway using IAM. For more information, see Edit a service-linked role description in the IAM User Guide. Transit gateway 161 Amazon VPC AWS Transit Gateway Delete the service-linked role If you no longer need to use transit gateways, we recommend that you delete AWSServiceRoleForVPCTransitGateway. You can delete this service-linked role only after you delete all transit gateway VPC attachments in your AWS account. This ensures that you can't inadvertently remove permission to access your VPC attachments. You can use the IAM console, the IAM CLI, or the IAM API to delete service-linked roles. For more information, see Delete a service-linked role in the IAM User Guide. After you delete AWSServiceRoleForVPCTransitGateway, Amazon VPC creates the role again if you attach a VPC in your account to a transit gateway. AWS managed policies for transit gateways in Amazon VPC Transit Gateways An AWS managed policy is a standalone policy that is created and administered by AWS. AWS managed policies are designed to provide permissions for many common use cases so that you can start assigning permissions to users, groups, and roles. Keep in mind that AWS managed policies might not grant least-privilege permissions for your specific use cases because they're available for all AWS customers to use. We recommend that you reduce permissions further by defining customer managed policies that are specific to your use cases. You cannot change the permissions defined in AWS managed policies. If AWS updates the permissions defined in an AWS managed policy, the update affects all principal identities (users, groups, and roles) that the policy is attached to. AWS is most likely to update an AWS managed policy when a new AWS service is launched or new API operations become available for existing services. For more information, see AWS managed policies in the IAM User Guide. To work with a transit gateway, one of the following AWS managed policies might meet your needs: • AmazonEC2FullAccess AWS managed policies 162 Amazon VPC • AmazonEC2ReadOnlyAccess • PowerUserAccess • ReadOnlyAccess AWS Transit Gateway AWS managed policy: AWSVPCTransitGatewayServiceRolePolicy This policy is attached to the role AWSServiceRoleForVPCTransitGateway. This allows Amazon VPC to create and manage resources for your transit gateway attachments. To view the permissions for this policy, see AWSVPCTransitGatewayServiceRolePolicy in the AWS Managed Policy Reference. Transit gateway updates to AWS managed policies View details about updates to AWS managed policies for transit gateways since Amazon VPC began tracking these changes in March 2021. Change Description Date Amazon VPC started tracking changes Amazon VPC started tracking changes to its AWS managed March |
vpc-tgw-059 | vpc-tgw.pdf | 59 | policies 162 Amazon VPC • AmazonEC2ReadOnlyAccess • PowerUserAccess • ReadOnlyAccess AWS Transit Gateway AWS managed policy: AWSVPCTransitGatewayServiceRolePolicy This policy is attached to the role AWSServiceRoleForVPCTransitGateway. This allows Amazon VPC to create and manage resources for your transit gateway attachments. To view the permissions for this policy, see AWSVPCTransitGatewayServiceRolePolicy in the AWS Managed Policy Reference. Transit gateway updates to AWS managed policies View details about updates to AWS managed policies for transit gateways since Amazon VPC began tracking these changes in March 2021. Change Description Date Amazon VPC started tracking changes Amazon VPC started tracking changes to its AWS managed March 1, 2021 policies. Network ACLs for transit gateways in Amazon VPC Transit Gateways A network access control list (NACL) is an optional layer of security. Network access control list (NACL) rules are applied differently, depending on the scenario: • the section called “Same subnet for EC2 instances and transit gateway association” • the section called “Different subnets for EC2 instances and transit gateway association” AWSVPCTransitGatewayServiceRolePolicy 163 Amazon VPC AWS Transit Gateway Same subnet for EC2 instances and transit gateway association Consider a configuration where you have EC2 instances and a transit gateway association in the same subnet. The same network ACL is used for both the traffic from the EC2 instances to the transit gateway and traffic from the transit gateway to the instances. NACL rules are applied as follows for traffic from instances to the transit gateway: • Outbound rules use the destination IP address for evaluation. • Inbound rules use the source IP address for evaluation. NACL rules are applied as follows for traffic from the transit gateway to the instances: • Outbound rules are not evaluated. • Inbound rules are not evaluated. Different subnets for EC2 instances and transit gateway association Consider a configuration where you have EC2 instances in one subnet and a transit gateway association in a different subnet, and each subnet is associated with a different network ACL. Network ACL rules are applied as follows for the EC2 instance subnet: • Outbound rules use the destination IP address to evaluate traffic from the instances to the transit gateway. • Inbound rules use the source IP address to evaluate traffic from the transit gateway to the instances. NACL rules are applied as follows for the transit gateway subnet: • Outbound rules use the destination IP address to evaluate traffic from the transit gateway to the instances. • Outbound rules are not used to evaluate traffic from the instances to the transit gateway. • Inbound rules use the source IP address to evaluate traffic from the instances to the transit gateway. • Inbound rules are not used to evaluate traffic from the transit gateway to the instances. Same subnet for EC2 instances and transit gateway association 164 Amazon VPC Best Practices AWS Transit Gateway Use a separate subnet for each transit gateway VPC attachment. For each subnet, use a small CIDR, for example /28, so that you have more addresses for EC2 resources. When you use a separate subnet, you can configure the following: • Keep the inbound and outbound NACL that is associated with the transit gateway subnets open. • Depending on your traffic flow, you can apply NACLs to your workload subnets. For more information about how VPC attachments work, see the section called “Resource attachments”. Best Practices 165 Amazon VPC AWS Transit Gateway Amazon VPC Transit Gateways Quotas Your AWS account has the following quotas (previously referred to as limits) related to transit gateways. Unless otherwise noted, each quota is Region-specific. The Service Quotas console provides information about the quotas for your account. You can use the Service Quotas console to view default quotas and request quota increases for adjustable quotas. For more information, see Requesting a quota increase in the Service Quotas User Guide. If an adjustable quota is not yet available in Service Quotas, you can open a support case. General Name Default Adjustable Transit gateways per account CIDR blocks per transit gateway 5 5 Yes No The CIDR blocks are used in the the section called “Connect attachments and Connect peers” feature. Routing Name Transit gateway route tables per transit gateway Total combined routes (dynamic and static) across all route tables for a single transit gateway Default 20 10,000 Dynamic routes advertised from a virtual router appliance to a Connect peer 1,000 Adjustable Yes Yes Yes General 166 Amazon VPC Name Routes advertised from a Connect peer on a transit gateway to a virtual router appliance Default 5,000 Static routes for a prefix to a single attachmen t 1 AWS Transit Gateway Adjustable No No Advertised routes come from the route table that's associated with the Connect attachment. Transit gateway attachments A transit gateway cannot have more than one VPC attachment to the same VPC. Name Attachments per transit gateway |
vpc-tgw-060 | vpc-tgw.pdf | 60 | tables for a single transit gateway Default 20 10,000 Dynamic routes advertised from a virtual router appliance to a Connect peer 1,000 Adjustable Yes Yes Yes General 166 Amazon VPC Name Routes advertised from a Connect peer on a transit gateway to a virtual router appliance Default 5,000 Static routes for a prefix to a single attachmen t 1 AWS Transit Gateway Adjustable No No Advertised routes come from the route table that's associated with the Connect attachment. Transit gateway attachments A transit gateway cannot have more than one VPC attachment to the same VPC. Name Attachments per transit gateway Transit gateways per VPC Peering attachments per transit gateway Pending peering attachments per transit gateway Peering attachments between two transit gateways or between one transit gateway and a Cloud WAN core network edge (CNE) Connect peers (GRE tunnels) per Connect attachment Default 5,000 5 50 10 1 4 Adjustable No No Yes Yes No No Bandwidth There are many factors that can affect realized bandwidth through a Site-to-Site VPN connection, including but not limited to: packet size, traffic mix (TCP/UDP), shaping or throttling policies on intermediate networks, internet weather, and specific application requirements. For VPC Transit gateway attachments 167 Amazon VPC AWS Transit Gateway attachments, AWS Direct Connect gateways, or peered transit gateway attachments, we will attempt to provide additional bandwidth beyond the default value. Name Default Adjustable Bandwidth per VPC attachment per Availabil ity Zone Up to 100 Gbps Packets per second per transit gateway VPC attachment per Availability Zone Up to 7,500,000 Bandwidth for AWS Direct Connect gateway or peered transit gateway connection per available Availability Zone in the Region Up to 100 Gbps Packets per second per transit gateway attachment (AWS Direct Connect and peering attachments) per available Availability Zone in the Region Up to 7,500,000 Maximum bandwidth per VPN tunnel Up to 1.25 Gbps Maximum packets per second per VPN tunnel Up to 140,000 Contact your Solutions Architect (SA) or Technical Account Manager (TAM) for further assistance. Contact your Solutions Architect (SA) or Technical Account Manager (TAM) for further assistance. Contact your Solutions Architect (SA) or Technical Account Manager (TAM) for further assistance. Contact your Solutions Architect (SA) or Technical Account Manager (TAM) for further assistance. No No Bandwidth 168 Amazon VPC Name Default Adjustable AWS Transit Gateway Maximum bandwidth per Connect peer (GRE tunnel) per Connect attachment Up to 5 Gbps Maximum packets per second per Connect peer Up to 300,000 No No You can use equal-cost multipath routing (ECMP) to get higher VPN bandwidth by aggregating multiple VPN tunnels. To use ECMP, the VPN connection must be configured for dynamic routing. ECMP is not supported on VPN connections that use static routing. You can create up to 4 Connect peers per Connect attachment (up to 20 Gbps in total bandwidth per Connect attachment), as long as the underlying transport (VPC or AWS Direct Connect) attachment supports the required bandwidth. You can use ECMP to get higher bandwidth by scaling horizontally across multiple Connect peers of the same Connect attachment or across multiple Connect attachments on the same transit gateway. The transit gateway cannot use ECMP between the BGP peerings of the same Connect peer. AWS Direct Connect gateways Name Default Adjustable AWS Direct Connect gateways per transit gateway Transit gateways per AWS Direct Connect gateway 20 6 No No Maximum transmission unit (MTU) • The MTU of a network connection is the size, in bytes, of the largest permissible packet that can be passed over the connection. The larger the MTU of a connection, the more data that can be passed in a single packet. A transit gateway supports an MTU of 8500 bytes for traffic between VPCs, AWS Direct Connect, Transit Gateway Connect, and peering attachments (intra-Region, AWS Direct Connect gateways 169 Amazon VPC AWS Transit Gateway inter-Region, and Cloud WAN peering attachments). Traffic over VPN connections can have an MTU of 1500 bytes. • When migrating from VPC peering to use a transit gateway, an MTU size mismatch between VPC peering and the transit gateway might result in some asymmetric traffic packets dropping. Update both VPCs at the same time to avoid jumbo packets dropping due to a size mismatch. • The transit gateway enforces Maximum Segment Size (MSS) clamping for all packets. For more information, see RFC879. • For details about Site-to-Site VPN quotas for MTU, see Maximum transmission unit (MTU) in the AWS Site-to-Site VPN User Guide. • Transit gateways support Path MTU Discovery (PMTUD) for traffic ingressing on VPC and Connect attachments. Transit gateway generates the FRAG_NEEDED for ICMPv4 packets and Packet Too Big (PTB) for ICMPv6 packets. Transit gateways does not support PMTUD on Site-to-site VPN, Direct Connect, and Peering attachments. For more information about Path MTU Discovery, see Path MTU Discovery in the Amazon VPC User Guide |
vpc-tgw-061 | vpc-tgw.pdf | 61 | transit gateway enforces Maximum Segment Size (MSS) clamping for all packets. For more information, see RFC879. • For details about Site-to-Site VPN quotas for MTU, see Maximum transmission unit (MTU) in the AWS Site-to-Site VPN User Guide. • Transit gateways support Path MTU Discovery (PMTUD) for traffic ingressing on VPC and Connect attachments. Transit gateway generates the FRAG_NEEDED for ICMPv4 packets and Packet Too Big (PTB) for ICMPv6 packets. Transit gateways does not support PMTUD on Site-to-site VPN, Direct Connect, and Peering attachments. For more information about Path MTU Discovery, see Path MTU Discovery in the Amazon VPC User Guide Multicast Note Transit gateway multicast may not be suitable for high-frequency trading or performance- sensitive applications. We strongly recommend that you review the following multicast limits. Contact your account or Solution Architect team for a detailed review of your performance requirements. Name Default Adjustable Multicast domains per transit gateway 20 Multicast network interfaces per transit gateway 10,000 Multicast domain associations per VPC Sources per transit gateway multicast group 20 1 Yes Yes Yes Yes Multicast 170 Amazon VPC Name Static and IGMPv2 multicast group members and sources per transit gateway Default 10,000 Static and IGMPv2 multicast group members per transit gateway multicast group 100 Maximum multicast throughput per flow 1 Gbps Maximum aggregate multicast throughput per Availability Zone 20 Gbps Maximum packets per second per flow (less than 10 receivers) 75,000 Maximum packets per second per flow (greater than 10 receivers) 15,000 Maximum aggregate packets per second (less than 10 receivers) 2,500,000 Maximum aggregate packets per second (greater than 10 receivers) 500,000 AWS Network Manager AWS Transit Gateway Adjustable No No No No No No No No Name Default Adjustable Global networks per AWS account Devices per global network Links per global network Sites per global network Connections per global network 5 200 200 200 500 Yes Yes Yes Yes No Network Manager 171 Amazon VPC AWS Transit Gateway Additional quota resources For more information, see the following: • Site-to-Site VPN quotas in the AWS Site-to-Site VPN User Guide • Amazon VPC quotas in the Amazon VPC User Guide • AWS Direct Connect quotas in the AWS Direct Connect User Guide Additional quota resources 172 Amazon VPC AWS Transit Gateway Document history for transit gateways The following table describes the releases for transit gateways. Change Description Date Security group referencing support You can now reference a security group across VPCs September 25, 2024 attached to a transit gateway. AWS Transit Gateway Quotas Bandwidth limits were added. August 14, 2023 AWS Transit Gateway Flow Logs Transit Gateways now support Transit Gateway Flow Logs, July 14, 2022 Transit gateway policy tables Network Manager User Guide Peering attachments allowing you to monitor and log network traffic between transit gateways. Use policy tables to set up dynamic routing for transit gateways for automatically exchanging routing and reachability information with peered transit gateway types. Network Manager was created as a standalone guide, and is no longer included as part of the AWS Transit Gateway User Guide. You can create a peering connection with a transit gateway in the same Region. July 13, 2022 December 2, 2021 December 1, 2021 Transit Gateway Connect You can establish a connectio n between a transit gateway December 10, 2020 173 Amazon VPC AWS Transit Gateway Appliance mode and third-party virtual appliances running in a VPC. You can enable appliance mode on a VPC attachment to ensure that bidirectional traffic flows through the same Availability Zone for the attachment. October 29, 2020 Prefix list references You can reference a prefix list in your transit gateway route August 24, 2020 table. Modify transit gateway You can modify the configura tion options for your transit August 24, 2020 gateway. CloudWatch metrics for transit gateway attachments You can view CloudWatch metrics for individual transit July 6, 2020 gateway attachments. Network Manager Route Analyzer You can analyze the routes in your transit gateway route tables in your global network. May 4, 2020 Peering attachments Multicast support December 3, 2019 December 3, 2019 You can create a peering connection with a transit gateway in another Region. Transit Gateway supports routing multicast traffic between subnets of attached VPCs and serves as a multicast router for instances sending traffic destined for multiple receiving instances. 174 Amazon VPC AWS Transit Gateway AWS Network Manager AWS Direct Connect support December 3, 2019 March 27, 2019 You can visualize and monitor your global networks that are built around transit gateways. You can use an AWS Direct Connect gateway to connect your AWS Direct Connect connection over a transit virtual interface to the VPCs or VPNs attached to your transit gateway. Initial release This release introduces transit gateways. November 26, 2018 175 |
vpc-tm-001 | vpc-tm.pdf | 1 | Traffic Mirroring Amazon Virtual Private Cloud Copyright © 2025 Amazon Web Services, Inc. and/or its affiliates. All rights reserved. Amazon Virtual Private Cloud Traffic Mirroring Amazon Virtual Private Cloud: Traffic Mirroring Copyright © 2025 Amazon Web Services, Inc. and/or its affiliates. All rights reserved. Amazon's trademarks and trade dress may not be used in connection with any product or service that is not Amazon's, in any manner that is likely to cause confusion among customers, or in any manner that disparages or discredits Amazon. All other trademarks not owned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected to, or sponsored by Amazon. Amazon Virtual Private Cloud Table of Contents Traffic Mirroring What is Traffic Mirroring? ............................................................................................................... 1 Traffic Mirroring concepts ........................................................................................................................... 1 Work with Traffic Mirroring ........................................................................................................................ 1 Traffic Mirroring benefits ............................................................................................................................ 2 Regional availability ..................................................................................................................................... 2 Pricing ............................................................................................................................................................. 2 How Traffic Mirroring works ........................................................................................................... 4 Targets ............................................................................................................................................................ 5 Network interfaces .................................................................................................................................. 6 Network Load Balancer .......................................................................................................................... 6 Gateway Load Balancer endpoints ...................................................................................................... 7 VXLAN encapsulation ............................................................................................................................. 8 Routing and security groups ................................................................................................................. 8 Processing mirrored traffic .................................................................................................................... 9 Filters ............................................................................................................................................................... 9 Sessions ........................................................................................................................................................ 10 Traffic mirror sources ........................................................................................................................... 10 Connectivity options .................................................................................................................................. 11 Packet format ............................................................................................................................................. 12 Get started ..................................................................................................................................... 14 Prerequisites ................................................................................................................................................ 15 Step 1: Create the traffic mirror target ................................................................................................. 15 Step 2: Create the traffic mirror filter ................................................................................................... 15 Step 3: Create the traffic mirror session ............................................................................................... 16 Step 4: Analyze the data .......................................................................................................................... 17 Traffic Mirroring example scenarios ............................................................................................. 18 Mirror inbound TCP traffic to a single appliance ................................................................................ 18 Step 1: Create a traffic mirror target .............................................................................................. 19 Step 2: Create a traffic mirror filter .................................................................................................. 19 Step 3: Create a traffic mirror session ............................................................................................ 20 Mirror inbound TCP and UDP traffic to multiple appliances ............................................................. 20 Step 1: Create a traffic mirror target for Appliance A ................................................................. 22 Step 2: Create a traffic mirror target for Appliance B ................................................................. 22 Step 3: Create a traffic mirror filter with a rule for TCP traffic ................................................... 22 iii Amazon Virtual Private Cloud Traffic Mirroring Step 4: Create a traffic mirror filter with a rule for UDP traffic .................................................. 22 Step 5: Create a traffic mirror session for the TCP traffic ........................................................... 23 Step 6: Create a traffic mirror session for the UDP traffic .......................................................... 24 Mirror non-local VPC traffic ..................................................................................................................... 24 Step 1: Create a traffic mirror target .............................................................................................. 25 Step 2: Create a traffic mirror filter .................................................................................................. 25 Step 3: Create a traffic mirror session ............................................................................................ 28 Mirror traffic to a Gateway Load Balancer endpoint .......................................................................... 28 Step 1: Create a traffic mirror target in Spoke VPC1 ................................................................... 30 Step 2: Create a traffic mirror target in Spoke VPC2 .................................................................... 30 Step 3: Create a traffic mirror filter rule ........................................................................................ 30 Step 4: Create a traffic mirror session in Spoke VPC1 ................................................................. 31 Step 5: Create a traffic mirror session in Spoke VPC2 ................................................................. 31 Work with Traffic Mirroring .......................................................................................................... 32 Create or delete a traffic mirror target ................................................................................................. 32 View traffic mirror targets and modify target tags ............................................................................ 34 Share a traffic mirror target .................................................................................................................... 34 Accept or delete a shared traffic mirror target .................................................................................... 35 Create, modify, or delete a traffic mirror filter .................................................................................... 36 Create, modify, or delete a traffic mirror session ................................................................................ 38 Work with open-source tools ....................................................................................................... 40 Step 1: Install the Suricata software on the EC2 instance target ................................................... 40 Step 2: Create a traffic mirror target ................................................................................................... 41 Step 3: Create a traffic mirror filter ....................................................................................................... 41 Step 4: Create a traffic mirror session ................................................................................................. 42 Monitor mirrored traffic ................................................................................................................ 43 Traffic Mirroring metrics and dimensions ............................................................................................. 43 View Traffic Mirroring CloudWatch metrics .......................................................................................... 46 Limitations ..................................................................................................................................... 47 General limitations ..................................................................................................................................... 47 MTU and packet length limitations ........................................................................................................ 48 Traffic bandwidth and prioritization limitations .................................................................................. 49 Checksum offloading limitations ............................................................................................................ 49 Quotas ............................................................................................................................................ 51 Sessions ........................................................................................................................................................ 51 Targets .......................................................................................................................................................... 51 iv Amazon Virtual Private Cloud Traffic Mirroring Filters ............................................................................................................................................................ 52 Throughput .................................................................................................................................................. 52 Packets .......................................................................................................................................................... 52 Sources ......................................................................................................................................................... 52 Identity and access management ................................................................................................. 54 ....................................................................................................................................................................... 54 Document history .......................................................................................................................... 55 v Amazon Virtual Private Cloud Traffic Mirroring What is Traffic Mirroring? Traffic Mirroring is an Amazon VPC feature that you can use to copy network traffic from an elastic network interface of type interface. You can then send the traffic to out-of-band security and monitoring appliances for: • Content inspection • Threat monitoring • Troubleshooting The security and monitoring appliances can be deployed as individual instances, or as a fleet of instances behind either a Network Load Balancer or a Gateway Load Balancer with a UDP listener. Traffic Mirroring supports filters and packet truncation, so that you can extract only the traffic of interest, using the monitoring tools of your choice. Traffic Mirroring concepts The following |
vpc-tm-002 | vpc-tm.pdf | 2 | VPC feature that you can use to copy network traffic from an elastic network interface of type interface. You can then send the traffic to out-of-band security and monitoring appliances for: • Content inspection • Threat monitoring • Troubleshooting The security and monitoring appliances can be deployed as individual instances, or as a fleet of instances behind either a Network Load Balancer or a Gateway Load Balancer with a UDP listener. Traffic Mirroring supports filters and packet truncation, so that you can extract only the traffic of interest, using the monitoring tools of your choice. Traffic Mirroring concepts The following are the key concepts for Traffic Mirroring: • Source — The network interface to monitor. • Filter — A set of rules that defines the traffic that is mirrored. • Target — The destination for mirrored traffic. • Session — Establishes a relationship between a source, a filter, and a target. Work with Traffic Mirroring You can create, access, and manage your traffic mirror resources using any of the following: • AWS Management Console— Provides a web interface that you can use to access your traffic mirror resources. • AWS Command Line Interface (AWS CLI) — Provides commands for a broad set of AWS services, including Amazon VPC. The AWS CLI is supported on Windows, macOS, and Linux. For more information, see AWS Command Line Interface. Traffic Mirroring concepts 1 Amazon Virtual Private Cloud Traffic Mirroring • AWS SDKs — Provide language-specific APIs. The AWS SDKs take care of many of the connection details, such as calculating signatures, handling request retries, and handling errors. For more information, see AWS SDKs. • Query API— Provides low-level API actions that you call using HTTPS requests. Using the Query API is the most direct way to access Amazon VPC. However, it requires that your application handle low-level details such as generating the hash to sign the request and handling errors. For more information, see Amazon VPC actions in the Amazon EC2 API Reference. Traffic Mirroring benefits Traffic Mirroring offers the following benefits: • Simplified operation — Mirror any range of your VPC traffic without having to manage packet forwarding agents on your EC2 instances. • Enhanced security — Capture packets at the elastic network interface, which cannot be disabled or tampered with from a user space. • Increased monitoring options — Send your mirrored traffic to any security device. Regional availability Traffic Mirroring is available in all Regions. Pricing You are charged on an hourly basis for each active traffic mirror session. You'll continue to be charged for Traffic Mirroring until you delete all active traffic mirror sessions. For example, you'll still be charged in the following scenarios: • You detached the network interface from the mirror source • You stopped or terminated the mirror source • You changed the instance type of the mirror source to an unsupported instance type Data transfer charges apply. If your traffic mirroring targets are behind a gateway or network load balancer, data processing for the load balancing services also applies. Traffic Mirroring benefits 2 Amazon Virtual Private Cloud Traffic Mirroring For information about pricing for Traffic Mirroring, see Network Analysis on the Amazon VPC pricing page. Pricing 3 Amazon Virtual Private Cloud Traffic Mirroring How Traffic Mirroring works Traffic Mirroring copies inbound and outbound traffic from the network interfaces that are attached to your instances. You can send the mirrored traffic to the network interface of another instance, a Network Load Balancer that has a UDP listener, or a Gateway Load Balancer that has a UDP listener. The traffic mirror source and the traffic mirror target (monitoring appliance) can be in the same VPC. Or they can be in a different VPCs that are connected through intra-Region VPC peering, a transit gateway, or by a Gateway Load Balancer endpoint to connect to a Gateway Load Balancer in a different VPC. Consider the following scenario, where you mirror traffic from two sources (Source A and Source B) to a single traffic mirror target (Target D). After you create the traffic mirror session, any traffic that matches the filter rules is encapsulated in a VXLAN header. It is then sent to the target. The following procedures are required: • Identify the traffic mirror source (Source A) • Identify the traffic mirror source (Source B) • Configure the traffic mirror target (Target D) • Configure the traffic mirror filter (Filter A) • Configure the traffic mirror session for Source A, Filter A, and Target D • Configure the traffic mirror session for Source B, Filter A, and Target D Contents • Understand traffic mirror target concepts • Understand traffic mirror filter concepts • Understand traffic mirror session concepts 4 Amazon Virtual Private Cloud Traffic Mirroring • Understand traffic mirror source and target connectivity options • Understanding traffic mirror packet |
vpc-tm-003 | vpc-tm.pdf | 3 | • Identify the traffic mirror source (Source A) • Identify the traffic mirror source (Source B) • Configure the traffic mirror target (Target D) • Configure the traffic mirror filter (Filter A) • Configure the traffic mirror session for Source A, Filter A, and Target D • Configure the traffic mirror session for Source B, Filter A, and Target D Contents • Understand traffic mirror target concepts • Understand traffic mirror filter concepts • Understand traffic mirror session concepts 4 Amazon Virtual Private Cloud Traffic Mirroring • Understand traffic mirror source and target connectivity options • Understanding traffic mirror packet format Understand traffic mirror target concepts A traffic mirror target is the destination for mirrored traffic. In Amazon VPC, traffic mirroring allows you to copy network traffic from an elastic network interface (ENI) and send it to a traffic mirror target for monitoring and analysis purposes. You can use the following resources as traffic mirror targets: • Network interfaces of type interface • Network Load Balancers • Gateway Load Balancer endpoints For high availability, we recommend that you use a Network Load Balancer or a Gateway Load Balancer endpoint as a mirror target. You might experience out-of-order delivery of mirrored packets when you use a Network Load Balancer or Gateway Load Balancer endpoint as your traffic mirror target. If your monitoring appliance can't handle out-of-order packets, we recommend using a network interface as your traffic mirror target. A traffic mirror target can be owned by an AWS account that is different from the traffic mirror source. After you create a traffic mirror target, you add it to a traffic mirror session. You can use a traffic mirror target in more than one traffic mirror session. For more information, see the section called “Sessions”. Note If the underlying resource chosen as the target is deleted, we stop traffic mirroring for any sessions that use that target. To update a traffic mirroring target and resume the traffic mirroring session, you can use modify-traffic-mirror-session. Targets 5 Amazon Virtual Private Cloud Network interfaces Traffic Mirroring The following diagram shows a traffic mirror session where the traffic mirror target is a network interface for an EC2 instance. Traffic Mirroring filters the traffic from the network interface of the mirror source and sends the accepted mirrored traffic to the mirror target. Network Load Balancer The following diagram shows a traffic mirror session where the traffic mirror target is a Network Load Balancer. You install the monitoring software on the target instances, and then register them with the load balancer. Traffic Mirroring filters the traffic from the network interface of the mirror source and sends the accepted mirrored traffic to the load balancer. The load balancer sends the mirrored traffic to the target instances. Network interfaces 6 Amazon Virtual Private Cloud Considerations Traffic Mirroring • Traffic mirroring can't occur unless the load balancer has UDP listeners on port 4789. If you remove the UDP listeners, Traffic Mirroring fails without an error indication. • To improve availability and fault tolerance, we recommend that you select at least two Availability Zones when you create the Network Load Balancer, and that you register target instances in each selected Availability Zone. • We recommend that you enable cross-zone load balancing for your Network Load Balancer. If all registered target instances in an Availability Zone become unhealthy and cross-zone load balancing is disabled, the load balancer can't send the mirrored traffic to target instances in another Availability Zone. If you enable cross-zone load balancing, the load balancer can send the mirrored traffic to healthy target instances in another Availability Zone. • If you select an additional Availability Zone for your Network Load Balancer after you create it, Traffic Mirroring does not send mirrored traffic to target instances in the new Availability Zone unless you enable cross-zone load balancing. • When the Network Load Balancer removes a load balancer node from the DNS table, Traffic Mirroring continues to send the mirrored traffic to that node. Gateway Load Balancer endpoints The following diagram shows a traffic mirror session where the traffic mirror target is a Gateway Load Balancer endpoint. The mirror source is in the service consumer VPC and the Gateway Load Balancer is in the service provider VPC. You install the monitoring software on the target appliances, and then register them with the load balancer. Traffic Mirroring filters the traffic from the network interface of the mirror source and sends the accepted mirrored traffic to the Gateway Load Balancer endpoint. The load balancer sends the mirrored traffic to the target appliances. Gateway Load Balancer endpoints 7 Amazon Virtual Private Cloud Considerations Traffic Mirroring • A listener for Gateway Load Balancers listens for all IP packets across all ports, and then forwards traffic to the target group. • To improve availability and fault tolerance, |
vpc-tm-004 | vpc-tm.pdf | 4 | in the service provider VPC. You install the monitoring software on the target appliances, and then register them with the load balancer. Traffic Mirroring filters the traffic from the network interface of the mirror source and sends the accepted mirrored traffic to the Gateway Load Balancer endpoint. The load balancer sends the mirrored traffic to the target appliances. Gateway Load Balancer endpoints 7 Amazon Virtual Private Cloud Considerations Traffic Mirroring • A listener for Gateway Load Balancers listens for all IP packets across all ports, and then forwards traffic to the target group. • To improve availability and fault tolerance, we recommend that you select at least two Availability Zones when you create the Gateway Load Balancer, and that you register target appliances in each selected Availability Zone. • If all registered target appliances in an Availability Zone become unhealthy and cross-zone load balancing is disabled, the load balancer can't send the mirrored traffic to target appliances in another Availability Zone. If you enable cross-zone load balancing, the load balancer can send the mirrored traffic to healthy target appliances in another Availability Zone. • The maximum MTU supported by the Gateway Load Balancer is 8500. Traffic Mirroring adds 54 bytes of additional headers to the original packet payload when using IPv4, and 74 bytes when using IPv6. Therefore, the maximum packet size that can be delivered to an appliance without truncation is 8500 – 54 = 8446 when using IPv4, or 8500 – 74 = 8426 when using IPv6. • You can use the BytesProcessed and PacketsDropped CloudWatch metrics for VPC endpoints to monitor the volume of traffic being sent over the Gateway Load Balancer endpoint. You can also use CloudWatch metrics for Traffic Mirroring. For more information, see Monitor mirrored traffic. VXLAN encapsulation Mirrored traffic is encapsulated in VXLAN packets and then routed to the mirror target. The security groups for a traffic mirror target must allow VXLAN traffic (UDP port 4789) from the traffic mirror source. The route table for the subnet with the traffic mirror source must have a route that sends the mirrored traffic to the traffic mirror target. The monitoring software that you run on the mirror target must be able to process encapsulated VXLAN packets. Routing and security groups Encapsulated mirror traffic is routed to the traffic mirror target by using the VPC route table. Make sure that your route table is configured to send the mirrored traffic to the traffic mirror target. Inbound traffic that is dropped at the traffic mirror source, because of the inbound security group rules or the inbound network ACL rules, is not mirrored. VXLAN encapsulation 8 Amazon Virtual Private Cloud Traffic Mirroring Mirrored outbound traffic is not subject to the outbound security group rules for the traffic mirror source. Processing mirrored traffic You can use open-source tools or choose a monitoring solution available on AWS Marketplace. You can stream mirrored traffic to any network packet collector or analytics tool, without having to install vendor-specific agents. Understand traffic mirror filter concepts A traffic mirror filter is a set of inbound and outbound rules that determines which traffic is copied from the traffic mirror source and sent to the traffic mirror target. You can also choose to mirror certain network services traffic, including Amazon DNS. When you add network services traffic, all traffic (inbound and outbound) related to that network service is mirrored. We evaluate traffic mirror filter rules from the lowest value to the highest value. The first rule that matches the traffic determines whether the traffic is mirrored. If you don't add any rules, then no traffic is mirrored. For example, in the following set of filter rules, rule 10 ensures that SSH traffic from my network to my VPC is not mirrored and rule 20 mirrors all other IPv4 TCP traffic. Number Rule action Protocol Source port range Destinati on port Source CIDR block Destinati on CIDR reject TCP (6) range 22 block vpc-cidr my- network accept TCP (6) 0.0.0.0/0 0.0.0.0/0 10 20 In the following set of filter rules, rule 10 mirrors HTTPS traffic from all IPv4 addresses and rule 20 mirrors HTTPS traffic from all IPv6 addresses. Processing mirrored traffic 9 Amazon Virtual Private Cloud Traffic Mirroring Number Rule action Protocol Source port range Destinati on port Source CIDR block Destinati on CIDR 10 20 accept TCP (6) accept TCP (6) range 443 443 block 0.0.0.0/0 0.0.0.0/0 ::/0 ::/0 Note that if you don't add outbound rules, then no outbound traffic is mirrored. Understand traffic mirror session concepts A traffic mirror session establishes a relationship between a traffic mirror source and a traffic mirror target. Traffic mirror sessions are evaluated based on the ascending session number that you define when you create the session. A traffic mirror session contains the following resources: • A traffic |
vpc-tm-005 | vpc-tm.pdf | 5 | Traffic Mirroring Number Rule action Protocol Source port range Destinati on port Source CIDR block Destinati on CIDR 10 20 accept TCP (6) accept TCP (6) range 443 443 block 0.0.0.0/0 0.0.0.0/0 ::/0 ::/0 Note that if you don't add outbound rules, then no outbound traffic is mirrored. Understand traffic mirror session concepts A traffic mirror session establishes a relationship between a traffic mirror source and a traffic mirror target. Traffic mirror sessions are evaluated based on the ascending session number that you define when you create the session. A traffic mirror session contains the following resources: • A traffic mirror source • A traffic mirror target • A traffic mirror filter Each packet is mirrored once. However, you can use multiple traffic mirror sessions on the same mirror source. This is useful if you want to send a subset of the mirrored traffic from a traffic mirror source to multiple tools. For example, you can filter HTTP traffic in a higher priority traffic mirror session and send it to a specific monitoring appliance. At the same time, you can filter all other TCP traffic in a lower priority traffic mirror session and send it to another monitoring appliance. Traffic mirror sources A traffic mirror source is the network interface of type interface. For example, a network interface for an EC2 instance or an RDS instance. A network interface can't be used as a traffic mirror source if the same Elastic network interface is already in use in an existing traffic mirror target. Sessions 10 Amazon Virtual Private Cloud Traffic Mirroring Note If the source network interface gets deleted, AWS deletes the traffic mirroring session. Traffic Mirroring is not available on all instance types. Instance types The following limitations apply to only the traffic mirroring source instance type. • Traffic Mirroring is not available on the following virtualized Nitro instance types: • General purpose: M8g, M6a, M6i, M6id, M6idn, M6in, M7a, M7g, M7gd, M7i, M7i-flex • Compute optimized: C8g, C6a, C6gd, C6gn, C6i, C6id, C6in, C7a, C7g, C7gd, C7gn, C7i • Memory optimized: R8g, R6a, R6i, R6id, R6idn, R6in, R7a, R7g, R7gd, R7i, R7iz, X8g, X2idn, X2iedn, X2iezn • Storage optimized: I4g, I4i, Im4gn, Is4gen • Accelerated computing: Inf2, P5, Trn1, Trn1n • High-performance computing: Hpc6a, Hpc6id, Hpc7a, Hpc7g • Traffic Mirroring is not available on bare metal instances. • Traffic Mirroring is available only on the following non-Nitro instances types: C4, D2, G3, G3s, H1, I3, M4, P2, P3, R4, X1, and X1e. Note that this does not include T2 instances. Understand traffic mirror source and target connectivity options Connecting traffic mirror sources and targets in different VPCs can be useful for monitoring and analyzing network traffic across multiple environments. This allows you to centralize your network monitoring and security analysis, even if your application infrastructure is spread across different VPCs or AWS accounts. The traffic mirror source and the traffic mirror target (monitoring appliance) can be in the same VPC or different VPCs and can be connected using the following resources: • An intra-Region VPC peering connection. • A transit gateway. Connectivity options 11 Amazon Virtual Private Cloud Traffic Mirroring • A Gateway Load Balancer endpoint. The traffic mirror target can be owned by an AWS account that is different from the traffic mirror source. The mirrored traffic is sent to the traffic mirror target using the source VPC route table. Before you configure Traffic Mirroring, make sure that the traffic mirror source can route to the traffic mirror target. The following table describes the available resource configurations. Source owner Source VPC Target owner Target VPC Connectivity option Account A VPC 1 Account A VPC1 No additional configuration Account A VPC 1 Account A VPC 2 Account A VPC 1 Account B VPC 2 Intra-Region peering or a transit gateway or Gateway Load Balancer endpoint Cross-account intra-Region peering connection, a transit gateway, or a Gateway Load Balancer endpoint Account A VPC 1 Account B VPC 1 VPC sharing Understanding traffic mirror packet format Mirrored traffic is encapsulated with a VXLAN header. All appliances that receive traffic directly with this feature should be able parse a VXLAN-encapsulated packet, as shown in the following example: Packet format 12 Amazon Virtual Private Cloud Traffic Mirroring For more information about the VXLAN protocol, see RFC 7348. The following fields apply to Traffic Mirroring: • VXLAN ID — The virtual network ID that you can assign to a traffic mirror session. If you do not assign a value, we assign a random value that is unique to all sessions in the account. • Source IP address — The primary IP address of the source network interface. • Source port — The port is determined by a 5-tuple hash of the original L2 packet, for ICMP, TCP, and UDP flows. For other flows, the |
vpc-tm-006 | vpc-tm.pdf | 6 | Private Cloud Traffic Mirroring For more information about the VXLAN protocol, see RFC 7348. The following fields apply to Traffic Mirroring: • VXLAN ID — The virtual network ID that you can assign to a traffic mirror session. If you do not assign a value, we assign a random value that is unique to all sessions in the account. • Source IP address — The primary IP address of the source network interface. • Source port — The port is determined by a 5-tuple hash of the original L2 packet, for ICMP, TCP, and UDP flows. For other flows, the port is determined by a 3-tuple hash of the original L2 packet. • Destination IP address — The primary IP address of the appliance, Gateway Load Balancer endpoint, or Network Load Balancer (when the appliance is deployed behind one). • Destination port — The port is 4789, which is the well known port for VXLAN. Appliances that received mirrored traffic through a Gateway Load Balancer should be able to parse both outer GENEVE encapsulation (from Gateway Load Balancer) and an inner VXLAN encapsulation (from VPC Traffic Mirroring) to retrieve the original L3 packet. The following shows an example: Packet format 13 Amazon Virtual Private Cloud Traffic Mirroring Get started using Traffic Mirroring to monitor network traffic To get started using Amazon VPC Traffic Mirroring, you'll need a VPC with at least one elastic network interface (ENI) that you want to mirror traffic from. In this section, you'll create a traffic mirror target and you'll create a traffic mirror session, which defines the parameters of the traffic mirroring operation, such as the source ENI, the mirror target, and any filtering rules. Once these components are in place, you'll start mirroring traffic to the target for monitoring and analysis. A mirror session is a connection between a mirror source and a mirror target. In the following diagram, both the mirror source and the mirror target are EC2 instances. The mirror filter determines which network packets are mirrored. For example, you can add inbound and outbound rules to the filter such that it rejects SSH traffic but accepts all other traffic. Traffic Mirroring applies the filter rules, and then copies the accepted traffic from the network interface of the mirror source to the network interface of the mirror target. You can run your capture and analysis tools on the packets delivered to the mirror target. Tasks • Prerequisites • Step 1: Create the traffic mirror target • Step 2: Create the traffic mirror filter • Step 3: Create the traffic mirror session • Step 4: Analyze the data 14 Amazon Virtual Private Cloud Prerequisites Traffic Mirroring • You'll need a VPC with at least one ENI that you want to mirror traffic from. • The traffic mirror source and traffic mirror target must be in the same VPC or in VPCs that are connected (for example, using VPC peering or a transit gateway). • The traffic mirror target must allow traffic to UDP port 4789. • The traffic mirror source must have a route table entry for the traffic mirror target. • Security group rules and network ACL rules on the traffic mirror target cannot drop the mirrored traffic from the traffic mirror source. Step 1: Create the traffic mirror target Create a destination for the mirrored traffic. To create a traffic mirror target 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. In the Region selector, choose the AWS Region that you used when you created the mirror target. 3. On the navigation pane, choose Traffic Mirroring, Mirror targets. 4. Choose Create traffic mirror target. 5. 6. 7. 8. 9. (Optional) For Name tag, enter a name for the traffic mirror target. (Optional) For Description, enter a description for the traffic mirror target. For Target type, choose Network Interface. For Target, choose the network interface of the instance. (Optional) For each tag to add, choose Add new tag and enter the tag key and tag value. 10. Choose Create. Step 2: Create the traffic mirror filter A traffic mirror filter contains one or more traffic mirror rules, and a set of network services. The filters and rules that you add define the traffic that is mirrored. Prerequisites 15 Amazon Virtual Private Cloud To create a traffic mirror filter Traffic Mirroring 1. On the navigation pane, choose Traffic Mirroring, Mirror filters. 2. Choose Create traffic mirror filter. 3. 4. 5. (Optional For Name tag, enter a name for the traffic mirror filter. (Optional) For Description, enter a description for the traffic mirror filter. For each rule, inbound or outbound, choose Add rule, and then specify the following information: • Number: The rule priority. • Rule action: Indicates whether to accept or reject the packets. • Protocol: The protocol. • (Optional) Source port range: |
vpc-tm-007 | vpc-tm.pdf | 7 | traffic that is mirrored. Prerequisites 15 Amazon Virtual Private Cloud To create a traffic mirror filter Traffic Mirroring 1. On the navigation pane, choose Traffic Mirroring, Mirror filters. 2. Choose Create traffic mirror filter. 3. 4. 5. (Optional For Name tag, enter a name for the traffic mirror filter. (Optional) For Description, enter a description for the traffic mirror filter. For each rule, inbound or outbound, choose Add rule, and then specify the following information: • Number: The rule priority. • Rule action: Indicates whether to accept or reject the packets. • Protocol: The protocol. • (Optional) Source port range: The source port range. • (Optional) Destination port range: The destination port range. • Source CIDR block: The source CIDR block. • Destination CIDR block: The destination CIDR block. • Description: A description for the rule. 6. (Optional) For each tag to add, choose Add new tag and enter the tag key and tag value. 7. Choose Create. Step 3: Create the traffic mirror session Create a traffic mirror session that sends mirrored packets from the source to a target so that you can monitor and analyze traffic. To create a traffic mirror session 1. In the navigation pane, choose Traffic Mirroring, Mirror sessions. 2. Choose Create traffic mirror session. 3. 4. 5. 6. 7. (Optional) For Name tag, enter a name for the traffic mirror session. (Optional) For Description, enter a description for the traffic mirror session. For Mirror source, choose the network interface of the mirror source. For Mirror target, choose your traffic mirror target. For Additional settings, do the following: Step 3: Create the traffic mirror session 16 Amazon Virtual Private Cloud Traffic Mirroring a. For Session number, enter 1, which is the highest priority. b. (Optional) For VNI, enter the VXLAN ID to use for the traffic mirror session. For more information about the VXLAN protocol, see RFC 7348. If you do not enter a value, we assign a random unused number. c. (Optional) For Packet length, enter the number of bytes in each packet to mirror. To mirror the entire packet, do not enter a value. To mirror only a portion of each packet, set this value to the number of bytes to mirror. For example, if you set this value to 100, the first 100 bytes after the VXLAN header that meet the filter criteria are copied to the target. d. For Filter, choose your traffic mirror filter. 8. (Optional) For each tag to add, choose Add new tag and enter the tag key and tag value. 9. Choose Create. Step 4: Analyze the data After the mirrored traffic is copied to the traffic mirror target, you can use a tool from the AWS Partner Network to analyze the data. Step 4: Analyze the data 17 Amazon Virtual Private Cloud Traffic Mirroring Traffic Mirroring example configuration scenarios This section consists of step-by-step instructions you can use to configure Traffic Mirroring for the following scenarios: • Mirror inbound TCP traffic to a single appliance • Mirror inbound TCP and UDP traffic to multiple appliances • Mirror non-local VPC traffic • Mirror traffic to a Gateway Load Balancer endpoint To mirror traffic from multiple network interfaces, see VPC Traffic Mirroring Source Automation Application on github. Example: Mirror inbound TCP traffic to a single monitoring appliance Consider the scenario where you want to mirror inbound TCP traffic on an instance, and send it to a single monitoring appliance. You need the following traffic mirror resources for this example. Resources • A traffic mirror target for the appliance (Target A) • A traffic mirror filter with a traffic mirror rule for the TCP inbound traffic (Filter 1) Mirror inbound TCP traffic to a single appliance 18 Amazon Virtual Private Cloud Traffic Mirroring • A traffic mirror session that has the following: • A traffic mirror source • A traffic mirror target for the appliance • A traffic mirror filter with a traffic mirror rule for the TCP inbound traffic Step 1: Create a traffic mirror target Create a traffic mirror target (Target A) for the monitoring appliance. Depending on your configuration, the target is one of the following types: • The network interface of the monitoring appliance • The Network Load Balancer when the appliance is deployed behind one • The Gateway Load Balancer endpoint when the appliance is deployed behind a Gateway Load Balancer For more information, see the section called “Create or delete a traffic mirror target”. Step 2: Create a traffic mirror filter Create a traffic mirror filter (Filter 1) that has the following inbound rule. For more information, see the section called “Create, modify, or delete a traffic mirror filter”. Option Rule action Protocol Source port range Destination port range Source CIDR block Destination CIDR block Description Value Accept TCP 0.0.0.0/0 0.0.0.0/0 TCP Rule |
vpc-tm-008 | vpc-tm.pdf | 8 | The Network Load Balancer when the appliance is deployed behind one • The Gateway Load Balancer endpoint when the appliance is deployed behind a Gateway Load Balancer For more information, see the section called “Create or delete a traffic mirror target”. Step 2: Create a traffic mirror filter Create a traffic mirror filter (Filter 1) that has the following inbound rule. For more information, see the section called “Create, modify, or delete a traffic mirror filter”. Option Rule action Protocol Source port range Destination port range Source CIDR block Destination CIDR block Description Value Accept TCP 0.0.0.0/0 0.0.0.0/0 TCP Rule Step 1: Create a traffic mirror target 19 Amazon Virtual Private Cloud Traffic Mirroring Step 3: Create a traffic mirror session Create and configure a traffic mirror session with the following options. For more information, see the section called “Create, modify, or delete a traffic mirror session”. Option Mirror source Mirror target Filter Value The network interface of the instance that you want to monitor. Target A Filter 1 Example: Mirror inbound TCP and UDP traffic to multiple appliances Consider the scenario where you want to mirror inbound TCP and UDP traffic on an instance. But you want to send the TCP traffic to one appliance (Appliance A), and the UDP traffic to a second appliance (Appliance B). You need the following traffic mirror entities for this example. Step 3: Create a traffic mirror session 20 Amazon Virtual Private Cloud Traffic Mirroring Resources • A traffic mirror target for Appliance A (Target A) • A traffic mirror target for Appliance B (Target B) • A traffic mirror filter with a traffic mirror rule for the TCP inbound traffic (Filter 1) • A traffic mirror filter with a traffic mirror rule for the UDP inbound traffic (Filter 2) • A traffic mirror session that has the following: • A traffic mirror source • A traffic mirror target (Target A) for Appliance A • A traffic mirror filter (Filter 1) with a traffic mirror rule for the TCP inbound traffic • A traffic mirror session that has the following: • A traffic mirror source • A traffic mirror target (Target B) for Appliance B • A traffic mirror filter (Filter 2) with a traffic mirror rule for the UDP inbound traffic Mirror inbound TCP and UDP traffic to multiple appliances 21 Amazon Virtual Private Cloud Traffic Mirroring Step 1: Create a traffic mirror target for Appliance A Create a traffic mirror target for Appliance A (Target A). Depending on your configuration, the target is one of the following types: • The network interface of the monitoring appliance • The Network Load Balancer when the appliance is deployed behind one • The Gateway Load Balancer endpoint when the appliance is deployed behind a Gateway Load Balancer For more information, see the section called “Create or delete a traffic mirror target”. Step 2: Create a traffic mirror target for Appliance B Create a traffic mirror target (Target B) for Appliance B. Depending on your configuration, the target is one of the following types: • The network interface of the monitoring appliance • The Network Load Balancer when the appliance is deployed behind one • The Gateway Load Balancer endpoint when the appliance is deployed behind a Gateway Load Balancer For more information, see the section called “Create or delete a traffic mirror target”. Step 3: Create a traffic mirror filter with a rule for TCP traffic Create a traffic mirror filter (Filter 1) with the following inbound rule for TCP traffic. For more information, see the section called “Create, modify, or delete a traffic mirror filter” Option Rule action Protocol Source port range Destination port range Value Accept TCP Step 1: Create a traffic mirror target for Appliance A 22 Amazon Virtual Private Cloud Option Source CIDR block Destination CIDR block Description Value 0.0.0.0/0 0.0.0.0/0 TCP Rule Traffic Mirroring Step 4: Create a traffic mirror filter with a rule for UDP traffic Create a traffic mirror filter (Filter 2) with the following inbound rule for UDP traffic. For more information, see the section called “Create, modify, or delete a traffic mirror filter” Option Rule action Protocol Source port range Destination port range Source CIDR block Destination CIDR block Description Value Accept UDP 0.0.0.0/0 0.0.0.0/0 UDP Rule Step 5: Create a traffic mirror session for the TCP traffic Create and configure a traffic mirror session with the following options. For more information, see the section called “Create, modify, or delete a traffic mirror session”. Option Mirror source Value The network interface of the instance that you want to monitor. Step 4: Create a traffic mirror filter with a rule for UDP traffic 23 Amazon Virtual Private Cloud Traffic Mirroring Option Mirror target Filter Session number Value Target A Filter 1 1 Step 6: Create a |
vpc-tm-009 | vpc-tm.pdf | 9 | block Destination CIDR block Description Value Accept UDP 0.0.0.0/0 0.0.0.0/0 UDP Rule Step 5: Create a traffic mirror session for the TCP traffic Create and configure a traffic mirror session with the following options. For more information, see the section called “Create, modify, or delete a traffic mirror session”. Option Mirror source Value The network interface of the instance that you want to monitor. Step 4: Create a traffic mirror filter with a rule for UDP traffic 23 Amazon Virtual Private Cloud Traffic Mirroring Option Mirror target Filter Session number Value Target A Filter 1 1 Step 6: Create a traffic mirror session for the UDP traffic Create and configure a traffic mirror session with the following options. For more information, see the section called “Create, modify, or delete a traffic mirror session”. Option Mirror source Mirror target Filter Session number Value The network interface of the instance that you want to monitor. Target B Filter 2 2 Example: Mirror non-local VPC traffic Consider the scenario where you want to monitor traffic leaving your VPC or traffic whose source is outside your VPC. In this case, you will mirror all traffic except traffic passing within your VPC and send it to a single monitoring appliance. You need the following traffic mirror resources: • A traffic mirror target for the appliance (Target A) • A traffic mirror filter that has two sets of rules for outbound and inbound traffic. For outbound traffic, it will reject all packets which have a destination IP in the VPC CIDR block and accept all other outbound packets. For inbound traffic, it will reject all packets which have a source IP in the VPC CIDR block and accept all other inbound packets. • A traffic mirror session that has the following: • A traffic mirror source Step 6: Create a traffic mirror session for the UDP traffic 24 Amazon Virtual Private Cloud Traffic Mirroring • A traffic mirror target for the appliance (Target A) • A traffic mirror filter with a traffic mirror rule for the TCP inbound traffic (Filter F) In this example, the VPC CIDR block is 10.0.0.0/16. Step 1: Create a traffic mirror target Create a traffic mirror target (Target A) for the monitoring appliance. Depending on your configuration, the target is one of the following types: • The network interface of the monitoring appliance • The Network Load Balancer when the appliance is deployed behind one • The Gateway Load Balancer endpoint when the appliance is deployed behind a Gateway Load Balancer For more information, see the section called “Create or delete a traffic mirror target”. Step 2: Create a traffic mirror filter Create a traffic mirror filter (Filter F) that has the following rules. For more information, see the section called “Create, modify, or delete a traffic mirror filter”. Outbound traffic mirror filter rules Create the following outbound rules: • Reject all outbound packets which have a destination IP in the VPC CIDR block • Accept all other outbound packets (destination CIDR block 0.0.0.0/0) Option Rule number Rule action Protocol Value 10 Reject All Step 1: Create a traffic mirror target 25 Traffic Mirroring Amazon Virtual Private Cloud Option Source port range Destination port range Source CIDR block Destination CIDR block Value 0.0.0.0/0 10.0.0.0/16 Description Reject all intra-VPC traffic Option Rule number Rule action Protocol Source port range Destination port range Source CIDR block Destination CIDR block Value 20 Accept All 0.0.0.0/0 0.0.0.0/0 Description Accept all outbound traffic Inbound traffic mirror filter rules Create the following inbound rules: • Reject all inbound packets which have a source IP in the VPC CIDR block • Accept all other inbound packets (source CIDR block 0.0.0.0/0) Step 2: Create a traffic mirror filter 26 Amazon Virtual Private Cloud Traffic Mirroring Option Rule number Rule action Protocol Source port range Destination port range Source CIDR block Destination CIDR block Value 10 Reject All 10.0.0.0/16 0.0.0.0/0 Description Reject all intra-VPC traffic Option Rule number Rule action Protocol Source port range Destination port range Source CIDR block Destination CIDR block Value 20 Accept All 0.0.0.0/0 0.0.0.0/0 Description Accept all inbound traffic Step 2: Create a traffic mirror filter 27 Amazon Virtual Private Cloud Traffic Mirroring Step 3: Create a traffic mirror session Create and configure a traffic mirror session with the following options. For more information, see the section called “Create, modify, or delete a traffic mirror session”. Option Mirror source Mirror target Filter Value The network interface of the instance that you want to monitor. Target A Filter F Example: Mirror traffic to appliances behind a Gateway Load Balancer via Gateway Load Balancer endpoints You can deploy a Gateway Load Balancer (GWLB) and Gateway Load Balancer endpoint (GWLBe) to securely send mirror traffic across VPC and accounts. The GWLBe is a VPC endpoint that provides private |
vpc-tm-010 | vpc-tm.pdf | 10 | Create a traffic mirror session Create and configure a traffic mirror session with the following options. For more information, see the section called “Create, modify, or delete a traffic mirror session”. Option Mirror source Mirror target Filter Value The network interface of the instance that you want to monitor. Target A Filter F Example: Mirror traffic to appliances behind a Gateway Load Balancer via Gateway Load Balancer endpoints You can deploy a Gateway Load Balancer (GWLB) and Gateway Load Balancer endpoint (GWLBe) to securely send mirror traffic across VPC and accounts. The GWLBe is a VPC endpoint that provides private connectivity between VPC with the mirror sources and the monitoring appliances deployed behind the GWLB. The following diagram shows a deployment of a GWLB for traffic mirroring utilizing GWLBe interfaces. The GWLB is deployed in a centralized Service VPC with multiple appliances as targets. The GWLB is set up for each Availability Zone that the customer wants to monitor traffic, and it can configure their GWLB with cross-zone load balancing as an option to protect against single Availability Zone failures. In the spoke VPCs, GWLBe interfaces are deployed in each spoke VPC. These endpoints are connected to the GWLB to send traffic from the spoke VPC to the Service VPC. Step 3: Create a traffic mirror session 28 Amazon Virtual Private Cloud Traffic Mirroring Consider the scenario where you want to mirror inbound TCP traffic on an instance and then send it to a Gateway Load Balancer via a Gateway Load Balancer endpoint. You need the following Traffic Mirroring entities for this example: • A Traffic Mirroring target for the Gateway Load Balancer endpoint (Target A) in Spoke VPC1 • A Traffic Mirroring target for the Gateway Load Balancer endpoint (Target B) in Spoke VPC2 • A Traffic Mirroring filter with a Traffic Mirroring rule for the TCP inbound traffic (Filter 1) for the Gateway Load Balancer endpoint • A Traffic Mirroring session for Spoke VPC1 that has the following: • A Traffic Mirroring source • A Traffic Mirroring target (Target A) for the Gateway Load Balancer endpoint • A Traffic Mirroring filter (Filter 1) with a Traffic Mirroring rule for the TCP inbound traffic • A Traffic Mirroring session for Spoke VPC2 that has the following: • A Traffic Mirroring source • A Traffic Mirroring target (Target B) for the Gateway Load Balancer endpoint • A Traffic Mirroring filter (Filter 1) with a Traffic Mirroring rule for the TCP inbound traffic Mirror traffic to a Gateway Load Balancer endpoint 29 Amazon Virtual Private Cloud Traffic Mirroring Step 1: Create a traffic mirror target in Spoke VPC1 Create a traffic mirror target (Target A) for the Gateway Load Balancer endpoint in Spoke VPC1. For more information, see Create or delete a traffic mirror target. The Gateway Load Balancer endpoint will be the target when the monitoring appliances are deployed behind a Gateway Load Balancer. Step 2: Create a traffic mirror target in Spoke VPC2 Create a traffic mirror target (Target B) for the Gateway Load Balancer endpoint in Spoke VPC1. For more information, see Create or delete a traffic mirror target. The Gateway Load Balancer endpoint will be the target when the monitoring appliances are deployed behind a Gateway Load Balancer. Step 3: Create a traffic mirror filter rule Create a traffic mirror filter (Filter 1) that has the following inbound rule. For more information on creating a filter, see Create, modify, or delete a traffic mirror filter. Option Rule action Protocol Source port range Destination port range Source CIDR block Destination CIDR block Description Value Accept TCP 0.0.0.0/0 0.0.0.0/0 TCP Rule Step 1: Create a traffic mirror target in Spoke VPC1 30 Amazon Virtual Private Cloud Traffic Mirroring Step 4: Create a traffic mirror session in Spoke VPC1 Create and configure a traffic mirror session with the following options. For more information, see the section called “Create, modify, or delete a traffic mirror session”. Option Mirror source Mirror target Filter Value The network interface of the instance that you want to monitor. Target A Filter 1 Step 5: Create a traffic mirror session in Spoke VPC2 Create and configure a traffic mirror session with the following options. For more information, see the section called “Create, modify, or delete a traffic mirror session”. Option Mirror source Mirror target Filter Value The network interface of the instance that you want to monitor. Target B Filter 1 Step 4: Create a traffic mirror session in Spoke VPC1 31 Amazon Virtual Private Cloud Traffic Mirroring Work with Traffic Mirroring to copy network traffic Traffic Mirroring allows you to create, manage, and share traffic mirror targets. These targets capture and forward a copy of your traffic to the destination of your choice. Whether you're a network administrator, security analyst, or DevOps engineer, Traffic Mirroring |
vpc-tm-011 | vpc-tm.pdf | 11 | information, see the section called “Create, modify, or delete a traffic mirror session”. Option Mirror source Mirror target Filter Value The network interface of the instance that you want to monitor. Target B Filter 1 Step 4: Create a traffic mirror session in Spoke VPC1 31 Amazon Virtual Private Cloud Traffic Mirroring Work with Traffic Mirroring to copy network traffic Traffic Mirroring allows you to create, manage, and share traffic mirror targets. These targets capture and forward a copy of your traffic to the destination of your choice. Whether you're a network administrator, security analyst, or DevOps engineer, Traffic Mirroring enables you to proactively identify and address network issues, ensure compliance, and optimize your overall network performance. With Traffic Mirroring, you can create and delete traffic mirror targets, view and modify their configurations, and even share them with other AWS accounts. You can also construct custom traffic mirror filters to capture only the data you need, and set up, modify, or delete traffic mirror sessions to control the flow of mirrored data. By leveraging these powerful features, you can unlock new insights and make informed decisions about your infrastructure, ultimately enhancing your organization's overall network visibility and security. By using Traffic Mirroring, you can gain visibility into your network, enabling you to make more informed decisions, improve security posture, and drive greater operational efficiency across your AWS environment. You can work with traffic mirror targets, sessions, and filters by using the Amazon VPC console or the AWS CLI. Contents • Create or delete a traffic mirror target • View traffic mirror targets and modify target tags • Share a traffic mirror target • Accept or delete a shared traffic mirror target • Create, modify, or delete a traffic mirror filter • Create, modify, or delete a traffic mirror session Create or delete a traffic mirror target A traffic mirror target is the destination for mirrored traffic. For more information, see the section called “Targets”. Before you can delete a traffic mirror target, you must remove it from any traffic mirror sessions. Create or delete a traffic mirror target 32 Amazon Virtual Private Cloud Traffic Mirroring To create or delete a traffic mirror target using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. In the Region selector, choose the AWS Region that you used when you created the mirror target. 3. On the navigation pane, choose Traffic Mirroring, Mirror targets. 4. To delete a target, select the traffic mirror target and choose Delete. When prompted for confirmation, enter delete, and then choose Delete. The deletion process is complete. 5. 6. 7. 8. To create a target, choose Create traffic mirror target. (Optional) For Name tag, enter a name for the traffic mirror target. (Optional) For Description, enter a description for the traffic mirror target. For Target type, choose the type of the traffic mirror target: • Network interface • Network Load Balancer • Gateway Load Balancer endpoint 9. For Target, choose the traffic mirror target. We display targets based on the target type that you selected in the previous step. 10. (Optional) For each tag to add, choose Add new tag and enter the tag key and tag value. 11. Choose Create. After you create a target, assign it to a traffic mirror session. For more information, see the section called “Create, modify, or delete a traffic mirror session”. You must configure a security group for the traffic mirror target that allows VXLAN traffic (UDP port 4789) from the traffic mirror source. You can share a traffic mirror target across accounts. For more information, see Share a traffic mirror target. To create a traffic mirror target using the AWS CLI Use the create-traffic-mirror-target command. To delete a traffic mirror target using the AWS CLI Create or delete a traffic mirror target 33 Amazon Virtual Private Cloud Traffic Mirroring Use the delete-traffic-mirror-target command. View traffic mirror targets and modify target tags A traffic mirror target is the destination for mirrored traffic. For more information, see the section called “Targets”. Complete the steps in this section to view traffic mirror targets or modify target tags. To view your traffic mirror targets and modify tags using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Traffic Mirroring, Mirror targets. 3. 4. 5. To view a target, select the ID of the traffic mirror target to open its details page. To modify the tags, on the Tags tab, choose Manage tags. (Optional) For each tag to add, choose Add new tag and enter the tag key and tag value. For each tag to remove, choose Remove. 6. Choose Save. To view your traffic mirror targets using the AWS CLI Use the describe-traffic-mirror-targets command. To modify your traffic mirror target tags using the AWS CLI Use |
vpc-tm-012 | vpc-tm.pdf | 12 | Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Traffic Mirroring, Mirror targets. 3. 4. 5. To view a target, select the ID of the traffic mirror target to open its details page. To modify the tags, on the Tags tab, choose Manage tags. (Optional) For each tag to add, choose Add new tag and enter the tag key and tag value. For each tag to remove, choose Remove. 6. Choose Save. To view your traffic mirror targets using the AWS CLI Use the describe-traffic-mirror-targets command. To modify your traffic mirror target tags using the AWS CLI Use the create-tags command to add a tag. Use the delete-tags command to remove a tag. Share a traffic mirror target A traffic mirror target can be owned by an AWS account that is different from the traffic mirror source. You can use AWS Resource Access Manager (RAM) to share a traffic mirror target across accounts. Use the following procedure to share a traffic mirror target that you own. You must create a traffic mirror target before you share it. For more information, see the section called “Create or delete a traffic mirror target”. View traffic mirror targets and modify target tags 34 Amazon Virtual Private Cloud To share a traffic mirror target Traffic Mirroring 1. Open the AWS Resource Access Manager console at https://console.aws.amazon.com/ram/. 2. Choose Create a resource share. 3. Under Description, for Name, enter a descriptive name for the resource share. 4. 5. For Select resource type, choose Traffic Mirror Targets. Select the traffic mirror target. For Principals, add principals to the resource share. For each AWS account, OU, or organization, specify its ID and choose Add. For Allow external accounts, choose whether to allow sharing for this resource with AWS accounts that are external to your organization. 6. (Optional) Under Tags, enter a tag key and tag value pair for each tag. These tags are applied to the resource share but not to the traffic mirror target. 7. Choose Create resource share. Accept or delete a shared traffic mirror target Before you can use a cross-account traffic mirror target, the traffic mirror target owner shares the target with you by using the AWS Resource Access Manager. When you are in different AWS Organizations from the owner, after the owner shares the traffic mirror target, you accept the share request. After you accept the share request, you can use the traffic mirror target in a traffic mirror session. The traffic mirror target is visible to shared accounts in their DescribeTrafficMirrorTarget API calls. Only the traffic mirror target owner can modify or delete the traffic mirror target. Traffic mirror sessions that are created in a different account than the traffic mirror target are visible in DescribeTrafficMirrorSession API calls that are made by the traffic mirror target owner. If you are in different AWS Organizations from the share owner, you must accept the resource share before you can access the shared resources. You can delete a resource share at any time. When you delete a resource share, all principals that are associated with the resource share lose access to the shared resources. Deleting a resource share does not delete the shared resources. Accept or delete a shared traffic mirror target 35 Amazon Virtual Private Cloud Traffic Mirroring When you delete a shared traffic mirror target that is in use, the traffic mirror session becomes inactive. To accept or delete a shared traffic mirror target 1. Open the AWS Resource Access Manager console at https://console.aws.amazon.com/ram/. 2. To accept a shared traffic mirror target, in the navigation pane, choose Shared with me, Resource shares. 3. Select the resource share. 4. Choose Accept resource share. 5. 6. To view the shared traffic mirror target, open the Traffic Mirror Targets page in the Amazon VPC console. To delete a shared traffic mirror target, on the navigation pane, choose Shared by me, Resource shares. 7. Select the resource share. Be sure to select the correct resource share. You cannot recover a resource share after you delete it. 8. Choose Delete. 9. When prompted for confirmation, enter delete, and then choose Delete. Create, modify, or delete a traffic mirror filter Use a traffic mirror filter and its rules to determine the traffic that is mirrored. A traffic mirror filter contains one or more traffic mirror rules. For more information, see the section called “Filters”. Rules are evaluated from the lowest value to the highest value. The first rule that matches the traffic determines the action to take. Before you can delete a traffic mirror filter, you must remove it from any traffic mirror sessions. To create, modify, or delete a traffic mirror filter using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Traffic Mirroring, Mirror filters. 3. To |
vpc-tm-013 | vpc-tm.pdf | 13 | its rules to determine the traffic that is mirrored. A traffic mirror filter contains one or more traffic mirror rules. For more information, see the section called “Filters”. Rules are evaluated from the lowest value to the highest value. The first rule that matches the traffic determines the action to take. Before you can delete a traffic mirror filter, you must remove it from any traffic mirror sessions. To create, modify, or delete a traffic mirror filter using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. On the navigation pane, choose Traffic Mirroring, Mirror filters. 3. To delete a filter, select the traffic mirror filter, and then choose Actions, Delete. Create, modify, or delete a traffic mirror filter 36 Amazon Virtual Private Cloud Traffic Mirroring 4. When prompted for confirmation, enter delete, and then choose Delete. 5. 6. 7. 8. 9. To modify a filter, select the ID of the traffic mirror filter to open its details page. For each rule to add, choose either Inbound rules , Add inbound rule or Outbound rules, and then choose Actions and modify the the rule. To create a filter, choose Create traffic mirror filter. (Optional) For Name tag, enter a name for the traffic mirror filter. (Optional) For Description, enter a description for the traffic mirror filter. (Optional) If you need to mirror Amazon DNS traffic, select amazon-dns. 10. For each rule, inbound or outbound, choose Add rule, and then specify the following information: • Number: The rule priority. • Rule action: Indicates whether to accept or reject the packets. • Protocol: The protocol. • (Optional) Source port range: The source port range. • (Optional) Destination port range: The destination port range. • Source CIDR block: The source CIDR block. The source and destination CIDR blocks must both be either IPv4 ranges or IPv6 ranges. • Destination CIDR block: The destination CIDR block. The source and destination CIDR blocks must both be either IPv4 ranges or IPv6 ranges. • Description: A description for the rule. 11. (Optional) For each tag to add, choose Add new tag and enter the tag key and tag value. 12. Choose Create. To create a traffic mirror filter using the AWS CLI Use the create-traffic-mirror-filter command. To delete a traffic mirror filter using the AWS CLI Use the delete-traffic-mirror-filter command. Create, modify, or delete a traffic mirror filter 37 Amazon Virtual Private Cloud Traffic Mirroring Create, modify, or delete a traffic mirror session A traffic mirror session establishes a relationship between a traffic mirror source and a traffic mirror target. For more information, see the section called “Sessions”. You can create a traffic mirror session only if you are the owner of the network interface or the subnet for the traffic mirror source. To create, modify, or delete a traffic mirror session using the console 1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/. 2. 3. 4. In the Region selector, choose the AWS Region that you used when you created the VPCs. In the navigation pane, choose Traffic Mirroring, Mirror sessions. Select the traffic mirror session, and then choose Actions, Delete. 5. When prompted for confirmation, enter delete, and then choose Delete. 6. To modify a session, select the radio button for the traffic mirror session. 7. Choose Actions, Modify session. 8. 9. To create a session, choose Create traffic mirror session. (Optional) For Name tag, enter a name for the traffic mirror session. 10. (Optional) For Description, enter a description for the traffic mirror session. 11. For Mirror source, choose the network interface of the mirror source. 12. For Mirror target, choose an existing traffic mirror target or choose Create target to create one. For more information, see the section called “Create or delete a traffic mirror target”. If the mirror target is owned by another account and shared with you, you must first accept the resource share. 13. For Additional settings, do the following: a. For Session number, enter the session number. The valid values are 1 to 32,766, where 1 is the highest priority. Sessions are evaluated based on the priority indicated by this session number. b. (Optional) For VNI, enter the VXLAN ID to use for the traffic mirror session. For more information about the VXLAN protocol, see RFC 7348. If you do not enter a value, we assign a random number. c. (Optional) For Packet Length, enter the number of bytes in each packet to mirror. Create, modify, or delete a traffic mirror session 38 Amazon Virtual Private Cloud Traffic Mirroring To mirror the entire packet, do not enter a value. To mirror only a portion of each packet, set this value to the number of bytes to mirror. For example, if you set this value to 100, the first 100 bytes after the VXLAN header that meet the |
vpc-tm-014 | vpc-tm.pdf | 14 | For more information about the VXLAN protocol, see RFC 7348. If you do not enter a value, we assign a random number. c. (Optional) For Packet Length, enter the number of bytes in each packet to mirror. Create, modify, or delete a traffic mirror session 38 Amazon Virtual Private Cloud Traffic Mirroring To mirror the entire packet, do not enter a value. To mirror only a portion of each packet, set this value to the number of bytes to mirror. For example, if you set this value to 100, the first 100 bytes after the VXLAN header that meet the filter criteria are copied to the target. d. For Filter, choose an existing traffic mirror filter. Alternatively, choose Create filter. For more information, see the section called “Step 2: Create the traffic mirror filter”. 14. (Optional) For each tag to add, choose Add new tag and enter the tag key and tag value. 15. If you're modifying a session, choose Modify. If you're creating a session, choose Create. To create a traffic mirror session using the AWS CLI Use the create-traffic-mirror-session command. Create, modify, or delete a traffic mirror session 39 Amazon Virtual Private Cloud Traffic Mirroring Work with open-source tools for traffic mirroring You can use open-source tools to monitor network traffic from Amazon EC2 instances. The following tools work with Traffic Mirroring: • Zeek — For more information, see the Zeek website. • Suricata — For more information see the Suricata website. These open-source tools support VXLAN decapsulation, and they can be used at scale to monitor VPC traffic. For information about how Zeek handles VXLAN support and to download the code, see Zeek vxlan on the GitHub website. For information about how Suricata handles VXLAN support and to download the code, see Suricata on the GitHub website. The following example uses the Suricata open-source tool. You can follow similar steps for Zeek. Consider the scenario where you want to mirror inbound TCP traffic on an instance and send the traffic to an instance that has the Suricata software installed. You need the following traffic mirror entities for this example: • An EC2 instance with the Suricata software installed on it • A traffic mirror target for the EC2 instance (Target A) • A traffic mirror filter with a traffic mirror rule for the TCP inbound traffic (Filter rule 1) • A traffic mirror session that has the following: • A traffic mirror source • A traffic mirror target for the appliance • A traffic mirror filter with a traffic mirror rule for the TCP inbound traffic Step 1: Install the Suricata software on the EC2 instance target Launch an EC2 instance, and then install the Suricata software on it by using the following commands. # Become sudo sudo -s # Install epel-release amazon-linux-extras install -y epel Step 1: Install the Suricata software on the EC2 instance target 40 Amazon Virtual Private Cloud # Install suricata yum install -y suricata # Create the default suricata rules directory mkdir /var/lib/suricata/rules # Add a rule to match all UDP traffic Traffic Mirroring echo 'alert udp any any -> any any (msg:"UDP traffic detected"; sid:200001; rev:1;)' > /var/lib/suricata/rules/suricata.rules # Start suricata listening on eth0 in daemon mode suricata -c /etc/suricata/suricata.yaml -k none -i eth0 -D # Capture logs can be found in /var/log/suricata/fast.log Step 2: Create a traffic mirror target Create a traffic mirror target (Target A) for the EC2 instance. Depending on your configuration, the target is one of the following types: • The network interface of the monitoring appliance • The Network Load Balancer when the appliance is deployed behind one. • The Gateway Load Balancer endpoint when the appliance is deployed behind a Gateway Load Balancer For more information, see the section called “Create or delete a traffic mirror target”. Step 3: Create a traffic mirror filter Create a traffic mirror filter (Filter 1) with the following inbound rule. For more information, see the section called “Create, modify, or delete a traffic mirror filter”. Option Rule action Protocol Source port range Destination port range Value Accept TCP Step 2: Create a traffic mirror target 41 Amazon Virtual Private Cloud Option Source CIDR block Destination CIDR block Description Value 0.0.0.0/0 0.0.0.0/0 TCP Rule Traffic Mirroring Step 4: Create a traffic mirror session Create and configure a traffic mirror session with the following options. For more information, see the section called “Create, modify, or delete a traffic mirror session”. Option Mirror source Mirror target Filter Value The network interface of the instance that you want to monitor. Target A Filter 1 Step 4: Create a traffic mirror session 42 Amazon Virtual Private Cloud Traffic Mirroring Monitor mirrored traffic using Amazon CloudWatch You can monitor your mirrored traffic using Amazon CloudWatch, which collects information from your network interface that is part |
vpc-tm-015 | vpc-tm.pdf | 15 | 0.0.0.0/0 0.0.0.0/0 TCP Rule Traffic Mirroring Step 4: Create a traffic mirror session Create and configure a traffic mirror session with the following options. For more information, see the section called “Create, modify, or delete a traffic mirror session”. Option Mirror source Mirror target Filter Value The network interface of the instance that you want to monitor. Target A Filter 1 Step 4: Create a traffic mirror session 42 Amazon Virtual Private Cloud Traffic Mirroring Monitor mirrored traffic using Amazon CloudWatch You can monitor your mirrored traffic using Amazon CloudWatch, which collects information from your network interface that is part of a traffic mirror session, and creates readable, near real-time metrics. You can use this information to monitor and troubleshoot Traffic Mirroring. For more information about Amazon CloudWatch, see the Amazon CloudWatch User Guide. For more information, see CloudWatch metrics that are available for your instances in Amazon EC2 User Guide. For more information, see Amazon CloudWatch Pricing. Traffic Mirroring metrics and dimensions The following metrics are available for your mirrored traffic at the traffic mirror source: Metric Description NetworkMirrorIn NetworkMirrorOut The number of bytes received on all network interfaces by the instance that are mirrored. The number reported is the number of bytes received during the period. If you are using basic (five-minute) monitoring, you can divide this number by 300 to find Bytes/second. If you have detailed (one-minute) monitoring, divide it by 60. Units: Bytes The number of bytes sent out on all network interfaces by the instance that are mirrored. The number reported is the number of bytes sent during the period. If you are using basic (five-minute) monitoring, you can divide this number by 300 to find Bytes/second. If you have detailed (one-minute) monitoring, divide it by 60. Traffic Mirroring metrics and dimensions 43 Amazon Virtual Private Cloud Metric NetworkPacketsMirrorIn NetworkPacketsMirrorOut NetworkSkipMirrorIn NetworkSkipMirrorOut NetworkPacketsSkipMirrorIn Traffic Mirroring Description Units: Bytes The number of packets received on all network interfaces by the instance that are mirrored. This metric is available for basic monitoring only. Units: Count The number of packets sent out on all network interfaces by the instance that are mirrored. This metric is available for basic monitoring only. Units: Count The number of bytes received, that meet the traffic mirror filter rules, that did not get mirrored because of production traffic taking priority. Units: Bytes The number of bytes sent out, that meet the traffic mirror filter rules, that did not get mirrored because of production traffic taking priority. Units: Bytes The number of packets received, that meet the traffic mirror filter rules, that did not get mirrored because of production traffic taking priority. This metric is available for basic monitoring only. Units: Count Traffic Mirroring metrics and dimensions 44 Amazon Virtual Private Cloud Traffic Mirroring Metric Description NetworkPacketsSkipMirrorOut The number of packets sent out, that meet the traffic mirror filter rules, that did not get mirrored because of production traffic taking priority. This metric is available for basic monitoring only. Units: Count To filter the metric data, use the following dimensions. Dimension Description AutoScalingGroupName ImageId InstanceId InstanceType This dimension filters the data you request for all instances in a specified capacity group. An Auto Scaling group is a collection of instances you define if you're using Auto Scaling. This dimension is available only for Amazon EC2 metrics when the instances are in such an Auto Scaling group. Available for instances with Detailed or Basic Monitoring enabled. This dimension filters the data you request for all instances running this Amazon EC2 Amazon Machine Image (AMI). Available for instances with Detailed Monitoring enabled. This dimension filters the data you request for the identified instance only. This helps you pinpoint an exact instance from which to monitor data. Available for instances with Detailed or Basic Monitoring enabled. This dimension filters the data you request for all instances running with this specified instance type. This helps you categorize your Traffic Mirroring metrics and dimensions 45 Amazon Virtual Private Cloud Traffic Mirroring Dimension Description data by the type of instance running. For example, you might compare data from an m1.small instance and an m1.large instance to determine which has the better business value for your application. Available for instances with Detailed Monitoring enabled. View Traffic Mirroring CloudWatch metrics You can view the metrics for Traffic Mirroring as follows. To view metrics using the CloudWatch console Metrics are grouped first by the service namespace, and then by the various dimension combinations within each namespace. 1. Open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/. 2. In the navigation pane, choose Metrics. 3. Under All metrics, choose the EC2 metric namespace. 4. To view the metrics, select the metric dimension. To view metrics using the AWS CLI At a command prompt, use the following command to list the metrics that are available for Traffic Mirroring: |
vpc-tm-016 | vpc-tm.pdf | 16 | Detailed Monitoring enabled. View Traffic Mirroring CloudWatch metrics You can view the metrics for Traffic Mirroring as follows. To view metrics using the CloudWatch console Metrics are grouped first by the service namespace, and then by the various dimension combinations within each namespace. 1. Open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/. 2. In the navigation pane, choose Metrics. 3. Under All metrics, choose the EC2 metric namespace. 4. To view the metrics, select the metric dimension. To view metrics using the AWS CLI At a command prompt, use the following command to list the metrics that are available for Traffic Mirroring: aws cloudwatch list-metrics --namespace "AWS/EC2" The Traffic Mirroring metrics are included with the metrics for Amazon EC2. View Traffic Mirroring CloudWatch metrics 46 Amazon Virtual Private Cloud Traffic Mirroring Traffic Mirroring limitations This section contains the limitations for Traffic Mirroring. Contents • General limitations • MTU and packet length limitations • Traffic bandwidth and prioritization limitations • Checksum offloading limitations General limitations This section contains general Traffic Mirroring limitations. Instance types The following limitations apply to only the traffic mirroring source instance type. • Traffic Mirroring is not available on the following virtualized Nitro instance types: • General purpose: M8g, M6a, M6i, M6id, M6idn, M6in, M7a, M7g, M7gd, M7i, M7i-flex • Compute optimized: C8g, C6a, C6gd, C6gn, C6i, C6id, C6in, C7a, C7g, C7gd, C7gn, C7i • Memory optimized: R8g, R6a, R6i, R6id, R6idn, R6in, R7a, R7g, R7gd, R7i, R7iz, X8g, X2idn, X2iedn, X2iezn • Storage optimized: I4g, I4i, Im4gn, Is4gen • Accelerated computing: Inf2, P5, Trn1, Trn1n • High-performance computing: Hpc6a, Hpc6id, Hpc7a, Hpc7g • Traffic Mirroring is not available on bare metal instances. • Traffic Mirroring is available only on the following non-Nitro instances types: C4, D2, G3, G3s, H1, I3, M4, P2, P3, R4, X1, and X1e. Note that this does not include T2 instances. IPv6 traffic Traffic Mirroring is not supported for IPv6-only subnets. General limitations 47 Amazon Virtual Private Cloud Traffic types Traffic Mirroring can't mirror the following traffic types: Traffic Mirroring • ARP • DHCP • Instance metadata service • NTP • Windows activation VPC Flow Logs VPC Flow Logs do not capture mirrored traffic. Shared VPCs and subnets • Participants cannot describe, create, modify, or delete a traffic mirror session or target that belongs to the VPC owner. Participants can describe, create, modify, and delete a traffic mirror session or target that belongs to them. • VPC owners cannot describe, create, modify, or delete a traffic mirror session or target that belongs to the participant. For more information see, Share your VPC with other accounts in the Amazon VPC User Guide. MTU and packet length limitations We truncate the packet to the MTU value when both of the following are true: • The traffic mirror target is a standalone instance. • The mirrored traffic packet size is greater than the traffic mirror target MTU value. For example, if an 8996 byte packet is mirrored, and the traffic mirror target MTU value is 9001 bytes, the mirror encapsulation results in the mirrored packet being greater than the MTU value. In this case, the mirror packet is truncated. To prevent mirror packets from being truncated, set the traffic mirror source interface MTU value to 54 bytes less than the traffic mirror target MTU value for IPv4 and 74 bytes less than the traffic mirror target MTU value when you use IPv6. Therefore, the maximum MTU value supported by Traffic Mirroring with no packet truncation is 8947 bytes. MTU and packet length limitations 48 Amazon Virtual Private Cloud Traffic Mirroring In addition, the packet length cannot be less than 35 bytes (for IPv4 traffic) and 55 bytes (for IPv6 traffic). For more information about configuring the network MTU value, see Network maximum transmission unit (MTU) in the Amazon EC2 User Guide. Traffic bandwidth and prioritization limitations Mirrored traffic counts toward instance bandwidth. For example, if you mirror a network interface that has 1 Gbps of inbound traffic and 1 Gbps of outbound traffic, the instance must handle 4 Gbps of traffic (1 Gbps inbound, 1 Gbps mirrored inbound, 1 Gbps outbound, and 1 Gbps mirrored outbound) and your packet size should be equal to or greater than 1500 Bytes. Note that the per flow limit for EC2 instances not in placement groups is 5Gbps. For instances not in placement groups, the per flow throughput should be lower than 2.5Gbps or mirrored packets will be dropped. Production traffic has a higher priority than mirrored traffic when there is traffic congestion. As a result, mirrored traffic is dropped when there is congestion. The mirroring drops can occur at lower bandwidths also if the average packet size of your traffic is small. By default, each Gateway Load Balancer endpoint can support a bandwidth of up to 10 Gbps per Availability |
vpc-tm-017 | vpc-tm.pdf | 17 | 1500 Bytes. Note that the per flow limit for EC2 instances not in placement groups is 5Gbps. For instances not in placement groups, the per flow throughput should be lower than 2.5Gbps or mirrored packets will be dropped. Production traffic has a higher priority than mirrored traffic when there is traffic congestion. As a result, mirrored traffic is dropped when there is congestion. The mirroring drops can occur at lower bandwidths also if the average packet size of your traffic is small. By default, each Gateway Load Balancer endpoint can support a bandwidth of up to 10 Gbps per Availability Zone and automatically scales up to 100 Gbps. For more information, see AWS PrivateLink quotas in the AWS PrivateLink Guide. Checksum offloading limitations The Elastic Network Adapter (ENA) provides checksum offloading capabilities. If a packet is truncated, this might result in the packet checksum not being calculated for the mirrored packet. The following checksums are not calculated when the mirrored packet is truncated: • If the mirror packet is truncated, the mirror packet L4 checksum is not calculated. • If any part of the L3 header is truncated, the L3 checksum is not calculated. If this causes issues, you can disable ENA checksum offloading on the ENA for the source. For example, use the following commands on Amazon Linux 2: [ec2-user ~]$ sudo ethtool --offload eth0 tx off [ec2-user ~]$ sudo ethtool --show-offload eth0 Traffic bandwidth and prioritization limitations 49 Amazon Virtual Private Cloud Features for eth0: rx-checksumming: on tx-checksumming: off tx-checksum-ipv4: off tx-checksum-ip-generic: off [fixed] tx-checksum-ipv6: off [fixed] tx-checksum-fcoe-crc: off [fixed] tx-checksum-sctp: off [fixed] Traffic Mirroring Checksum offloading limitations 50 Amazon Virtual Private Cloud Traffic Mirroring Traffic Mirroring quotas The following are the quotas for Traffic Mirroring for your AWS account. Contents • Sessions • Targets • Filters • Throughput • Packets • Sources Sessions Name Default Adjustable Maximum number of sessions per account 10,000 Maximum number of sessions per source network interface 3 No No Maximum number of sessions for a single Gateway Load Balancer endpoint Unlimited Not applicable Targets Name Default Adjustable Maximum number of targets per account 10,000 No Sessions 51 Amazon Virtual Private Cloud Traffic Mirroring Filters Name Default Adjustable Maximum number of filters per account 10,000 Maximum number of sessions per source network interface 3 Maximum number of filter rules per filter 10 No No No Throughput Name Default Adjustable Maximum throughput through a single Gateway Load Balancer endpoint 100 Gbps No Packets Name Maximum number of MTUs for a Gateway Load Balancer endpoint Sources Name Maximum number of sources per Network Load Balancer Maximum number of sources per Gateway Load Balancer endpoint Default 8,500 Adjustable No Default No limit No limit Adjustable No No Filters 52 Amazon Virtual Private Cloud Traffic Mirroring Name Default Adjustable Maximum number of sources per target No 100 or 10 depending on the instance type. For more informati on, see the list below 1 1 The following instance types support up to 100 sources per target. All other instance types support up to 10 sources per target. • General Purpose: m5.24xlarge | m5d.24xlarge | m5dn.24xlarge | m5n.24xlarge | m5zn.12xlarge | m6a.48xlarge | m6g.16xlarge | m6gd.16xlarge | m6i.32xlarge | m6id.32xlarge | m6idn.32xlarge | m6in.32xlarge | m7a.48xlarge | m7i.48xlarge | m8g.48xlarge | m8gd.48xlarge • Compute Optimized: c5.18xlarge | c5.24xlarge | c5d.18xlarge | c5d.24xlarge | c5n.18xlarge | c6a.48xlarge | c6g.16xlarge | c6gd.16xlarge | c6gn.16xlarge | c6i.32xlarge | c6id.32xlarge | c6in.32xlarge | c7a.48xlarge | c7gn.16xlarge | c7i.48xlarge | c8g.48xlarge | c8gd.48xlarge • Memory Optimized: r5.24xlarge | r5b.24xlarge | r5d.24xlarge | r5dn.24xlarge | r5n.24xlarge | r6a.48xlarge | r6g.16xlarge | r6gd.16xlarge | r6i.32xlarge | r6idn.32xlarge | r6in.32xlarge | r6id.32xlarge | r7a.48xlarge | r7i.48xlarge | r7iz.32xlarge | r8g.48xlarge | r8gd.48xlarge | u-6tb1.56xlarge | u-6tb1.112xlarge | u-9tb1.112xlarge | u-12tb1.112xlarge | u-18tb1.112xlarge | u-24tb1.112xlarge | u7i-6tb.112xlarge | u7i-8tb.112xlarge | u7i-12tb.224xlarge | u7in-16tb.224xlarge | u7in-24tb.224xlarge | u7in-32tb.224xlarge | u7inh-32tb.480xlarge | x2gd.16xlarge | x2idn.32xlarge | x2iedn.32xlarge | x2iezn.12xlarge | x8g.48xlarge | z1d.12xlarge • Storage Optimized: i3en.24xlarge | i4g.16xlarge | i4i.32xlarge | i7i.48xlarge | i7ie.48xlarge | i8g.48xlarge | im4gn.16xlarge • Accelerated Computing: dl1.24xlarge | dl2q.24xlarge | f2.48xlarge | g5.48xlarge | g5g.16xlarge | g6.48xlarge | g6e.12xlarge | g6e.24xlarge | g6e.48xlarge | inf1.24xlarge | inf2.48xlarge | p3dn.24xlarge | p4d.24xlarge | p4de.24xlarge | p5.48xlarge | p5e.48xlarge | p5en.48xlarge | p6- b200.48xlarge | trn1.32xlarge | trn1n.32xlarge | trn2.48xlarge | trn2u.48xlarge | vt1.24xlarge • High Performance Computing: hpc6a.48xlarge | hpc6id.32xlarge | hpc7a.12xlarge | hpc7a.24xlarge | hpc7a.48xlarge | hpc7a.96xlarge | hpc7g.4xlarge | hpc7g.8xlarge | hpc7g.16xlarge Sources 53 Amazon Virtual Private Cloud Traffic Mirroring Identity and access management for Traffic Mirroring AWS Identity and Access Management (IAM) is an AWS service that helps an administrator securely control access to AWS resources. Administrators control who can be authenticated (signed in) and authorized (have permissions) to use traffic mirror resources. To allow access to traffic mirror resources, you create |
vpc-tm-018 | vpc-tm.pdf | 18 | p5.48xlarge | p5e.48xlarge | p5en.48xlarge | p6- b200.48xlarge | trn1.32xlarge | trn1n.32xlarge | trn2.48xlarge | trn2u.48xlarge | vt1.24xlarge • High Performance Computing: hpc6a.48xlarge | hpc6id.32xlarge | hpc7a.12xlarge | hpc7a.24xlarge | hpc7a.48xlarge | hpc7a.96xlarge | hpc7g.4xlarge | hpc7g.8xlarge | hpc7g.16xlarge Sources 53 Amazon Virtual Private Cloud Traffic Mirroring Identity and access management for Traffic Mirroring AWS Identity and Access Management (IAM) is an AWS service that helps an administrator securely control access to AWS resources. Administrators control who can be authenticated (signed in) and authorized (have permissions) to use traffic mirror resources. To allow access to traffic mirror resources, you create and attach an IAM policy to an IAM role and users or groups assume that role. The IAM role must be given permission to use specific traffic mirror resources and API actions. When you attach a policy to a role, it allows or denies permission to perform the specified tasks on the specified resources. You can also use resource-level permissions to restrict what resources users can use when they invoke APIs. Example Example: CreateTrafficMirrorSession policy The following IAM policy allows users to use the CreateTrafficMirrorSession API, but restricts the action to a specific traffic mirror target (tmt-12345645678). To create a traffic mirror session, users must also have permission to use the traffic mirror filter and network interface resources. Therefore, you must include these resources in the IAM policy attached to the role. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "ec2:CreateTrafficMirrorSession", "Resource": [ "arn:aws:ec2:*:*:traffic-mirror-target/tmt-12345645678", "arn:aws:ec2:*:*:traffic-mirror-filter/*", "arn:aws:ec2:*:*:network-interface/*" ] } ] } For more information about supported traffic mirror actions, resources, and condition keys, see Actions, resources, and condition keys for Amazon EC2 in the Service Authorization Reference. 54 Amazon Virtual Private Cloud Traffic Mirroring Document history for Traffic Mirroring The following table describes the releases for Traffic Mirroring. Change Description Date Support for Gateway Load Balancer endpoints as traffic Send mirrored traffic to monitoring appliances mirror targets registered with a Gateway May 12, 2022 Support for non-Nitro instance types Load Balancer. Enable Traffic Mirroring on the following non-Nitro instance types: C4, D2, G3, G3s, H1, I3, M4, P2, P3, R4, X1 and X1e. February 10, 2021 Support for Amazon CloudWatch Monitor your mirrored traffic using Amazon CloudWatch. November 25, 2019 Initial release This release introduces Traffic Mirroring. June 25, 2019 55 |
vpc-ug-001 | vpc-ug.pdf | 1 | User Guide Amazon Virtual Private Cloud Copyright © 2025 Amazon Web Services, Inc. and/or its affiliates. All rights reserved. Amazon Virtual Private Cloud User Guide Amazon Virtual Private Cloud: User Guide Copyright © 2025 Amazon Web Services, Inc. and/or its affiliates. All rights reserved. Amazon's trademarks and trade dress may not be used in connection with any product or service that is not Amazon's, in any manner that is likely to cause confusion among customers, or in any manner that disparages or discredits Amazon. All other trademarks not owned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected to, or sponsored by Amazon. Amazon Virtual Private Cloud Table of Contents User Guide What is Amazon VPC? ..................................................................................................................... 1 Features .......................................................................................................................................................... 1 Getting started with Amazon VPC ........................................................................................................... 3 Working with Amazon VPC ........................................................................................................................ 3 Pricing for Amazon VPC .............................................................................................................................. 3 How Amazon VPC works ................................................................................................................. 6 VPCs and subnets ......................................................................................................................................... 7 Default and nondefault VPCs .................................................................................................................... 7 Route tables ................................................................................................................................................... 8 Access the internet ....................................................................................................................................... 8 Access a corporate or home network ...................................................................................................... 9 Connect VPCs and networks ...................................................................................................................... 9 AWS private global network .................................................................................................................... 10 Plan your VPC ................................................................................................................................ 11 Sign up for an AWS account ................................................................................................................... 11 Verify permissions ...................................................................................................................................... 12 Determine your IP address ranges ......................................................................................................... 12 Select your Availability Zones ................................................................................................................. 12 Plan your internet connectivity ............................................................................................................... 13 Create your VPC ......................................................................................................................................... 13 Deploy your application ............................................................................................................................ 13 IP addressing ................................................................................................................................. 15 Private IPv4 addresses .............................................................................................................................. 16 Public IPv4 addresses ................................................................................................................................ 16 IPv6 addresses ............................................................................................................................................ 18 Public IPv6 addresses ........................................................................................................................... 18 Private IPv6 addresses ......................................................................................................................... 19 Use your own IP addresses ...................................................................................................................... 21 Use Amazon VPC IP Address Manager .................................................................................................. 21 VPC CIDR blocks ......................................................................................................................................... 21 IPv4 VPC CIDR blocks .......................................................................................................................... 21 Manage IPv4 CIDR blocks for a VPC ................................................................................................. 23 IPv4 CIDR block association restrictions .......................................................................................... 25 IPv6 VPC CIDR blocks .......................................................................................................................... 27 iii Amazon Virtual Private Cloud User Guide Subnet CIDR blocks ................................................................................................................................... 28 Subnet sizing for IPv4 ......................................................................................................................... 29 Subnet sizing for IPv6 ......................................................................................................................... 29 Compare IPv4 and IPv6 ............................................................................................................................ 30 Managed prefix lists .................................................................................................................................. 32 Prefix lists concepts and rules ........................................................................................................... 32 Identity and access management for prefix lists ........................................................................... 33 Customer-managed prefix lists .......................................................................................................... 34 AWS-managed prefix lists ................................................................................................................... 44 Optimize AWS infrastructure management with prefix lists ....................................................... 46 AWS IP address ranges ............................................................................................................................. 48 Download ................................................................................................................................................ 49 Egress control ........................................................................................................................................ 50 Geolocation feed ................................................................................................................................... 50 Find address ranges ............................................................................................................................. 50 Syntax ...................................................................................................................................................... 57 Subscribe to notifications ................................................................................................................... 62 IPv6 support for your VPC ....................................................................................................................... 64 Add IPv6 support for your VPC ......................................................................................................... 64 Example dual-stack VPC ...................................................................................................................... 69 IPv6 support on AWS ................................................................................................................................ 71 Services that support IPv6 .................................................................................................................. 71 Additional IPv6 support ...................................................................................................................... 81 Learn more ............................................................................................................................................. 82 Virtual private clouds .................................................................................................................... 83 VPC basics .................................................................................................................................................... 84 VPC IP address range ........................................................................................................................... 84 VPC diagram .......................................................................................................................................... 84 VPC resources ........................................................................................................................................ 85 VPC configuration options ....................................................................................................................... 86 Default VPCs ............................................................................................................................................... 87 Default VPC components .................................................................................................................... 88 Default subnets ..................................................................................................................................... 90 Work with your default VPC and default subnets ......................................................................... 91 Create a VPC ............................................................................................................................................... 95 Create a VPC plus other VPC resources ........................................................................................... 95 iv Amazon Virtual Private Cloud User Guide Create a VPC only ................................................................................................................................. 97 Create a VPC using the AWS CLI ....................................................................................................... 99 Visualize the resources in your VPC ..................................................................................................... 103 Add or remove CIDR block .................................................................................................................... 105 DHCP option sets ..................................................................................................................................... 107 What is DHCP? .................................................................................................................................... 108 DHCP option set concepts ................................................................................................................ 109 Work with DHCP option sets ........................................................................................................... 112 DNS attributes .......................................................................................................................................... 117 Understanding Amazon DNS ........................................................................................................... 117 View DNS hostnames for your EC2 instance ................................................................................ 122 View and update DNS attributes for your VPC ............................................................................ 123 Network Address Usage ......................................................................................................................... 124 How NAU is calculated ...................................................................................................................... 125 NAU examples ..................................................................................................................................... 126 Share a VPC subnet ................................................................................................................................. 127 Shared subnet prerequisites ............................................................................................................. 128 Working with shared subnets .......................................................................................................... 128 Billing and metering for owner and participants ........................................................................ 131 Responsibilities and permissions for owners and participants .................................................. 132 AWS resources and shared VPC subnets ....................................................................................... 134 Extend a VPC to other Zones ................................................................................................................ 136 Subnets in AWS Local Zones ........................................................................................................... 137 Subnets in AWS Wavelength ............................................................................................................ 142 Subnets in AWS Outposts ................................................................................................................. 144 Delete your VPC ....................................................................................................................................... 146 Delete using the console .................................................................................................................. 146 Delete using the CLI .......................................................................................................................... 147 Generate IaC from console actions ...................................................................................................... 148 Subnets ......................................................................................................................................... 150 Subnet basics ............................................................................................................................................ 150 Subnet IP address range ................................................................................................................... 150 Subnet types ........................................................................................................................................ 151 Subnet diagram .................................................................................................................................. 151 Subnet routing .................................................................................................................................... 152 Subnet settings ................................................................................................................................... 152 v Amazon Virtual Private Cloud User Guide Subnet security ......................................................................................................................................... 153 Create a subnet ........................................................................................................................................ 153 Add or remove an IPv6 CIDR block from your subnet ..................................................................... 155 Modify the IP addressing attributes of your subnet ........................................................................ 156 Subnet CIDR reservations ...................................................................................................................... 157 Work with subnet CIDR reservations using the console |
vpc-ug-002 | vpc-ug.pdf | 2 | 146 Delete using the console .................................................................................................................. 146 Delete using the CLI .......................................................................................................................... 147 Generate IaC from console actions ...................................................................................................... 148 Subnets ......................................................................................................................................... 150 Subnet basics ............................................................................................................................................ 150 Subnet IP address range ................................................................................................................... 150 Subnet types ........................................................................................................................................ 151 Subnet diagram .................................................................................................................................. 151 Subnet routing .................................................................................................................................... 152 Subnet settings ................................................................................................................................... 152 v Amazon Virtual Private Cloud User Guide Subnet security ......................................................................................................................................... 153 Create a subnet ........................................................................................................................................ 153 Add or remove an IPv6 CIDR block from your subnet ..................................................................... 155 Modify the IP addressing attributes of your subnet ........................................................................ 156 Subnet CIDR reservations ...................................................................................................................... 157 Work with subnet CIDR reservations using the console ............................................................. 158 Work with subnet CIDR reservations using the AWS CLI ........................................................... 158 Route tables .............................................................................................................................................. 160 Route table concepts ......................................................................................................................... 160 Subnet route tables ........................................................................................................................... 161 Gateway route tables ......................................................................................................................... 168 Route priority ...................................................................................................................................... 171 Example routing options ................................................................................................................... 173 Change a subnet route table ........................................................................................................... 187 Replace the main route table .......................................................................................................... 193 Control traffic entering your VPC with a gateway route table .................................................. 194 Replace or restore the target for a local route ............................................................................ 195 Dynamic routing in your VPC .......................................................................................................... 196 Troubleshoot reachability issues ..................................................................................................... 220 Middlebox routing wizard ...................................................................................................................... 220 Middlebox routing wizard prerequisites ........................................................................................ 221 Redirect VPC traffic to a security appliance ................................................................................. 221 Middlebox routing wizard considerations ..................................................................................... 223 Middlebox scenarios ........................................................................................................................... 224 Delete a subnet ........................................................................................................................................ 234 Connect your VPC ........................................................................................................................ 236 Internet gateways .................................................................................................................................... 237 Internet gateway basics .................................................................................................................... 238 Create an internet gateway .............................................................................................................. 240 Delete an internet gateway .............................................................................................................. 243 Egress-only internet gateways .............................................................................................................. 244 Egress-only internet gateway basics .............................................................................................. 244 Add egress-only internet access to a subnet ................................................................................ 246 NAT devices ............................................................................................................................................... 248 NAT gateways ...................................................................................................................................... 250 NAT instances ...................................................................................................................................... 297 vi Amazon Virtual Private Cloud User Guide Compare NAT devices ........................................................................................................................ 309 Elastic IP addresses ................................................................................................................................. 312 Elastic IP address concepts and rules ............................................................................................. 313 Start using Elastic IP addresses ....................................................................................................... 314 AWS Transit Gateway .............................................................................................................................. 324 AWS Virtual Private Network ................................................................................................................ 325 VPC peering connections ....................................................................................................................... 326 Monitoring ................................................................................................................................... 328 VPC Flow Logs .......................................................................................................................................... 329 Flow logs basics .................................................................................................................................. 330 Flow log records ................................................................................................................................. 333 Flow log record examples ................................................................................................................. 344 Flow log limitations ........................................................................................................................... 353 Pricing ................................................................................................................................................... 355 Work with flow logs ........................................................................................................................... 355 Publish to CloudWatch Logs ............................................................................................................ 359 Publish to Amazon S3 ....................................................................................................................... 366 Publish to Amazon Data Firehose ................................................................................................... 375 Query using Athena ........................................................................................................................... 382 Troubleshoot ........................................................................................................................................ 386 CloudWatch metrics ................................................................................................................................ 390 NAU metrics and dimensions ........................................................................................................... 391 Enable or disable NAU monitoring ................................................................................................. 394 NAU CloudWatch alarm example .................................................................................................... 395 Security ........................................................................................................................................ 396 Data protection ........................................................................................................................................ 397 Internetwork traffic privacy .............................................................................................................. 398 Identity and access management ......................................................................................................... 398 Audience ............................................................................................................................................... 399 Authenticate with identities ............................................................................................................. 399 Manage access using policies ........................................................................................................... 402 How Amazon VPC works with IAM ................................................................................................. 405 Policy examples .................................................................................................................................. 409 Troubleshoot ........................................................................................................................................ 421 AWS managed policies ...................................................................................................................... 423 Infrastructure security ............................................................................................................................. 426 vii Amazon Virtual Private Cloud User Guide Network isolation ............................................................................................................................... 426 Control network traffic ...................................................................................................................... 427 Compare security groups and network ACLs ................................................................................ 428 Security groups ........................................................................................................................................ 429 Security group basics ......................................................................................................................... 431 Security group example .................................................................................................................... 432 Security group rules ........................................................................................................................... 433 Default security groups ..................................................................................................................... 438 Create a security group ..................................................................................................................... 440 Configure security group rules ........................................................................................................ 441 Delete a security group ..................................................................................................................... 443 Associate security groups with multiple VPCs ............................................................................. 444 Share security groups with AWS Organizations ........................................................................... 447 Network ACLs ........................................................................................................................................... 453 Network ACL basics ............................................................................................................................ 454 Network ACL rules .............................................................................................................................. 456 Default network ACL .......................................................................................................................... 457 Custom network ACLs ....................................................................................................................... 459 Path MTU Discovery ........................................................................................................................... 464 Create a network ACL ........................................................................................................................ 465 Manage network ACL associations .................................................................................................. 468 Delete a network ACL ........................................................................................................................ 471 Example: Control access to instances in a subnet ....................................................................... 472 Resilience ................................................................................................................................................... 475 Compliance validation ............................................................................................................................ 477 Block public access to VPCs and subnets ........................................................................................... 478 VPC BPA basics ................................................................................................................................... 479 Assess impact of VPC BPA and monitor VPC BPA ....................................................................... 485 Advanced example ............................................................................................................................. 489 Best practices ............................................................................................................................................ 543 Use with other services ............................................................................................................... 544 AWS PrivateLink ....................................................................................................................................... 545 AWS Network Firewall ............................................................................................................................ 546 Route 53 Resolver DNS Firewall ........................................................................................................... 548 Reachability Analyzer .............................................................................................................................. 549 Examples ...................................................................................................................................... 550 viii Amazon Virtual Private Cloud User Guide Test environment ..................................................................................................................................... 551 Overview ............................................................................................................................................... 551 1. Create the VPC ............................................................................................................................... 553 2. Deploy your application ............................................................................................................... 554 3. Test your configuration ................................................................................................................ 555 4. Clean up ........................................................................................................................................... 555 Web and database servers ..................................................................................................................... 555 Overview ............................................................................................................................................... 555 1. Create the VPC ............................................................................................................................... 559 2. Deploy your application ............................................................................................................... 561 3. Test your configuration ................................................................................................................ 561 4. Clean up ........................................................................................................................................... 561 Private servers .......................................................................................................................................... 562 Overview ............................................................................................................................................... 562 1. Create the VPC ............................................................................................................................... 565 2. Deploy your application ............................................................................................................... 566 3. Test your configuration ................................................................................................................ 566 4. Clean up ........................................................................................................................................... 566 Quotas .......................................................................................................................................... 567 VPC and subnets ...................................................................................................................................... 567 DNS ............................................................................................................................................................. 568 Elastic IP addresses ................................................................................................................................. 568 Gateways .................................................................................................................................................... |
vpc-ug-003 | vpc-ug.pdf | 3 | VPC ............................................................................................................................... 553 2. Deploy your application ............................................................................................................... 554 3. Test your configuration ................................................................................................................ 555 4. Clean up ........................................................................................................................................... 555 Web and database servers ..................................................................................................................... 555 Overview ............................................................................................................................................... 555 1. Create the VPC ............................................................................................................................... 559 2. Deploy your application ............................................................................................................... 561 3. Test your configuration ................................................................................................................ 561 4. Clean up ........................................................................................................................................... 561 Private servers .......................................................................................................................................... 562 Overview ............................................................................................................................................... 562 1. Create the VPC ............................................................................................................................... 565 2. Deploy your application ............................................................................................................... 566 3. Test your configuration ................................................................................................................ 566 4. Clean up ........................................................................................................................................... 566 Quotas .......................................................................................................................................... 567 VPC and subnets ...................................................................................................................................... 567 DNS ............................................................................................................................................................. 568 Elastic IP addresses ................................................................................................................................. 568 Gateways .................................................................................................................................................... 568 Customer-managed prefix lists ............................................................................................................. 569 Network ACLs ........................................................................................................................................... 570 Network interfaces .................................................................................................................................. 571 Route tables .............................................................................................................................................. 571 Route servers ............................................................................................................................................ 572 Security groups ........................................................................................................................................ 574 VPC subnet sharing ................................................................................................................................. 575 Network Address Usage ......................................................................................................................... 576 Amazon EC2 API throttling .................................................................................................................... 576 Additional quota resources .................................................................................................................... 576 Document history ........................................................................................................................ 578 ix Amazon Virtual Private Cloud User Guide What is Amazon VPC? With Amazon Virtual Private Cloud (Amazon VPC), you can launch AWS resources in a logically isolated virtual network that you've defined. This virtual network closely resembles a traditional network that you'd operate in your own data center, with the benefits of using the scalable infrastructure of AWS. The following diagram shows an example VPC. The VPC has one subnet in each of the Availability Zones in the Region, EC2 instances in each subnet, and an internet gateway to allow communication between the resources in your VPC and the internet. For more information, see Amazon Virtual Private Cloud (Amazon VPC). Features The following features help you configure a VPC to provide the connectivity that your applications need: Virtual private clouds (VPC) A VPC is a virtual network that closely resembles a traditional network that you'd operate in your own data center. After you create a VPC, you can add subnets. Features 1 Amazon Virtual Private Cloud Subnets User Guide A subnet is a range of IP addresses in your VPC. A subnet must reside in a single Availability Zone. After you add subnets, you can deploy AWS resources in your VPC. IP addressing You can assign IP addresses, both IPv4 and IPv6, to your VPCs and subnets. You can also bring your public IPv4 addresses and IPv6 GUA addresses to AWS and allocate them to resources in your VPC, such as EC2 instances, NAT gateways, and Network Load Balancers. Routing Use route tables to determine where network traffic from your subnet or gateway is directed. Gateways and endpoints A gateway connects your VPC to another network. For example, use an internet gateway to connect your VPC to the internet. Use a VPC endpoint to connect to AWS services privately, without the use of an internet gateway or NAT device. Peering connections Use a VPC peering connection to route traffic between the resources in two VPCs. Traffic Mirroring Copy network traffic from network interfaces and send it to security and monitoring appliances for deep packet inspection. Transit gateways Use a transit gateway, which acts as a central hub, to route traffic between your VPCs, VPN connections, and AWS Direct Connect connections. VPC Flow Logs A flow log captures information about the IP traffic going to and from network interfaces in your VPC. VPN connections Connect your VPCs to your on-premises networks using AWS Virtual Private Network (AWS VPN). Features 2 Amazon Virtual Private Cloud User Guide Getting started with Amazon VPC Your AWS account includes a default VPC in each AWS Region. Your default VPCs are configured such that you can immediately start launching and connecting to EC2 instances. For more information, see Plan your VPC. You can choose to create additional VPCs with the subnets, IP addresses, gateways and routing that you need. For more information, see the section called “Create a VPC”. Working with Amazon VPC You can create and manage your VPCs using any of the following interfaces: • AWS Management Console — Provides a web interface that you can use to access your VPCs. • AWS Command Line Interface (AWS CLI) — Provides commands for a broad set of AWS services, including Amazon VPC, and is supported on Windows, Mac, and Linux. For more information, see AWS Command Line Interface. • AWS SDKs — Provides language-specific APIs and takes care of many of the connection details, such as calculating signatures, handling request retries, and error handling. For more information, see AWS SDKs. • Query API — Provides low-level API actions that you call using HTTPS requests. Using the Query API is the most direct way to access Amazon VPC, but it requires that your application handle low-level details such as generating the hash to sign the request, and error handling. For more information, see Amazon VPC actions in the Amazon EC2 API Reference. Pricing for Amazon |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.