Open
Description
Description
Hello,
we are trying to setup Craft assets to use Wasabi, which is a S3-compatible object storage service.
We have installed the aws-s3
plugin to that effect.
When we trigger the uploading of the asset we get an error
Error executing "GetSessionToken" on "https://sts.amazonaws.com"; AWS HTTP error: Client error: `POST https://sts.amazonaws.com` resulted in a `403 Forbidden` response: <ErrorResponse xmlns="https://sts.amazonaws.com/doc/2011-06-15/"> <Error> <Type>Sender</Type> <Code>InvalidCli (truncated...) InvalidClientTokenId (client): The security token included in the request is invalid.
Which kind of make sense given the connection details we are supplying are for a Wasabi S3 endpoint.
Being S3-compatible, Wasabi does support the STS related idioms like GetSessionToken
When reading the aws-s3
documentation, I didn't see any references on specifying endpoints, so the AWS ones are probably hard-coded.
Could you consider adding such support?
A lot of big object storage services offers an S3-compatible API and for organisations like us who do multi-cloud a lot, we benefit from that facility.
Best.
Steps to reproduce
- Configure
aws-s3
with following values:
OBJECT_STORAGE_ENDPOINT="https://s3.ap-northeast-1.wasabisys.com/"
OBJECT_STORAGE_BUCKET="cms-assets"
OBJECT_STORAGE_KEY="xxxx"
OBJECT_STORAGE_SECRET_KEY="xxxxxxxxxx"
OBJECT_STORAGE_REGION="ap-northeast-1"
OBJECT_STORAGE_SUBPATH="/dev"
- Setup an asset that use the object storage file system
- Create an entry type that has an image field with an asset location set to the above asset
- Make a new entry, upload a file and save the form
Additional info
- Craft version: 4.5.6.1
- PHP version: 8.2.10
- Database driver & version: PostgreSQL 15.4
- Plugins & versions: Amazon S3 2.0.3