I managed to make it work by using s3ForcePathStyle: true
instead of forcePathStyle: true
:
import { S3Client } from '@aws-sdk/client-s3';
client = new S3Client({
'us-east-1',
endpoint: 'http://localhost:4566',
s3ForcePathStyle: true,
disableHostPrefix: true
});