# Setting up a VPC Route Server with Pulumi

DevFeed: [Setting up a VPC Route Server with Pulumi](<https://devfeed.tech/articles/setting-up-a-vpc-route-server-with-pulumi-10920.md>)

Original publisher: [Read original article](<https://blog.scottlowe.org/2026/01/28/setting-up-a-vpc-route-server-with-pulumi/>)

Author: Scott Lowe

Published: 2026-01-28T13:00:00Z

Content type: tutorial

Language: en

Sources: [Scott's Weblog](<https://devfeed.tech/sources/scott-s-weblog.md>)

Topics: [VPC](<https://devfeed.tech/topics/vpc.md>), [Amazon Web Services](<https://devfeed.tech/topics/aws.md>), [BGP](<https://devfeed.tech/topics/bgp.md>), [GitHub](<https://devfeed.tech/topics/github.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [aws](<https://devfeed.tech/tags/aws.md>), [bgp](<https://devfeed.tech/tags/bgp.md>), [cilium](<https://devfeed.tech/tags/cilium.md>), [cli](<https://devfeed.tech/tags/cli.md>), [cloud](<https://devfeed.tech/tags/cloud.md>), [cni](<https://devfeed.tech/tags/cni.md>), [code](<https://devfeed.tech/tags/code.md>), [containers](<https://devfeed.tech/tags/containers.md>), [cri-o](<https://devfeed.tech/tags/cri-o.md>), [devops](<https://devfeed.tech/tags/devops.md>), [docker](<https://devfeed.tech/tags/docker.md>), [github](<https://devfeed.tech/tags/github.md>), [go](<https://devfeed.tech/tags/go.md>), [iac](<https://devfeed.tech/tags/iac.md>), [k8s](<https://devfeed.tech/tags/k8s.md>), [kubernetes](<https://devfeed.tech/tags/kubernetes.md>), [linux](<https://devfeed.tech/tags/linux.md>), [networking](<https://devfeed.tech/tags/networking.md>), [oci](<https://devfeed.tech/tags/oci.md>), [security](<https://devfeed.tech/tags/security.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>), [vpc](<https://devfeed.tech/tags/vpc.md>)

## AI overview

A tutorial on using Pulumi to create and configure an AWS VPC Route Server for BGP-learned route injection. It covers creating the Route Server, associating it with a VPC, creating an endpoint for BGP peering, handling an explicit dependency between components, and propagating learned routes to a VPC route table.

## Source excerpt

If you need to work with BGP in your AWS VPCs--so that BGP-learned routes can be injected into a VPC route table--then you will likely need a VPC Route Server. While you could set up a VPC Route Server manually, what's the fun in that? In this post, I will walk you through a Pulumi program that will set up a VPC Route Server. Afterward, I will discuss some ways you could check the functionality of the VPC Route Server to show that it is indeed working as expected. To make things as easy as possible, I have added a simple Pulumi program to my GitHub "learning-tools" repository in the aws/vpc-route-server directory. This program sets up a VPC Route Server and its associated components for you, and I will walk through this program in this blog post. The first step is creating the VPC Route Server itself. The VPC Route Server has no prerequisities, and the primary configuration needed is setting the ASN (Autonomous System Number) the Route Server should use: rs, err := vpc.NewRouteServer(ctx, "rs", &vpc.RouteServerArgs{ AmazonSideAsn: pulumi.Int(65534), Tags: pulumi.StringMap{ "Name": pulumi.String("rs"), "Project": pulumi.String("vpc-route-server"), }, }) Next, you will need to associate the Route Server with a VPC. This requires a VPC ID, as you might expect; this ID could come from a configuration value passed in by the user, or from a VPC created earlier in this or another Pulumi program. rsa, err := vpc.NewRouteServerVpcAssociation(ctx, "rsa", &vpc.RouteServerVpcAssociationArgs{ RouteServerId: rs.ID(), VpcId: pulumi.String(userSuppliedVpcId), }) With that association in place, the next component is a Route Server Endpoint. This endpoint is created in a subnet, and will have an IP address assigned from that subnet. This IP address is what your BGP peer will use to establish a peering relationship to exchange routes. rse, err := vpc.NewRouteServerEndpoint(ctx, "rse", &vpc.RouteServerEndpointArgs{ RouteServerId: rs.RouteServerId, SubnetId: pulumi.String(userSuppliedPriv