In a world of environment variables used as configuration to switch between environments, it would be really useful if aws-cli would support a variable to switch between endpoints.
In our use case we want to use aws-cli with minio https://min.io in the dev and continuous integration environments and switching with a variable such as AWS_S3_ENDPOINT_URL
would be super useful.
Right now, we have to hack our way though having some custom command line, or have some startup writing of an aws configuration file, which is not ideal.
See https://docs.min.io/docs/aws-cli-with-minio for how the "alternative" entrypoint is used.
@arthurlogilab - Thank you for your post. You can use --endpoint-url
as a workaround.
It seems like there is already a related issue opened in Boto3 repo. https://github.com/boto/boto3/issues/2099
@swetashre I'm sorry I did not find the issue in question (I did search for it!), could you point me the issue number ?
I'm not sure I understand, does this mean aws-cli uses boto3 so if this is implemented in boto3 then aws-cli automatically has it ?
@arthurlogilab - I meant currently you can use --endpoint-url
as a workaround for cli command. I would mark this as a feature request.
@swetashre yes it is a feature request, thanks for re-opening this issue.
second to this feature request, I think it's important and helpful to have this additional configurable value on environment variable instead of command line parse arguments. Currently this is neither part of profile or environment variable, which means user need to append this argument every time if wanted to hit custom endpoint
Service aware custom endpoint-url override would be superb
Bump
you could do something along the lines of
aws s3 $args cp $src $dest
whe you want a custom endpoint define args as '--endpoint-url $endpoint' otherwise leave it as null. Just as easy really
However the feature would be useful for when you are using s3 in code rather than via the cli in shell
This should be implemented on the same level as you can provide credentials and region. Either as environment variables or in a profile. I am struggling setting up a docker based environment where local offline development goes towards localstack and production goes towards AWS. Containers running the same image, just configured via environment variables.
I got around this using an alias in the interim in case anyone was interested
alias aws='aws --endpoint-url http://website'
Most helpful comment
second to this feature request, I think it's important and helpful to have this additional configurable value on environment variable instead of command line parse arguments. Currently this is neither part of profile or environment variable, which means user need to append this argument every time if wanted to hit custom endpoint
Service aware custom endpoint-url override would be superb