Search code examples
azure-devopsamazon-rdsazure-devops-hosted-agent

Accessing Amazon RDS Postgresql from Azure DevOps Hosted Agent


How can I allow Azure DevOps Hosted Agent access my Amazon RDS PostgreSql without setting the Security Group to Anywhere. I was looking for IP Range or something to whitelist Azure DevOps Agents but can't find it.

In Azure, I can check a box to grant all "Azure DevOps Services" access to my Azure SQL Database but of course its not present in AWS.


Solution

  • I don't think we can access the Amazon RDS PostgreSql directly from Azure DevOps Hosted Agent, I mean using the hosted service account.

    However, Amazon RDS for PostgreSQL Supports User Authentication with Kerberos and Microsoft Active Directory, so we can try writing script to access it by using the specific credential. Then run the scripts in pipeline by adding corresponding tasks (e.g AWS CLI or AWS PowerShell).

    Also check How do I allow users to connect to Amazon RDS with IAM credentials?

    For the IP ranges, please refer to Allowed address lists and network connections and Microsoft-hosted Agents for details.