minio-py icon indicating copy to clipboard operation
minio-py copied to clipboard

AWS credentials provider with role_arn + source_profile

Open juhoautio opened this issue 3 years ago • 1 comments

I tried using Minio for s3 with a credentials file that uses role_arn and source_profile. Is it true that this is not supported by Minio?

I found a PR comment that mentions this type of conf: https://github.com/minio/minio-py/pull/817#discussion_r358160557. If I'm not mistaken, this was scoped out in that PR.


The code that I tried was:

from minio import Minio
from minio.credentials import AWSConfigProvider

client = Minio(
    "s3.amazonaws.com",
    credentials=AWSConfigProvider(profile="smoke")
)

But it fails with:

ValueError: access key does not exist in profile my_profile in AWS credential file /Users/juhoautio/.aws/credentials

Basically my .aws/credentials file has this:

[keys]
aws_access_key_id = <key>
aws_secret_access_key = <secret>

[my_profile]
source_profile = keys
role_arn = arn:aws:iam::<account>:role/<MyRole>

For the record, I'm not actively using minio-py. I was just trying it out.

juhoautio avatar Jun 30 '21 19:06 juhoautio

role_arn and source_profile are not supported in minio-py yet. Feel free to send a fix.

balamurugana avatar Jun 30 '21 19:06 balamurugana

Stale issue and won't be fixed.

balamurugana avatar Jan 09 '23 02:01 balamurugana