AWS Transit Gateway Multi-Account Implementation Guide

Overview

This document provides step-by-step instructions for implementing a centralized Transit Gateway solution across multiple AWS accounts using AWS Organizations. The solution automates the creation of VPCs and Transit Gateway attachments in member accounts using CloudFormation Stack Sets.

Prerequisites

  • AWS Organizations set up with a management account

  • Minimum of one member account

  • Administrative access to the management account

  • Service-managed permissions enabled in Organizations

Implementation Steps

1. Create Transit Gateway in Management Account

# transit-gateway.yaml
Resources:
  TransitGateway:
    Type: AWS::EC2::TransitGateway
    Properties:
      AmazonSideAsn: 64512
      AutoAcceptSharedAttachments: enable
      DefaultRouteTableAssociation: enable
      DefaultRouteTablePropagation: enable
      Description: Central Transit Gateway for cross-account networking
      Tags:
        - Key: Name
          Value: Central-TGW

2. Configure Resource Access Manager (RAM)

  1. Enable resource sharing:

  1. Create RAM share for Transit Gateway:

3. Create CloudFormation Stack Set

4. Deploy Stack Set

  1. Create Stack Set:

  1. Create Stack Instances:

Validation Steps

  1. Verify Transit Gateway Attachments:

  1. Check VPC Creation:

Monitoring and Maintenance

CloudWatch Metrics to Monitor

  • TransitGatewayAttachment status

  • VPC creation status

  • Stack Set deployment status

Regular Maintenance Tasks

  1. Review and update route tables

  2. Monitor attachment status

  3. Verify proper resource sharing

  4. Check CloudFormation stack status

Security Considerations

  1. Network Security

    • Implement appropriate NACLs and Security Groups

    • Enable VPC Flow Logs

    • Configure proper route table entries

  2. Access Control

    • Use IAM roles with least privilege

    • Implement resource-based policies

    • Regular audit of RAM shares

  3. Compliance

    • Enable AWS Config

    • Implement appropriate tags

    • Monitor CloudTrail logs

Troubleshooting

Common Issues and Solutions

  1. Stack Set Deployment Failures

    • Verify service-managed permissions

    • Check IAM roles and permissions

    • Review CloudFormation logs

  2. Transit Gateway Attachment Issues

    • Verify RAM sharing status

    • Check subnet configurations

    • Review route table entries

  3. Networking Problems

    • Validate route propagation

    • Check CIDR overlap

    • Verify security group rules

Cost Considerations

  1. Transit Gateway Costs

    • Attachment hours

    • Data processing charges

    • Cross-AZ traffic

  2. CloudFormation Costs

    • Stack operations

    • API calls

Best Practices

  1. Naming Conventions

    • Use consistent naming patterns

    • Include account IDs in resource names

    • Tag all resources appropriately

  2. Network Design

    • Plan CIDR ranges carefully

    • Consider future growth

    • Document routing policies

  3. Automation

    • Use Infrastructure as Code

    • Implement proper error handling

    • Regular testing of automation

Appendix

Useful Commands

Reference Architecture Diagram

[Include the architecture diagram created earlier]

Template Modifications

Document any customizations needed for specific use cases or requirements.

Version History

Version
Date
Author
Changes

1.0

2025-01-11

Cloud Team

Initial document


End of Implementation Guide

Last updated

Was this helpful?