Reputation: 8685
When I use aws sync, I can set the profile by doimg
aws sync ./test s3://test --profile stage
The profile matches to a set of credentials. I have different credentials for each profile.
How can I use the s3cmd sync command and set a profile as I do with aws sync?
Upvotes: 7
Views: 11523
Reputation: 419
Create a profile under the name default
, and export AWS_CREDENTIAL_FILE=~/.aws/credentials
. You should now be able to run s3cmd
.
reference
Upvotes: 2
Reputation: 191
It is easy, just use the -c
option to select the "configuration" that you want to use.
Example:
s3cmd -c my_stage_config sync test s3://test
The default configuration (created with --configure
) is stored inside the ~/.s3cfg
file.
You can copy it to new files to create different configuration profiles.
Upvotes: 13