-
-
Notifications
You must be signed in to change notification settings - Fork 908
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
would be nice to support multiple accounts in config #104
Comments
I would also like to store credentials from multiple AWS accounts in a single .s3cfg file. |
I agree there should be a way to support multiple accounts. Perhaps maybe checking for a local config before using the global one in the home folder? This would allow various projects to use s3cmd as normal with different accounts and not complicating or changing the config format. |
+1 |
Also, this can be used to support https://mdahlman.wordpress.com/2013/12/05/copy-files-between-s3-buckets/ I guess that this is harder to implement in a transparent way than it seems, because: http://www.patcup.com/copy-contents-in-s3-bucket-between-aws-accounts-with-s3cmd/ One needs to define bucket policies in both endpoints beforehand... I guess that this step could be automated as well. |
+1 |
The sync (remote to remote copy) only sends the command to the destination On Wed, Feb 4, 2015 at 3:47 AM, Roman Valls Guimerà <
|
Mike has a nice solution to using multiple accounts with s3cmd. http://mikesisk.tumblr.com/post/8703449578/s3cmd-and-multiple-accounts |
Why not have s3cmd support the new standard .aws/credentials file? http://blogs.aws.amazon.com/security/post/Tx3D6U6WSFGOK2H/A-New-and-Standardized-Way-to-Manage-Credentials-in-the-AWS-SDKs |
I'd consider a patch to accept the .aws/credentials file as valid input. On Thu, Apr 16, 2015 at 10:43 AM, Eyad Sibai [email protected]
|
+1 |
1 similar comment
+1 |
+1, multiple configs would be my preference perhaps s3cmd configure myConfig1 or the like. |
+1 |
Something that could be done is that you create a .s3cfg file without access_key and secret_key. Otherwise, I'm not sure that a "profile" option would have much sense. The later will create more configuration confusion for basic users I think? The point being that from a first view, you can think that in profile should go: But some other people that use encryption or servers that are not aws s3 could consider that the following are also like "profiles":
So, in the end you will want to override most of the fields that are commonly modified in s3cfg file. |
+1 |
What is the purpose of the [default] statement at the top of .s3cfg files, if you can't have more than 1 section and choose between them by specifying the profile? |
i agree |
A workaround is to use Use different file names for your Install syntax Install the alternatives with: sudo update-alternatives --install /home/username/.s3cfg s3cfg /home/username-aws-1 20
sudo update-alternatives --install /home/username/.s3cfg s3cfg /home/username-aws-2 10 The alternative with the highest priority will be the default. Choose alternative with: List or display alternatives with: Or to get the priority: Test with something like |
There's a PR that partly addresses this issue; #995 |
@noelspringer Pardon me if I'm wrong, but you don't really need all for that to use 2 different config files. |
@sveneh I'm trying to understand what is the exact use case that would need to be improved. What I can see that could be needed:
For that later case, I'm not really sure of what is the usage/need. |
I can't speak for OP, but for me it's related to |
Agreed, I was really surprised there isn't a way to configure multiple accounts with their own keys and |
Is this still the case? |
@trahloff you can use https://linuxamination.blogspot.com/2017/12/s3cmd-configure-multiple-s3-accounts-on.html |
Very interesting discussion. I also assumed, that a "section" could be used as profile in order to have several configs in one file as alternative option to have multiple files with one config in each. My main consideration was to use the same ".cfg" file for s3cmd and an server application, which will in my opinion benefit from having only 1 file to read all S3 profiles.
or
So, I will go to use a different format ... |
A common pattern I see with s3cmd is to maintain multiple config files like this:
http://mikesisk.com/post/s3cmd-with-multiple-accounts
What would be nice is a way to specify multiple sets of keys in s3cmd.config each with an alias, such that s3cmd could be invoked using the alias as an argument to select that account.
Or perhaps that is overkill. What do people think?
The text was updated successfully, but these errors were encountered: