Signature Not Valid when using AmazonS3 createPreSignedURL() function

January 6, 2018 430 views
Object Storage

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.

1 Answer

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.

Have another answer? Share your knowledge.