Export table using COPY TO command to alternate S3 endpoint

I have a need to export a Crate DB table to S3, I can do this with COPY TO command by providing s3 endpoint. But I need this to be exported to a different S3 endpoint and not default AWS S3 endpoint. How to provide the alternate s3 endpoint and credentials?