cosmin / route53-transfer

Backup and restore Route53 zones, or transfer between AWS accounts.
Other
152 stars 47 forks source link

More descriptive error if no AWS creds are passed #10

Open ianwestcott opened 9 years ago

ianwestcott commented 9 years ago

If I run route53-transfer without passing --access-key-id and --secret-key, and without setting AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY in my environment, the error I get looks like an error from AWS:

$ route53-transfer dump example.com example.com.csv
ERROR: Invalid AWS credentials supplied.

It would be more clear to the user if the script validated the existence of the AWS credentials and gave a more explicit error if they were not set by either means.

dantman commented 9 years ago

I'd actually like this test for those arguments to be dropped entirely. Making these arguments/ENV required makes route53-transfer break when credentials have already been configured in some other way. Boto supports IAM Roles, site wide /etc/boto.cfg config, ~/.aws/credentials shared between SDKs, and its own ~/.boto config file.

If credentials are already configured in any of these places. route53-transfer won't use them.