Skip to main content

Get hostname from Amazon RDS instance name

Project description

A simple command line utility, allowing you to find the hostname associated with your Amazon RDS instance name.

Also has a simple wrapper for PostgreSQL’s psql utility. If you want a similar script for MySQL or Oracle, patches are welcome.

A few examples:

# w/o arg: prints all active instances
% rds-host
mydbinstance    mydbinstance.c6ulnjwxjm.us-west-2.rds.amazonaws.com:5432
myotherdbinstance  myotherdbinstance.d5ulnswdjyf.us-west-2.rds.amazonaws.com:5432

# w/ arg: prints host name of matching instance
% rds-host mydbinstance
mydbinstance.c6ulnjwxjm.us-west-2.rds.amazonaws.com:5432

# connect to the instance with psql
% rds-psql mydbinstance -U mydbuser mydbname
Connecting to mydbinstance.c6ulnjwxjm.us-west-2.rds.amazonaws.com...
Password for user mydbuser:
psql (9.0.5, server 9.3.1)
WARNING: psql version 9.0, server version 9.3.
Some psql features might not work.
SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256)
Type "help" for help.

mydbname=>

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rds-host-0.1.2.tar.gz (3.3 kB view details)

Uploaded Source

File details

Details for the file rds-host-0.1.2.tar.gz.

File metadata

  • Download URL: rds-host-0.1.2.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for rds-host-0.1.2.tar.gz
Algorithm Hash digest
SHA256 f0d65a191b1dd7b27d3c546a8b0f9b1b8146ad4e77535c7e2ff3bdf03a58efa3
MD5 fafb3888c1fbd47c8fbd96d43d491965
BLAKE2b-256 6ffbecfb8034fc455d638a5d53a1a26a5b459c10be78cb752efaad5caf4e64f2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page