Continuing the discussion from Object storage provider for Mastodon instance:
Before setting up the object storage for a Mastodon instance, I even cannot get Gateway work right.
I tried aws s3 --endpoint=http://localhost:7777/ cp ~/.bashrc s3://temp.dev/
and got the error below:
Feb 15 21:08:59 ik1-432-48064 gateway[5561]: 2021-02-15T21:08:59.220+0900 ERROR gateway error: {"error": "uplink: metainfo error: Unauthorized API credentials", "errorVerbose": "uplink: metainfo error: Unauthorized API credentials\n\tstorj.io/uplink/private/metainfo.(*Client).Batch:1181\n\tstorj.io/uplink/private/storage/streams.(*streamStore).Put:256\n\tstorj.io/uplink/private/storage/streams.(*shimStore).Put:53\n\tstorj.io/uplink/private/stream.NewUpload.func1:48\n\tgolang.org/x/sync/errgroup.(*Group).Go.func1:57"}
Feb 15 21:08:59 ik1-432-48064 gateway[5561]: API: PutObject(bucket=temp.dev, object=.bashrc)
Feb 15 21:08:59 ik1-432-48064 gateway[5561]: Time: 21:08:59 JST 02/15/2021
Feb 15 21:08:59 ik1-432-48064 gateway[5561]: DeploymentID: 92fc816d-773d-4101-9299-c150eb8629bb
Feb 15 21:08:59 ik1-432-48064 gateway[5561]: RequestID: 1663EA82CD6F39DF
Feb 15 21:08:59 ik1-432-48064 gateway[5561]: RemoteHost: 127.0.0.1
Feb 15 21:08:59 ik1-432-48064 gateway[5561]: Host: localhost:7777
Feb 15 21:08:59 ik1-432-48064 gateway[5561]: UserAgent: aws-cli/1.19.7 Python/2.7.16 Linux/4.19.0-13-amd64 botocore/1.20.7
Feb 15 21:08:59 ik1-432-48064 gateway[5561]: Error: uplink: metainfo error: Unauthorized API credentials (*errs.errorT)
The access information is:
=========== ACCESS RESTRICTIONS ==========================================================
Download : Allowed
Upload : Allowed
Lists : Allowed
Deletes : Allowed
NotBefore : No restriction
NotAfter : No restriction
Paths : sj://temp.dev/ (entire bucket)
=========== SERIALIZED ACCESS WITH THE ABOVE RESTRICTIONS TO SHARE WITH OTHERS ===========
Access : 12RNZJeXeP...
Imported 12RNZJeXeP...
with $ gateway setup --access 12RNZJeXeP... --non-interactive
.
Used aws-cli/1.19.7 Python/2.7.16 Linux/4.19.0-13-amd64 botocore/1.20.7
.
Updating Setting Up a Self-Hosted S3 Compatible Gateway - Storj Docs is necessary for sure. The word API
should be removed altogether so there is not a chance of confusion.