I have created an Sql Server instance in Amazon RDS.
What I want to do is a scenario like this:
SELECT query on a database that resides on my cloud Sql ServerWhat I'm not sure of is:
RDS won't be able to perform these operations without help. You'll either need an EC2 instance or some other server, be it locally hosted or other on which you can run a BCP job, SSIS package, or other home-baked solution. RDS is just the database engine, and there's nothing native within SQL Server on RDS that allows for external file manipulation and/or transfer.
From Amazon's Importing and Exporting SQL Server Data Using Other Methods page:
Exporting Data from SQL Server on Amazon RDS
- Native database backup using a full backup file (.bak) – Using .bak files to backup databases is heavily optimized, and is usually the fastest way to export data. For more information, see Importing and Exporting SQL Server Databases.
- SQL Server Import and Export Wizard – For more information, see SQL Server Import and Export Wizard.
- SQL Server Generate and Publish Scripts Wizard and bcp utility – For more information, see SQL Server Generate and Publish Scripts Wizard and bcp Utility.
Another option may be to utilize AWS Lamdba to do this as well. I've not worked with this in much depth personally, but this article from Amazon describes a similar process for exporting data from Oracle and PostgreSQL and in the final sections of the article state this is possible for SQL Server as well.