Skip to main content
Help improve PyPI by participating in a 5-minute user interface survey!

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=>

Release history Release notifications

This version
History Node

0.1.2

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
rds-host-0.1.2.tar.gz (3.3 kB) Copy SHA256 hash SHA256 Source None Feb 1, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page