Hi,

I believe I may have uncovered a bug regarding using an IAM role vs. a user 
key/secret key combination.

The instance I'm using s3cmd on has an IAM role allowing it write access to an 
s3 bucket. 

At some point after having that IAM role assigned, it was deprecated in favor 
of using a user account's keys. 

I noticed s3cmd was still using the IAM role and went to --configure it again.

When running --configure, s3cmd grabbed (what I am guessing) are the 
automatically generated IAM role keys as the defaults. I overwrote those with 
the given user's account keys.

When it came time in the --configure process to test the config:

Test access with supplied credentials? [Y/n] y
Please wait, attempting to list all buckets...
ERROR: Test failed: 400 (InvalidToken): The provided token is malformed or 
otherwise invalid.

I saved the config anyway and was able to do s3 operations with the account 
keys.

The access_token in my old config file for use with the IAM role and the new 
config file with the account keys, the access_token is the same. So it would 
appear that access_token is being generated off the IAM role even if I put in 
the user keys at s3cmd config time.

Mike



------------------------------------------------------------------------------
_______________________________________________
S3tools-general mailing list
S3tools-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/s3tools-general

Reply via email to