AWS S3 addon compatibility with Google Cloud Storage


I was trying to setup the S3 addon on GCP Storage, that should be working thanks to Cloud Storage interoperability

I’ve set cuba.amazonS3.endpointUrl to and I’ve created access and secret key as in Managing HMAC keys for service accounts.

However, when trying to upload a file I obtain: I/O error: Could not save file <filename>.

In debug mode I see that the inner exception is: Invalid argument. (Service: S3, Status Code: 400, Request ID: null)

Any suggestions to better debug the issue is greatly appreciated, thanks!

It looks like that Google Storage interoperability isn’t really interoperable with multi-part uploading.

At this point the best way is to write an addon leveraging the GCS SDK instead of the S3 SDK?


You have two options:

  1. you may write new addon that leverages the GCS SDK. Use AWS addon as an example.
  2. extend the AmazonS3FileStorage and override its saveFile method. The overriden saveFile should not use multipart requests