Signature Not Valid when using AmazonS3 createPreSignedURL() function

We are developing a Laravel application and using default AmazonS3 driver to upload and access files on DO Spaces bucket, for security purpose we are uploading resources as private.

Using Laravel Amazon S3 driver file upload works fine, but when we try to create a signed URL using $s3Client->createPresignedRequest() function to access the private resources it gives us “SignatureNotValid” error. The same function works fine on AmazonS3 private resources.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Until recently, Spaces did not support AWS v4 signature versions for pre-signed requests. We’ve rolled out support in NYC3 and will be bringing it to AMS3 in the next few days. Previously, you would have need to force the client to use thee v2 signature type. Though it should now work as expected out of the box.

If you’re still looking into using Spaces, please try again and let us know if you are still running into issues.