# Aws: connection to postgres keep timing out

**URL:** <https://community.grafana.com/t/aws-connection-to-postgres-keep-timing-out/12381>\
**Category:** PostgreSQL\
**Tags:** postgres\
**Created:** [November 27, 2018, 2:04am UTC](https://community.grafana.com/t/aws-connection-to-postgres-keep-timing-out/12381 "2018-11-27T02:04:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![guymograbi](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/guymograbi/32/5247_2.png) [@guymograbi](https://community.grafana.com/u/guymograbi)\
**Post date:** [November 27, 2018, 2:04am UTC](https://community.grafana.com/t/aws-connection-to-postgres-keep-timing-out/12381/1 "2018-11-27T02:04:09Z")

</div>

I am trying to demo grafana to my team.  
I am spinning a new DB on amazon (using postgres) and I am able to populate it with data from my sql client.

But I cannot connect to it from Grafana.  
I tried a bunch of different configurations.

Couldn’t decide if this is the same case as other topics opened here.

I am at a loss… really need this to work.  
Sounds to me like a basic scenario that should work out of the box.  
Is there any special AWS configurations I should apply? Not really familiar with AWS.

Just to clarify - I do “save & test” on the datasource and the test fails after a LONG time with timeout.  
I have used grafana with AWS previously without problems, but this is the first I am setting up the DB as well.

---

<div class="post-metadata">

**Author:** ![guymograbi](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/guymograbi/32/5247_2.png) [@guymograbi](https://community.grafana.com/u/guymograbi)\
**Post date:** [November 27, 2018, 2:11am UTC](https://community.grafana.com/t/aws-connection-to-postgres-keep-timing-out/12381/2 "2018-11-27T02:11:53Z")

</div>

Ok, I found out each DB gets a security group.  
BUT - someone please explain to me… I was able to run code on my machine to populate it, and connect with SQL clients…

Why did Grafana fail to connect to it? Right now I allowed everyone to connect (did security group inbound anywhere rule).

But I would really like some explanation why Grafana was the only one not able to connect to the instance.
