Skip to content

Conversation

@AlexisFilipozzi
Copy link
Contributor

@AlexisFilipozzi AlexisFilipozzi commented Nov 26, 2024

@AlexisFilipozzi
Copy link
Contributor Author

Related to issue #1271

@AlexisFilipozzi
Copy link
Contributor Author

Can this PR be merged? @prakashsvmx

@harshavardhana harshavardhana merged commit 6cd0223 into minio:master Dec 18, 2024
10 checks passed
@Wonderpol
Copy link

I found this PR that aims to make the Minio client compatible with AWS IRSA (IAM Roles for Service Accounts). However, I'm having trouble understanding how to use the custom IamAwsProvider when creating a Minio client.
I attempted the following approach:

const IamAwsProvider = require("minio/src/IamAwsProvider");
minioClient = new Minio.Client({
  endPoint: config.endpoint,
  credentialsProvider: new IamAwsProvider({})
});

Unfortunately, this resulted in the following error:

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './src/IamAwsProvider' is not defined by "exports" in /Users/........../....../..../node_modules/minio/package.json

Could you please provide guidance on the correct way to implement this custom IamAwsProvider with the Minio client? Any assistance would be greatly appreciated.

my minio version: "minio": "^8.0.5"

@AlexisFilipozzi @harshavardhana Can you help about it ?

@AlexisFilipozzi
Copy link
Contributor Author

Can you try using following statement to import ?

const IamAwsProvider = require('minio/dist/main/IamAwsProvider.js').IamAwsProvider

And then use new IamAwsProvider().
If I remember well, content of src is not declared in exports of the published node package.

@Wonderpol
Copy link

Wonderpol commented Jun 21, 2025

Can you try using following statement to import ?

const IamAwsProvider = require('minio/dist/main/IamAwsProvider.js').IamAwsProvider

And then use new IamAwsProvider(). If I remember well, content of src is not declared in exports of the published node package.

@AlexisFilipozzi
Thank you, works perfectly fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants