Connecting an Azure Virtual Network (10.0.0.0/16) to an AWS VPC (172.16.0.0/16) over a BGP-routed Site-to-Site VPN requires jumping between both cloud consoles because each side needs the public IP and BGP parameters generated by the other.

This is a complete from-scratch lab deployment covering every portal field, CIDR block, and ASN needed to pass encrypted traffic between both clouds. The Azure Virtual Network Gateway (VNG) is also included in an Azure for Students subscription, so you can build this lab without paying full gateway rates.

How Azure and AWS networking primitives map to each other#

Azure and AWS run the same IPSec and BGP mechanics behind different resource names, so translating the terminology first prevents configuration mistakes when switching consoles.

Interactive Reference / Cross-Cloud Translation9 Primitives Mapped

Azure to AWS Site-to-Site VPN translation map#

Both clouds use the same IPSec and BGP mechanics under different names. Filter by layer or search a term to see how each Azure resource pairs with its AWS counterpart in this lab.

AzureVirtual Network (vNet)
AWSVirtual Private Cloud (VPC)
NetworkingConfigured in lab10.0.0.0/16 (Azure) <-> 172.16.0.0/16 (AWS)

Isolated private IP address space and subnet boundary inside each cloud.

AzureVirtual Network Gateway (VNG)
AWSVirtual Private Gateway (VGW)
VPN & BGPConfigured in labRoute-based Gen2 VNG <-> AWS VGW (ASN 64512)

Cloud-managed IPSec VPN termination point attached to your private network.

AzureLocal Network Gateway (LNG)
AWSCustomer Gateway (CGW)
VPN & BGPConfigured in labAWS Outside IP + ASN 64512 <-> Azure Public IP + ASN 65000

Logical object representing the remote peer gateway public IP and BGP ASN.

AzureVPN Connection (Site-to-Site)
AWSSite-to-Site VPN Connection
VPN & BGPConfigured in labAPIPA /30 tunnel: 169.254.21.2 (Azure) <-> 169.254.21.1 (AWS)

Encrypted IPSec tunnel and BGP session that dynamically exchanges CIDR routes.

AzureGatewaySubnet
AWSPrivate Subnet + Route Propagation
NetworkingConfigured in lab10.0.1.0/24 dedicated subnet <-> VGW route propagation enabled

Dedicated routing path that lets VPN gateway traffic reach workload subnets.

AzureNetwork Security Group (NSG)
AWSSecurity Group
Security & OpsConfigured in labAllow inbound/outbound ICMP between 10.0.0.0/16 and 172.16.0.0/16

Stateful packet filter controlling allowed ports, protocols, and CIDR sources.

AzurePublic IP Address
AWSElastic IP / AWS-Assigned Outside IP
NetworkingConfigured in labVpnGw-PublicIp <-> Two redundant AWS outside tunnel IPs

Internet-routable endpoint addresses used to establish the outer IPSec tunnel.

AzureResource Group
AWSResource Groups / Tags
Security & OpsConfigured in labrg-1 container <-> Tag-scoped VPC resources

Lifecycle and governance boundary grouping related cloud infrastructure.

AzureAzure Virtual Machine
AWSAmazon EC2 Instance
ComputeTest endpoints used to verify cross-cloud ICMP ping

Virtual server workloads deployed inside private subnets on each side.

Showing 9 of 9 cross-cloud primitives.Every BGP tunnel requires symmetric peer definitions: Azure Local Network Gateway mirrors AWS Customer Gateway, and Azure VNG mirrors AWS Virtual Private Gateway.

Step 1: Deploy the Azure Virtual Network Gateway#

Start in Azure because the Virtual Network Gateway (VNG) takes roughly 30 minutes to provision, and AWS needs the Azure public IP before you can create the remote gateway object.

Traditionally, a VPN gateway sends encrypted traffic from an Azure vNet over the public Internet to an on-premises firewall. Here, AWS takes the place of on-premises.

Navigate to the Azure Portal.

Search for Virtual network gateway in Azure Portal

Search for and select Virtual network gateway, then select Create.

Blank Virtual network gateway configuration form

Subscription: [YOUR-SUBSCRIPTION]

Resource Group: [YOUR-RESOURCEGROUP]
===

Instance details
 - Name: VpnGw
 - Region: East US 2
 - Gateway Type: VPN

VPN type: Route-based

Generation: Generation2

Virtual Network: Create virtual network

Name: vNet-1
 - Resource Group: rg-1
 - Address space: 10.0.0.0/16
   - Subnets:
     - default: 10.0.0.0/24
     - Gateway subnet address range: 10.0.1.0/24 <--(This will populate once you create the vNet)

Public IP address
 - Public IP address: Create new
 - Public IP address name: VpnGw-PublicIp
 - Public IP address SKU: Basic
 - Assignment: Dynamic
 - Enabled active-active: Disabled
 - Configure BGP: Disabled

This creates the Resource Group container (rg-1), the 10.0.0.0/16 vNet, and a dedicated GatewaySubnet (10.0.1.0/24). Leave Configure BGP disabled for now; you will enable it after pulling the BGP settings from AWS. Even though the gateway itself takes about 30 minutes, the Public IP address allocates quickly so you can copy it and move to AWS.

Step 2: Build the AWS VPC and Site-to-Site VPN#

In AWS, use the Azure VNG Public IP to define your Customer Gateway, then stand up a 172.16.0.0/16 VPC and a dynamic Site-to-Site VPN connection.

