Question

Signature Not Valid when using AmazonS3 createPreSignedURL() function

Posted January 6, 2018 915 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.

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.

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.

Submit an Answer