TappNetwork/laravel-uppy-s3-multipart-upload

createMultipartUpload throwing aws Host override error

kerkness opened this issue · 1 comments

A new issue popped up after doing a fresh deploy which appears to result from updates with the AWS SDK but unclear to me if this new error is on the Uppy side of things, the laravel side of things or with AWS itself.

The call to $this->client->createMultipartUpload in UppyS3MultipartController (line 103) is throwing the error Host override cannot be combined with Dualstack, FIPS, or S3 Accelerate from AWS.

There doesn't appear to be a lot of details on this error. I'm curious if others are getting it as my uploading has been very stable for many months with no changes.

Also, the exception being thrown does not support $exception->getStatusCode() which needs to be removed from the try/catch in order to see the actual error from AWS.

As detailed here aws/aws-sdk-php#2614

Recent the aws-sdk-php package will now dynamically determine the necessary endpoint for accessing S3. If any value is set in AWS_URL or AWS_POST_END_POINT then aws-sdk-php will consider this a custom endpoint even if the value set is not in-fact a custom endpoint.

Therefore the documentation instructions to set these environment variables will cause issues if you use accelerator with your bucket. They do not need to be set with the lastest versions of the aws sdk.