Closed paavo closed 3 years ago
Where does that 1 come from in the URL? Is that expected? Or could that be a string representation of an unexpected boolean?
Quickly checked the code, and we don't add the bucket name to the endpoint. Maybe the SDK does something magic here (that it didn't do in the past) or it uses some environment variables that are floating around?!
Quickly checked the code, and we don't add the bucket name to the endpoint. Maybe the SDK does something magic here (that it didn't do in the past) or it uses some environment variables that are floating around?!
Weird.. NO, there's no environment variable set (except FLOW_CONTEXT) Maybe i can try downgrading the aws/aws-sdk-php
Where does that 1 come from in the URL? Is that expected? Or could that be a string representation of an unexpected boolean?
Looks like this is the prefix which is not set 🤔 https://github.com/flownative/flow-aws-s3/blob/4d77ab1f7813778c2011e5acf03f6e713dcbfb92/Classes/Command/S3CommandController.php#L55
After adding keyPrefix: '/'
the Path is correct: /Flownative.Aws.S3.ConnectionTest.txt
@kdambekalns Fixed 🎉 The solution was to add the use_path_style_endpoint to the config.
Flownative:
Aws:
S3:
profiles:
default:
use_path_style_endpoint: true
A custom Endpoint-URI should not be prefixed with the bucket-name. I configured a custom Endpoint (
https://cz42.objectstorage.provider.tld/my-bucket-name
) When uploading a File the Endpoint-URI gets prefixed with the bucket-name: https://my-bucket-name.cz42.objectstorage.provider.tld/1Flownative.Aws.S3.ConnectionTest.txt”my-bucket-name.should not be in the Endpoint-URISteps to reproduce:
https://cz42.objectstorage.provider.tld/my-bucket-name
Upload a Test-File
php ./flow s3:connect --bucket my-bucket-name
I get an Error the Endpoint-URI can't be found:
Error executing “PutObject” on “https://my-bucket-name.cz42.objectstorage.provider.tld/1Flownative.Aws.S3.ConnectionTest.txt”