Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a beanstalk server that is trying to connect to a postgres db running on a ec2 machine. The ips are unknown as they always change. What kind of security should I allow for the db? Normally you retrict to only your known server ip.

share|improve this question

migrated from May 19 '11 at 14:08

This question came from our site for professional and enthusiast programmers.

You can use AWS security groups to make your postgres server only accessible to your beanstalk instances. Just set up the security group on the postgres server to only allow incoming traffic from instances in your Beanstalk security group. This is effectively a firewall at the TCP/IP level, but you can block/allow based on AWS security groups instead of IP addresses. As far as I know, this should be pretty darn secure. At least, if you trust that Amazon has implemented its security group feature well.

share|improve this answer

You might find this recent and mildly related pg-performance thread interesting:

In particular:

share|improve this answer

You can try define VPC security group.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.