Gotchas when using AWS RDS command line tools

Say you installed the rds command line tools and wanted to create a db instance:


rds-create-db-instance my_dbinstance \
--engine mysql5.1 \
--master-username root \
--master-user-password - \
--allocated-storage 5 \
--db-instance-class db.m1.small \
--db-name blog

Issue 1
rds-create-db-instance: Malformed input-No Credentials were provided – cannot access the service

Resolution
You probably didn’t have your credentials set in the credential file. If you did, then you probably forgot to add your AWS_CREDENTIAL_FILE location to your environment.

export AWS_CREDENTIAL_FILE=$AWS_RDS_HOME/<location of credential file>

Issue 2
rds-create-db-instance: Malformed input-The parameter DBInstanceIdentifier is not a valid identifier. Identifiers must begin with a letter; must contain only ASCII letters, digits,
and hyphens; and must not end with a hyphen or contain two consecutive hyphens.

Resolution
I had an underscore in my DBInstanceIdentifier. Underscores are not valid characters.

Changed:

rds-create-db-instance my_dbinstance \
...

To:

rds-create-db-instance mydbinstance \
...

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s