Linked server from SQL server on AWS RDS to On premises MS SQL server database

clip art of 
 a double-quote character

Question

We are planing to migrate an on-premises SQL Server db to AWS RDS SQL Server. My only concern is how can I create a linked server from AWS RDS SQL Server to on-premises SQL Server db? Is it possible? I am checking it because there are many views using linked server to other on-premises dbs.

asked 2019-10-07 by Khoa


Answer

UPDATE:
Amazon has updated their functionality for linked servers from RDS:

the previous restrictions about being in the same VPC no longer apply. As long as the IP address is reachable or the DNS name can be resolved, RDS SQL Server linked servers can target any SQL Server.

This means that RDS can now connect to any SQL Server, no matter where it lives: RDS/EC2/on prem/a different cloud. It still requires sorting out networking between the two instances so they can talk to each other, but that applies to any linked server.

The "previous restrictions" referenced in the quoted documentation above is referred to in my original answer, which I’ll leave quoted here as a matter of clarity as to what the above docs are talking about. This restriction is no longer applicable:

SQL Server linked servers only work from RDS to RDS & EC2 instances
within a single VPC. You cannot create linked servers from RDS to your
on premises data center, nor any other instance that lives outside
that VPC.

You should be able to create a linked server FROM your on premises TO
RDS, just not the other way around.

Things change quickly in the cloud, and at some point, AWS may be able
to ease this restriction, but as of now, those linked servers will be
a problem if you want to migrate that instance to RDS.

answered 2019-10-07 by Andy Mallon