Skip to main content

Guidance for Automating Amazon VPC Routing in a Global Cloud WAN Deployment

Overview

This Guidance demonstrates how to automatically update the routing tables of your Amazon Virtual Private Cloud (Amazon VPC) when the Amazon VPC is attached or detached from an AWS Cloud WAN segment. It provides an automated Amazon VPC routing solution where workloads residing within Amazon VPCs have network connectivity to each other regardless of which Region the Amazon VPC resides.

How it works

This diagram shows how to create an end-to-end global routing cloud network. You can deploy an Amazon Virtual Private Cloud (Amazon VPC) in multiple AWS Regions and automate your global Amazon VPC routing with this event-driven architecture.

Well-Architected Pillars

The architecture diagram above is an example of a Solution created with Well-Architected best practices in mind. To be fully Well-Architected, you should follow as many Well-Architected best practices as possible.

AWS Cloud WAN provides a central dashboard for making connections between multiple Amazon VPCs, allowing you to build a global network quickly. The dashboard generates a full view of your AWS networks to monitor for security and performance. 

The AWS Service Health dashboard will show if any of the services are down and help you respond to incidents and events, thanks to the use of AWS managed services.

Read the Operational Excellence whitepaper

Use AWS Identity and Access Management (IAM) policies to grant access to Lambda, which is needed to make an API call or update an Amazon VPC routing table. IAM roles used in this Guidance follow the least privilege permission model.

Operations on AWS Cloud WAN will generate events, while EventBridge will carry the events securely to the right Region and invoke a Lambda function. 

Read the Security whitepaper

This Guidance uses AWS Cloud WAN, IPAM, and EventBridge services that are highly available by default. Lambda makes an API call to an Amazon VPC within the same Region, so there are no cross-Region dependencies. Additionally, Lambda automatically monitors Lambda functions on your behalf and sends logs to Amazon CloudWatch. Your Lambda function comes with a CloudWatch Logs group and a log stream for each instance of your function.

There are some limits you should be aware of that may affect reliability. EventBridge has a limit of 50 requests for every second. But it is unlikely you would accumulate 50 Amazon VPCs for every second to your global network.

Read the Reliability whitepaper

The services selected in this Guidance were purpose-built for this use, providing an end-to-end fully automated global network solution:

  • AWS Cloud WAN: Orchestrates the creation of a global network. 

  • Amazon VPC: A logically isolated construct where you can deploy your services. Each VPC connects into AWS Cloud WAN.

  • IPAM: The container for each department’s routing information.

  • EventBridge: The carrier for events generated by AWS Cloud WAN and invokes the right Lambda function.

  • Lambda: Adds the right route in a newly attached Amazon VPC routing table.

We recommend you deploy the Lambda functions in the Regions of your operations to decrease latency and improve performance. EventBridge will always invoke the local or Regional Lambda function to minimize latency. This Guidance also pushes the right route to each Amazon VPC routing table, helping ensure only the expected traffic patterns are enabled. 

Read the Performance Efficiency whitepaper

This Guidance, as with the vast majority of our cloud services, uses a pay-as-you-go approach. You pay only for the services you need, for as long as you use them. AWS Cloud WAN and EventBridge automatically scale based on demand and with only the minimum resources required. 

If setting AWS Cloud WAN as a default route to Amazon VPCs, all outgoing traffic from the VPC that matches the default route would be sent to AWS Cloud WAN, which would incur data processing charges. This Guidance pushes only the individual's network route in the Amazon VPC routing table, helping you to save on cost.

Read the Cost Optimization whitepaper

Lambda is optimized for this Guidance, offering automatic scaling to help ensure you are using only the minimal resources while continuously matching the demand of your workloads. 

Metadata is derived from an AWS Cloud WAN event-driven mechanism where data is not stored anywhere, only carried by EventBridge.

Read the Sustainability whitepaper

Deploy with confidence

Ready to deploy? Review the sample code on GitHub for detailed deployment instructions to deploy as-is or customize to fit your needs. 

Go to sample code

Disclaimer

The sample code; software libraries; command line tools; proofs of concept; templates; or other related technology (including any of the foregoing that are provided by our personnel) is provided to you as AWS Content under the AWS Customer Agreement, or the relevant written agreement between you and AWS (whichever applies). You should not use this AWS Content in your production accounts, or on production or other critical data. You are responsible for testing, securing, and optimizing the AWS Content, such as sample code, as appropriate for production grade use based on your specific quality control practices and standards. Deploying AWS Content may incur AWS charges for creating or using AWS chargeable resources, such as running Amazon EC2 instances or using Amazon S3 storage.

References to third-party services or organizations in this Guidance do not imply an endorsement, sponsorship, or affiliation between Amazon or AWS and the third party. Guidance from AWS is a technical starting point, and you can customize your integration with third-party services when you deploy the architecture.