Using a 172.16.0.0/16 address space in AWS against 10.0.0.0/16 in Azure makes routing tables and ping tests immediately obvious. A Customer Gateway tells AWS how to reach your remote VPN device, which in this lab is the Azure VNG.

Navigate to the AWS Console.

Search for VPC in AWS Console

Search for and select VPC, then press Launch VPC Wizard.

AWS VPC Launch Wizard

Walk through the four wizard steps to launch a VPC with a private subnet and hardware VPN access, supplying the Azure VNG Public IP in Step 3:

Step 1: Select a VPC Configuration
- Select the fourth option: VPC with a Private Subnet Only and Hardware VPN Access


Step 2: VPC with a Private Subnet Only and Hardware VPN Access
- IPv4 CIDR block: 172.16.0.0/16
- IPv6 CIDR block: No IPv6 CIDR Block
- VPC name: vpc-1

---

- Private subnet's IPv4 CIDR: 172.16.0.0/24
- Availability Zone: No Preference
- Private subnet name: Private subnet

---

Service endpoints: Left blank

---

- Enable DNS hostnames: Yes
- Hardware tenancy: Default

Step 3:
- Customer Gateway IP:[AZURE-PUBLIC-IP] <--- From the Azure VNG
- Customer Gateway name: Azure
- VPN Connection name: AWS-to-Azure

---

- Routing Type: Dynamic (requires BGP)

Once the wizard finishes, stay on the VPC page and open VIRTUAL PRIVATE NETWORK > Site-to-Site VPN Connections from the left pane. Two tasks remain on the AWS side: setting the inside tunnel CIDR to match Azure’s APIPA range and downloading the tunnel configuration file.

Modify AWS Site-to-Site VPN Tunnel Options

Right-click the new VPN Connection and select Modify VPN Tunnel Options:

- Select Tunnel 1
  * Inside IPv4 CIDR: 169.254.21.0/30

  * All other options can be left to their defaults

AWS VPN Tunnel details showing APIPA range

Azure requires custom APIPA BGP addresses in 169.254.21.* or 169.254.22.*, while AWS expects a /30 CIDR inside 169.254.0.0/16. AWS automatically assigns itself the first usable IP in that /30 block, which here is 169.254.21.1.

Back on the Site-to-Site VPN Connection page, select Download Configuration with these options:

+ Vendor: Generic

+ Platform: Generic

+ Software: Vendor Agnostic

Record these values from the downloaded .txt file before returning to Azure:

For IPSec Tunnel #1

+(Line 36) Pre-Shared Key : GENERATED-BY-AMAZON

+ Outside IP Addresses:

  -(Line 94) Virtual Private Gateway : GENERATED-BY-AMAZON

+(Line 111) Customer Gateway ASN : 65000

+(Line 112) Virtual Private  Gateway ASN : 64512

+(Line 113) Neighbor IP Address : 169.254.21.1

===================

For IPSec Tunnel #2

+(Line 138) Pre-Shared Key : GENERATED-BY-AMAZON

+ Outside IP Addresses:

  -(Line 196) Virtual Private Gateway : GENERATED-BY-AMAZON

+(Line 213) Customer Gateway ASN : 65000

+(Line 214) Virtual Private  Gateway ASN : 64512

+(Line 215) Neighbor IP Address : 169.254.22.1

Step 3: Wire AWS BGP settings back into Azure#

Create an Azure Local Network Gateway using the AWS outside IP and ASN, then enable BGP on your Azure Virtual Network Gateway with the matching APIPA address.

Return to the Azure Portal, search for Local network gateways, and select Create.

Create Azure Local Network Gateway

Populate the Local Network Gateway using Interface #1 from your AWS config file:

* Name: Aws-Tunnel-1
* Endpoint: IP address
* IP address: OUTSIDE-VPG-IP<---found in the config file [Interface #1]
  + Address space: LEFT BLANK
  + Check the box to `Configure BGP settings`
    - Autonomous system number (ASN): 64512 <-- found in the config file [VPG ASN]
* Subscription: YOURSUBSCRIPTION
* Resource group: rg-1
* Location EastUs2

Next, open Virtual network gateways, go to Settings > Configuration, and enable Configure BGP. Enter the Customer Gateway ASN (65000) and the second usable IP in the /30 tunnel range (169.254.21.2).

Configure BGP settings on Azure Virtual Network Gateway

Add the Autonomous system number (ASN): 65000 <--- found in the config file [Customer Gateway ASN]

* Custom Azure APIPA BGP IP address: 169.254.21.2 <--- the next available IP in the /30 in Azure

To make this connection redundant across both AWS tunnels, create a second Basic SKU Dynamic Public IP in Azure and configure Tunnel #2 in AWS with another /30 inside the accepted Azure APIPA range (169.254.22.0/30).

How to verify and troubleshoot cross-cloud traffic#

Deploy one VM in the Azure vNet and one EC2 instance in the AWS private subnet, then verify connectivity with ICMP ping across the tunnel.

Final Azure-to-AWS VPN architecture diagram

If pings fail, check two common blockers first:

  • Verify that your AWS Route Tables have Route propagation enabled for the Virtual Private Gateway so learned BGP routes reach the private subnet.
  • Confirm that the AWS Security Group attached to your target instance allows inbound ICMP traffic from the Azure CIDR (10.0.0.0/16), and that outbound ICMP is permitted.

Reference documentation#

Azure resources#

AWS resources#