goamz icon indicating copy to clipboard operation
goamz copied to clipboard

Should func GetAuth try credentials in the same order as botocore?

Open lokulin opened this issue 11 years ago • 4 comments

Hi,

Should func GetAuth try credentials in the same order as botocore?

Currently aws.go GetAuth tries:

PackerConfig->Shared->Env->Instance

As seen in https://github.com/mitchellh/goamz/blob/38665d5aef48a022b9e4d758c82755bb5b83e24a/aws/aws.go#L313

In contrast, botocore, which the aws-cli tools use tries:

Env->Shared->Config->OriginalEc2->boto->Instance

As seen in: https://github.com/boto/botocore/blob/f93423146eb28e7e0d46aca8929ad16c3d5cf931/botocore/credentials.py#L57

Having Packer check in a different order sometimes causes confusion when users expect the evaluation order to be the same as the official CLI tools.

Cheers,

Lauchlin

lokulin avatar Dec 11 '14 05:12 lokulin

Man, I've had the same issue, I was wondering what it was!

Good one! Hopefully somebody will pick that up quick!

labrute974 avatar Dec 11 '14 06:12 labrute974

Agreed

BertrandLF avatar Dec 11 '14 20:12 BertrandLF

Sounds good. We should have this fixed.

supriyapjoshi avatar Dec 12 '14 00:12 supriyapjoshi

@labrute974 @BertrandLF @supriyapjoshi FYI pull request is here:

https://github.com/mitchellh/goamz/pull/172

lokulin avatar Dec 12 '14 02:12 lokulin