Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Table of contents
1.
Introduction
2.
Working of AWS Transit Gateway
2.1.
Architecture
2.2.
Resource Attachments
2.3.
Availability Zones
2.4.
Routing
3.
Features of Transit Gateway
4.
Frequently Asked Questions
4.1.
What is AWS Transit Gateway?
4.2.
What is VPC?
4.3.
List some resource attachments for the transit gateway.
4.4.
Does AWS Transit Gateway route over a public network?
4.5.
What is VPN?
5.
Conclusion
Last Updated: Mar 27, 2024
Easy

AWS Transit Gateway

Author Ankit Kumar
0 upvote
Master Python: Predicting weather forecasts
Speaker
Ashwin Goyal
Product Manager @

Introduction

A Transit Gateway is a network transit hub that connects your virtual private clouds (VPCs) with your on-premises networks. And this article will discuss AWS Transit Gateway, how it works, and some of its features. 

The AWS Transit Gateway service consolidates the AWS VPC routing configuration for a region using a hub-and-spoke design. It is a highly available and scalable service. Inter-Region peering uses the AWS Global Architecture to connect transit gateways as your cloud infrastructure grows internationally. AWS Transit Gateway traffic is always routed through the AWS global backbone and never over the public internet, decreasing the risk of typical vulnerabilities and DDoS attacks.

Let us discuss how the AWS transit gateway works.

Working of AWS Transit Gateway

A transit gateway acts as a virtual router for traffic flowing between your virtual private clouds (VPCs) and on-premises networks. A transit gateway scales softly based on the volume of network traffic. The transit gateway requires an Architecture diagram, resource attachments, availability zones, and routing to work. Let us discuss them one by one.

Architecture

The diagram given below shows a transit gateway with three VPCs. 

Source: https://docs.aws.amazon.com/vpc/latest/tgw/how-transit-gateways-work.html

 

The route table for each of these VPCs comprises the local route and routes that transmit traffic to the transit gateway meant for the other two VPCs.

Resource Attachments

A transit gateway attachment is a source and the destination of the packets. Here we can attach the following to our gateway:

  1. One or more Virtual Private Cloud (VPC)
  2. One or more VPN
  3. One or more Transit Gateway Connect attachments
  4. One or more Transit Gateway Peering Connections
  5. One or more AWS Direct Connect Gateways

Also, an intra-region peering connection is supported. So, we can have different transit gateways in different regions.

Availability Zones

When we attach one or more VPCs to a transit gateway, we 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, we specify precisely one subnet. Resources in Availability Zones with no transit gateway attachment cannot connect to the transit gateway. The transit gateway creates a network interface in that subnet using one of the subnet's IP addresses. When an Availability Zone is enabled, traffic can be routed to all subnets in that zone, not just the selected subnet.

Routing

Using transit gateway route tables, transit gateway routes IPv4 and IPv6 packets between attachments. These route tables may be configured to propagate routes from the route tables to the associated VPCs, VPN connections, and Direct Connect gateways. Static routes can also be added to transit gateway route tables. When a packet arrives at one attachment, it is sent to another using the route corresponding to the destination IP address.

Note- For transit gateway peering attachments, only static routes are supported.

Let us discuss some features of the Transit Gateway.

Get the tech career you deserve, faster!
Connect with our expert counsellors to understand how to hack your way to success
User rating 4.7/5
1:1 doubt support
95% placement record
Akash Pal
Senior Software Engineer
326% Hike After Job Bootcamp
Himanshu Gusain
Programmer Analyst
32 LPA After Job Bootcamp
After Job
Bootcamp

Features of Transit Gateway

We have discussed Transit Gateway, its working, advantages. Now let's have a look at the features of the transit gateway.

  1. Routing: Between Amazon Virtual Private Clouds (VPCs) and VPN, AWS Transit Gateways offers both dynamic and static layer three routings. Routes identify the next hop based on the packet's destination IP address and can lead to an Amazon VPC or a VPN connection.
  2. Edge Connectivity: VPN connections between your AWS Transit Gateway and on-premises gateways may be established. You may set up additional VPN connections that broadcast the same prefixes and activate Equal Cost Multipath (ECMP) between them. ECMP can boost bandwidth by load-balancing traffic over different channels.
  3. Transit Gateway Connect: AWS Transit Gateway Connect allows SD-WAN equipment to be natively integrated into AWS. Customers may now extend their SD-WAN edge into AWS utilising standard protocols like Generic Routing Encapsulation (GRE) and Border Gateway Protocol (BGP). 
  4. Monitoring: AWS Transit Gateway provides statistics and logs used by Amazon CloudWatch and Amazon VPC Flow Logs.
  5. Management: To construct and administer your AWS Transit Gateway, you may use the command-line interface (CLI), AWS Management Console, or AWS CloudFormation. The Amazon CloudWatch metrics provided by AWS Transit Gateway include the number of bytes transferred and received between Amazon VPCs and VPNs, the packet count, and the drop count.
  6. Security: Traffic between an Amazon VPC and an AWS Transit Gateway is routed over the AWS global private network and is not accessible to the public internet. AWS Transit Gateway inter-Region peering encrypts all traffic and eliminates the possibility of a single point of failure or bandwidth constraint. This aids in the prevention of distributed denial of service (DDoS) attacks and other common vulnerabilities.
  7. Flexible Multicast: AWS Transit Gateway's multicast capability allows you to send the same content to several destinations simultaneously. This removes the need for costly on-premises multicast networks and minimizes the bandwidth required for high-throughput applications such as video conferencing, media streaming, and teleconferencing.

 

Let us see some FAQs related to the topic.

Frequently Asked Questions

What is AWS Transit Gateway?

It is a network transit hub that connects your virtual private clouds (VPCs) with your on-premises network.

What is VPC?

VPC is Virtual Private Cloud that enables us to launch AWS resources into a virtual network.

List some resource attachments for the transit gateway.

VPCs, VPN, AWS direct connect gateway, and Transit gateway peering connections are some attachments for transit gateway.

Does AWS Transit Gateway route over a public network?

No, it is not routed over the public network but on a global AWS backbone.

What is VPN?

VPN is a virtual private network that encrypts the internet traffic on an unsecured network.

Let us summarise the article.

Conclusion

In this article, we have extensively discussed AWS Transit Gateway. We learned AWS Transit with examples and also some faqs related to this topic.

After reading about AWS Transit Gateway, are you not feeling excited to read/explore more articles on AWS? Don’t worry Coding ninjas has you covered. To learn, see AWS License ManagerSQS in ASW AWS Console Mobile ApplicationAWS Features, and AWS Elemental MediaPackage.

Refer to our Guided Path on Coding Ninjas Studio to upskill yourself in Data Structures and AlgorithmsCompetitive ProgrammingJavaScriptSystem Design, and many more! If you want to test your competency in coding, you may check out the mock test series and participate in the contests hosted on Coding Ninjas Studio! But if you have just started your learning process and are looking for questions asked by tech giants like Amazon, Microsoft, Uber, etc; you must look at the problems, interview experiences, and interview bundle for placement preparations.

Nevertheless, you may consider our paid courses to give your career an edge over others!

Do upvote our blogs if you find them helpful and engaging!

Happy Learning!

Previous article
AWS PrivateLink
Next article
AWS VPN
Live masterclass