Home > Software engineering >  How to create multiple profiles using Minio and aws-cli
How to create multiple profiles using Minio and aws-cli

Time:10-15

I'm trying to connect to several profiles of local Minio instances using aws-cli without success. The problem persists when I remove --endpoint_url from the command. You will find the configuration files below

With --endpoint-url:

aws --profile project01 --endpoint-url http://localhost:9000 s3 ls s3://my-bucket01/

                         PRE data/
2022-10-11 16:21:09      71412 yt.csv

aws --profile project02 --endpoint-url http://localhost:9001 s3 ls s3://my-bucket02/

                         PRE data/
2022-10-11 16:22:09      20989 xt.csv

Without --endpoint-url

aws --profile project01 s3 ls s3://my-bucket01/

aws --profile project02 s3 ls s3://my-bucket02/

An error occurred (InvalidAccessKeyId) when calling the ListObjectsV2 operation: The AWS Access Key Id you provided does not exist in our records.

.aws/credentials

[project01]
aws_access_key_id = minioadmin
aws_secret_access_key = minioadmin
[project02]
aws_access_key_id = minioadmin
aws_secret_access_key = minioadmin

.aws/config

[plugins]
endpoint = awscli_plugin_endpoint

[project01]
s3 =
     endpoint_url = http://localhost:9000
[project02]
s3 =
     endpoint_url = http://localhost:9001

CodePudding user response:

This is not supported in AWS cli. There is a pending issue https://github.com/aws/aws-cli/issues/1270 . You need to specify the endpoint url as part of the command for now

  • Related