New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
storage/s3: endpoint_url
from AWS config file
#591
base: master
Are you sure you want to change the base?
Conversation
5b01911
to
f849938
Compare
I forgot, that AWS config profiles must be prefixed with |
What about the "region" and "ca_bundle" in the config file as well? It appears these aren't being consumed by s5cmd either. Is there a more complete way to bring in all the setting in the config file and pass those to the SDK? |
Thanks for the PR, looking forward for it being merged. |
@tilimil Great suggestion. We've mainly focused on the endpoint-URL. I'm not sure, if the SDK could properly handle |
Hi! It's nice feature to have |
Needs rebase |
@k0ste Since the PR has now been open since July 2023, I wanted to save myself the time of working on a regular rebase as long as there is no feedback, because I don't even know yet whether the PR would be accepted at all. |
Hi 👋
We've used this tool a lot since we've discovered
s5cmd
for our S3 buckets. As we're not using AWS, we need to set theS3_ENDPOINT_URL
each time we open a new Terminal.As the AWS-CLI officially supports
endpoint_url
in the AWS config file for a profile, I thought it would be great ifs5cmd
would supportendpoint_url
in AWS config profiles as well. Unfortunately the AWS-SDK does not supportendpoint_url
, therefore we're using the go-ini module to read the AWS config file.Therefore we extended the
newSession
function to use either the configured AWS config file (viaAWS_CONFIG_FILE
env-variable) or the default AWS config file ($HOME/.aws/config
) and lookup/use theendpoint_url
for the specified profile (only if configured and not specified by$S3_ENDPOINT_URL
or the--endpoint-url
-flag).Additionally we created a test which covers the config file including a
endpoint_url
and a profile which has not set theendpoint_url
.What do you think about this?
If there is anything missing or we need to change something in this pull request, feel free to let us know 🙂