awslabs / coldsnap

A command line interface for Amazon EBS snapshots
Apache License 2.0
178 stars 24 forks source link

improve readme and error messages #335

Closed webern closed 1 month ago

webern commented 2 months ago

Issue #, if available:

Closes #334

Description of changes:

    readme: describe credentials behavio
    better error message for misconfiguration

    If AWS credentials are missing, i.e. there is no profile information
    in ~/.aws, and no other source of credentials, then coldsnap would
    provide this unhelpful error message:

    Failed to download snapshot: Failed to list snapshot blocks 'snapid'.

    We now print the underlying error as well, which is at least a little
    bit more helpful:

    Failed to download snapshot: Failed to list snapshot blocks 'snapid':
    dispatch failure: other: Invalid Configuration: Missing Region

Testing

Uploaded and Downloaded Snapshots. The error messages were like this before:

Failed to download snapshot: Failed to list snapshot blocks 'snap-0a5cdf61910a948d8': dispatch failure

Failed to upload snapshot: Failed to start snapshot: dispatch failure

And like this after

Failed to download snapshot: Failed to list snapshot blocks 'snap-0a5cdf61910a948d8': dispatch failure: other: Invalid Configuration: Missing Region

Failed to upload snapshot: Failed to start snapshot: dispatch failure: other: Invalid Configuration: Missing Region

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

webern commented 1 month ago

bump