for the rclone config, you added region = us-east-1
but i did not see that with the aws
command?
aws --endpoint-url=http://localstack:5000 --region us-east-1 s3 cp test/report.clj s3://toto/ upload: test/report.clj to s3://toto/report.clj
works fine
2021/07/16 14:53:43 DEBUG : Using config file from "/home/docker/.config/rclone/rclone.conf"
2021/07/16 14:53:43 DEBUG : rclone: Version "v1.55.1" starting with parameters ["rclone" "copy" "./world.txt" "localstack:toto" "--dump=bodies" "--retries=1" "--low-level-retries=1" "--log-level=DEBUG" "--s3-no-head"]
2021/07/16 14:53:43 DEBUG : Creating backend with remote "./world.txt"
2021/07/16 14:53:43 DEBUG : fs cache: adding new entry for parent of "./world.txt", "/tmp"
2021/07/16 14:53:43 DEBUG : Creating backend with remote "localstack:toto"
2021/07/16 14:53:43 DEBUG : localstack: detected overridden config - adding "{NBTUO}" suffix to name
2021/07/16 14:53:43 DEBUG : You have specified to dump information. Please be noted that the Accept-Encoding as shown may not be correct in the request and the response may not show Content-Encoding if the go standard libraries auto gzip encoding was in effect. In this case the body of the request will be gunzipped before showing it.
2021/07/16 14:53:43 DEBUG : fs cache: renaming cache item "localstack:toto" to be canonical "localstack{NBTUO}:toto"
2021/07/16 14:53:43 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2021/07/16 14:53:43 DEBUG : HTTP REQUEST (req 0xc000854300)
2021/07/16 14:53:43 DEBUG : HEAD /toto/world.txt HTTP/1.1
Host: localstack:5000
User-Agent: rclone/v1.55.1
2021/07/16 14:53:43 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2021/07/16 14:53:43 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2021/07/16 14:53:43 DEBUG : HTTP RESPONSE (req 0xc000854300)
2021/07/16 14:53:43 DEBUG : HTTP/1.1 403 Forbidden
Access-Control-Allow-Headers: authorization,content-type,content-md5,cache-control,x-amz-content-sha256,x-amz-date,x-amz-security-token,x-amz-user-agent
Access-Control-Allow-Methods: HEAD,GET,PUT,POST,DELETE,OPTIONS,PATCH
Access-Control-Allow-Origin: *
Content-Type: text/html; charset=utf-8
Date: Fri, 16 Jul 2021 14:53:43 GMT
Server: BaseHTTP/0.3 Python/2.7.15
Content-Length: 0
2021/07/16 14:53:43 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2021/07/16 14:53:43 ERROR : Attempt 1/1 failed with 1 errors and: Forbidden: Forbidden
status code: 403, request id: , host id:
2021/07/16 14:53:43 INFO :
Transferred: 0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors: 1 (retrying may help)
Elapsed time: 0.0s
2021/07/16 14:53:43 DEBUG : 2 go routines active
2021/07/16 14:53:43 Failed to copy: Forbidden: Forbidden
status code: 403, request id: , host id:
--s3-no-check-bucket=true
2021/07/16 14:55:30 DEBUG : Using config file from "/home/docker/.config/rclone/rclone.conf"
2021/07/16 14:55:30 DEBUG : rclone: Version "v1.55.1" starting with parameters ["rclone" "copy" "./world.txt" "localstack:toto" "--dump=bodies" "--retries=1" "--low-level-retries=1" "--log-level=DEBUG" "--s3-no-check-bucket=true"]
2021/07/16 14:55:30 DEBUG : Creating backend with remote "./world.txt"
2021/07/16 14:55:30 DEBUG : fs cache: adding new entry for parent of "./world.txt", "/tmp"
2021/07/16 14:55:30 DEBUG : Creating backend with remote "localstack:toto"
2021/07/16 14:55:30 DEBUG : localstack: detected overridden config - adding "{Dn7qA}" suffix to name
2021/07/16 14:55:30 DEBUG : You have specified to dump information. Please be noted that the Accept-Encoding as shown may not be correct in the request and the response may not show Content-Encoding if the go standard libraries auto gzip encoding was in effect. In this case the body of the request will be gunzipped before showing it.
2021/07/16 14:55:30 DEBUG : fs cache: renaming cache item "localstack:toto" to be canonical "localstack{Dn7qA}:toto"
2021/07/16 14:55:30 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2021/07/16 14:55:30 DEBUG : HTTP REQUEST (req 0xc00058bd00)
2021/07/16 14:55:30 DEBUG : HEAD /toto/world.txt HTTP/1.1
Host: localstack:5000
User-Agent: rclone/v1.55.1
2021/07/16 14:55:30 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2021/07/16 14:55:30 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2021/07/16 14:55:30 DEBUG : HTTP RESPONSE (req 0xc00058bd00)
2021/07/16 14:55:30 DEBUG : HTTP/1.1 403 Forbidden
Access-Control-Allow-Headers: authorization,content-type,content-md5,cache-control,x-amz-content-sha256,x-amz-date,x-amz-security-token,x-amz-user-agent
Access-Control-Allow-Methods: HEAD,GET,PUT,POST,DELETE,OPTIONS,PATCH
Access-Control-Allow-Origin: *
Content-Type: text/html; charset=utf-8
Date: Fri, 16 Jul 2021 14:55:30 GMT
Server: BaseHTTP/0.3 Python/2.7.15
Content-Length: 0
2021/07/16 14:55:30 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2021/07/16 14:55:30 ERROR : Attempt 1/1 failed with 1 errors and: Forbidden: Forbidden
status code: 403, request id: , host id:
2021/07/16 14:55:30 INFO :
Transferred: 0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors: 1 (retrying may help)
Elapsed time: 0.0s
2021/07/16 14:55:30 DEBUG : 2 go routines active
2021/07/16 14:55:30 Failed to copy: Forbidden: Forbidden
status code: 403, request id: , host id:
tried both --> same
BUT...
Interestingly:
- if I copy a new file (no previous attempt) with
--s3-no-head=true
it works
- if I copy again it fails:
$ rclone copy ./world2.txt localstack:toto --s3-no-head=true
$ rclone copy ./world2.txt localstack:toto --s3-no-head=true
2021/07/16 15:02:04 ERROR : Attempt 1/3 failed with 1 errors and: Forbidden: Forbidden
status code: 403, request id: , host id:
2021/07/16 15:02:04 ERROR : Attempt 2/3 failed with 1 errors and: Forbidden: Forbidden
status code: 403, request id: , host id:
2021/07/16 15:02:04 ERROR : Attempt 3/3 failed with 1 errors and: Forbidden: Forbidden
status code: 403, request id: , host id:
2021/07/16 15:02:04 Failed to copy: Forbidden: Forbidden
status code: 403, request id: , host id:
- deletefile does not work:
$ rclone deletefile localstack:toto/world2.txt --s3-no-head=true
2021/07/16 15:02:54 ERROR : Attempt 1/3 failed with 1 errors and: localstack:toto/world2.txt is a directory or doesn't exist
2021/07/16 15:02:54 ERROR : Attempt 2/3 failed with 1 errors and: localstack:toto/world2.txt is a directory or doesn't exist
2021/07/16 15:02:54 ERROR : Attempt 3/3 failed with 1 errors and: localstack:toto/world2.txt is a directory or doesn't exist
2021/07/16 15:02:54 Failed to deletefile: localstack:toto/world2.txt is a directory or doesn't exist