Better error message when failing to get AWS auth

Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
Stephen J Day 2015-05-22 16:45:45 -07:00
parent 25fb44fb8b
commit d4c50637f9

View file

@ -201,7 +201,7 @@ func FromParameters(parameters map[string]interface{}) (*Driver, error) {
func New(params DriverParameters) (*Driver, error) { func New(params DriverParameters) (*Driver, error) {
auth, err := aws.GetAuth(params.AccessKey, params.SecretKey, "", time.Time{}) auth, err := aws.GetAuth(params.AccessKey, params.SecretKey, "", time.Time{})
if err != nil { if err != nil {
return nil, err return nil, fmt.Errorf("unable to resolve aws credentials, please ensure that 'accesskey' and 'secretkey' are properly set or the credentials are available in $HOME/.aws/credentials: %v", err)
} }
if !params.Secure { if !params.Secure {