web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Connecting SQL server ...
Power Apps
Unanswered

Connecting SQL server which is hosted on AWS using private IP

(0) ShareShare
ReportReport
Posted on by

Hi Team,

 

 

I am trying to connect MS SQL Server for building Power Apps. I have SQL server Database which is hosted on the AWS. I tried to add connection to the SQL server hosted on AWS using the Power Apps. But, I got the below error.

 

{
"error": {
"code": 502,
"source": "india-001.azure-apim.net",
"clientRequestId": "f7ea6b3d-2b04-46cf-8f52-3e369653c5dc",
"message": "BadGateway",
"innerError": {
"status": 502,
"message": "Microsoft SQL: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - The wait operation timed out.)\r\nclientRequestId: f7ea6b3d-2b04-46cf-8f52-3e369653c5dc",
"error": {
"message": "Microsoft SQL: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - The wait operation timed out.)"
},
"source": "sql-ci.azconn-ci.p.azurewebsites.net"
}
}
}

Session ID: bee67d61-ddc3-4d43-8832-78b7ca1df39c

 

 

I supplied all the required information.

SQL Server Name :- The private IP Address to my AWS machine where the SQL server is hosted.

SQL Database Name :- Name of my DB
UserName and PWD


Could you help me with this.

 

 

Categories:
I have the same question (0)
  • timl Profile Picture
    36,415 Super User 2025 Season 2 on at

    Hi @Anonymous 

    In terms of SQL Server, PowerApps supports SQL Azure and on-premise instances of SQL through the on premise gateway.

    If you're hosting SQL Server on a virtual machine in AWS, you'll need to install the on premise gateway in your virtual machine. If you're using Amazon RDS, this is not supported.

    https://powerusers.microsoft.com/t5/Building-Power-Apps/Unable-to-create-a-connection-to-SQL-Server-in-RDS/td-p/263109

     

  • Community Power Platform Member Profile Picture
    on at

    Thanks for reverting on this. I will try installing the on premis gateway and see if this works.

  • Community Power Platform Member Profile Picture
    on at

    Hi @timl ,

     

    Thanks for your valuable inputs on this. I tried to install the On premises gateway on my AWS virtual machine with appropriate credentials. The gateway was installed successfully. Then I opened the Power Apps website on the virtual machine and tried to add the SQL server connection. The gateway was not detected in the choose gateway dropdown. I tried refreshing the list and also re installing the gateway, but that didn't help. I also, ran the Diagnostic test of the gateway and the test was successful. However, the gateway was still not visible in the dropdown.

     

    Here are the screen shot. If you could help me with this that would be helpful.

    Thanks

  • timl Profile Picture
    36,415 Super User 2025 Season 2 on at

    Hi @Anonymous 

    By default, the gateway will be visible in your default environment. Can you confirm that you are using the default environment?

  • Community Power Platform Member Profile Picture
    on at

    Hi @timl ,

     

     

    I am using the default environment while selecting the gateway. Still it is not visible. Find the attached screen shot.

     

    Gatewaynot found.png

    Thanks and Regards,

    Swapnil Gaikwad

  • timl Profile Picture
    36,415 Super User 2025 Season 2 on at

    That's strange.

    If you go to the Data > Gateways section in the Maker portal, does your gateway appear there?

    https://make.powerapps.com/

    If not, does it appear in any of your other environments other than your default environment?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard