Static IP guide
Connecting to Amazon Redshift with a static IP from a Node app on Heroku
Redshift clusters sit behind VPC security groups, and analytics jobs running on Heroku dynos arrive from a different IP every restart. Redshift speaks the Postgres wire protocol, so the same pg-plus-socksjs pattern used for Postgres connects to your cluster on port 5439 through Fixie's fixed addresses.
Recommended setup
Use Fixie Socks Heroku add-on for Amazon Redshift connections that require a stable source IP. Store the proxy value in FIXIE_SOCKS_HOST, then configure Node.js to route outbound traffic through Fixie before connecting to Amazon Redshift.
Set up Fixie on Heroku
Heroku is a native Fixie marketplace flow. Install the Fixie Socks Heroku add-on or attach it from the Heroku CLI. Heroku will create FIXIE_SOCKS_HOST as a config var for the app.
Attach fixie-socks to your Heroku app
Implementation
The example below shows the core application-side change. Keep credentials in environment variables and avoid committing proxy, database, or API secrets.
Connect to Amazon Redshift through FIXIE_SOCKS_HOST
Good to know
- The cluster (or Redshift Serverless workgroup) must be publicly accessible, with an inbound security-group rule for both Fixie IPs on port
5439. - Batch jobs that pause between queries should reconnect or send a keepalive rather than assuming a long-idle connection is still open.
Allowlist and test the static IPs
- Open the Fixie dashboard and copy the outbound IP addresses for this proxy.
- Add both IPs to the Redshift security group.
- Deploy the updated Node.js app on Heroku.
- Run a small connection test before sending production traffic.
Related guides
- Making API requests with a static IP from a Node app on Heroku
- Connecting to Amazon Redshift with a static IP from a Node app on Vercel
- Connecting to Amazon Redshift with a static IP from a Ruby app on Heroku
- Connecting to Postgres with a static IP from a Node app on Heroku
- Connecting to Amazon Redshift with a static IP from a Node app on AWS Lambda
- Connecting to Amazon Redshift with a static IP from a Python app on Heroku
Related docs
- Node.js implementation examples
- Heroku setup documentation
- Amazon Redshift connection guide
- Fixie-Wrench for TCP forwarding
Is this guide useful?