Specify bucket or bucket and sub-directory for S3 in config file

What is the problem you are having with rclone?

Is there a way to specify an actual bucket or bucket and "sub-directory" for S3 in the configuration file.

For example

[S3WorkConfiguration]
type = s3
provider = AWS
access_key_id = <id>
secret_access_key = <key>
region = us-east-2
location_constraint = us-east-2
acl = private
storage_class = STANDARD
bucket = work-configuration

or even better....

endpoint = https://work-configuration.s3.us-east-2.amazonaws.com/subdir

Run the command 'rclone version' and share the full output of the command.

rclone v1.58.0
- os/version: darwin 11.5.2 (64 bit)
- os/kernel: 20.6.0 (x86_64)
- os/type: darwin
- os/arch: amd64
- go/version: go1.17.8
- go/linking: dynamic
- go/tags: cmount

Which cloud storage system are you using? (eg Google Drive)

S3

The command you were trying to run (eg rclone copy /tmp remote:tmp)

env RCLONE_CONFIG=work-rclone.conf ~/bin/rclone lsl S3WorkConfiguration:

The rclone config contents with secrets removed.

[S3WorkConfiguration]
type = s3
provider = AWS
access_key_id = <id>
secret_access_key = <key>
region = us-east-2
location_constraint = us-east-2
acl = private
storage_class = STANDARD

A log from the command with the -vv flag

 $ env RCLONE_CONFIG=work-rclone.conf ~/bin/rclone lsl -vv S3WorkConfiguration:                                                                  2022/03/24 18:21:08 DEBUG : Setting --config "work-rclone.conf" from environment variable RCLONE_CONFIG="work-rclone.conf"
2022/03/24 18:21:08 DEBUG : rclone: Version "v1.58.0" starting with parameters ["/Users/<uid>/bin/rclone" "lsl" "-vv" "S3WorkConfiguration:"]
2022/03/24 18:21:08 DEBUG : Creating backend with remote "S3WorkConfiguration:"
2022/03/24 18:21:08 DEBUG : Using config file from "/Users/<uid>/work-rclone.conf"
2022/03/24 18:21:08 DEBUG : 6 go routines active

hi,

cannot do that with a s3 remote but can do it by using an alias remote

[work-configuration]
type = alias
remote = S3WorkConfiguration:work-configuration

rclone lsl work-configuration:

2 Likes

Oh, wow, thank you. That is fantastic.

good, but re-reading your post, i think this is what you want.
bucket and subdir

[work-configuration]
type = alias
remote = S3WorkConfiguration:work-configuration/subdir

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.