Accessing Redshift from Lambda - Avoiding the 0.0.0.0/0 Security Group
<p>I am trying to access a Redshift database from a Lambda function. When I add 0.0.0.0/0 to the security group connections in the Redshift interface (as suggested by <a href="https://blogs.aws.amazon.com/bigdata/post/Tx24VJ6XF1JVJAA/A-Zero-Administration-Amazon-Redshift-Database-Loader" rel="nofollow">this article</a>), I am able to connect successfully. From a security perspective, however, I don't feel comfortable using 0.0.0.0/0. </p>

<p>Is there a way to only allow Lambda to access Redshift without opening it up to the public internet?</p>

<p>I have tried adding the <a href="https://ip-ranges.amazonaws.com/ip-ranges.json" rel="nofollow">AWS IP ranges</a>, however, this didn't work (as it only allows a limited number of security group connections).</p>