Open Wiston999 opened 6 years ago
Thanks @Wiston999,
Forgive my lack of AWS S3 knowledge, are you attempting to upload to a bucket that does not require credentials for uploading?
I assumed that the S3 API required access+secret key but given Python Boto 2.x supports it, I can modify the code to suit your use case once I understand it a bit more. If Boto 2.x doesn't support this we'll need to ask the Boto project (what we use to do S3 uploads) to add this functionality.
Hi, thanks for your answer. Usually when you use boto to connect to AWS services, you have several ways of authenticating with AWS API.
My use case involves using IAM Roles, so I don't have to be messing with AWS credentials through instances and only the instances I want can upload files to S3.
Thanks @Wiston999, I think that makes sense.
As making the access+secret key optional would create a few other side-effects/problems would it be acceptable to implement a flag such as 'upload.s3.useIAMRoles: true' that allows those parameters to be optional?
Hi, I think it would be acceptable to use the flag if this makes things easier. In any case, I usually make those 2 variables default to None in my own code, because passing None to the constructor is enough to trigger another auth method different than explicit credentials.
I met this problem too, I saw there still need access key to upload to S3. I think if we running this script ar EC2 with IAM Role, boto will handle Credential issue.
When using upload.method s3, access_key and secret_key seem to be mandatory due to this traceback
In order to use IAM instance profiles, those parameters should be optional.