We have several examples [1].
I think you need to set s3ForcePathStyle to true for the first example (or however you do it in the v3 version of the SDK[2]). For the latter, we don't support pre-signed requests. Feel free to ask on discord [3] too. Might get more timely responses.
[1] https://developers.cloudflare.com/r2/examples
[2] https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clien...