Open lifeeric opened 5 months ago
1.1.17
mac
This simple nodejs code throws the below error:
import { S3Client, PutObjectCommand } from "@aws-sdk/client-s3"; import fs from "node:fs"; import mime from "mime-types"; const s3Client = new S3Client({ region: "us-east-1", credentials: { accessKeyId: "x", secretAccessKey: "x", }, }); const command = new PutObjectCommand({ Bucket: "test", Key: `__outputs/index.html`, Body: fs.createReadStream("./output/dist/index.html"), ContentType: mime.lookup("./output/dist/index.html"), }); (async () => { await s3Client.send(command); })();
It should upload the file successfully, but instead it throws error:
SignatureDoesNotMatch: The request signature we calculated does not match the signature you provided. Check your key and signing method.
It took me an entire day to figure out the issue, and it only happening when using bun instead of Node.
No response
Having the same issue
Seems like this approach works for now https://github.com/oven-sh/bun/issues/6803#issuecomment-2199635069
What version of Bun is running?
1.1.17
What platform is your computer?
mac
What steps can reproduce the bug?
This simple nodejs code throws the below error:
What is the expected behavior?
It should upload the file successfully, but instead it throws error:
It took me an entire day to figure out the issue, and it only happening when using bun instead of Node.
What do you see instead?
No response
Additional information
No response