How to configure a profile when running the s3cmd sync command

When I use aws sync, I can set the doimg profile

aws sync ./test s3://test --profile stage

A profile corresponds to a set of credentials. I have different credentials for each profile.

How can I use the s3cmd sync command and set the profile, how am I doing with aws sync?

+4
source share
1 answer

It's easy, just use the option -cto 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 saved inside the file ~/.s3cfg.

You can copy it to new files to create different configuration profiles.

+5
source

Source: https://habr.com/ru/post/1614644/


All Articles