Im try'ing connect Magento 2 remote-storage to my local S3 storage.
s3cmd configured to connect https://s3.example.com working properly, can create bucket, send files etc.
Magento 2 have build aws-s3 driver but can't set proper parameters. I try to set something like this, but still not working and S3Client connect only to predefined endpoints (by region)
'remote_storage' => [
'driver' => 'aws-s3',
'config' => [
'endpoint' => 's3.example.com',
'bucket' => 'magento',
'bucket_endpoint' => true,
'region' => 'eu-west-2',
'use_path_style_endpoint' => true,
'credentials' => [
'key' => 'C****************C',
'secret' => 'R****************2',
],
'debug' => true
]
],
It's possible to use build in s3 driver to connect private s3 stack ?
I ran into this issue as well when trying to implement LocalStack for local testing. I had given up thinking that Magento's S3 implementation wouldn't support this, but I took another look with your example.
EDIT: I have this working now in my local, using my LocalStack endpoint. I would expect the same configuration to work with your custom endpoint. The
bucket_endpoint
configuration in particular was surprising to me, but without this, file uploads failed with an invalid path.