"The AWS Access Key Id you provided does not exist in our records."..but I have the right access key

Trying to use the S3 SDK.
export const s3 = new S3({
region: env.REGION,
credentials: {
accessKeyId: env.WASABI_ACCESS_KEY_ID,
secretAccessKey: env.WASABI_SECRET_ACCESS_KEY,
},
});

...

getObjects: publicProcedure.query(async ({ ctx }) => {
const { s3 } = ctx;
const listObjectsOutput = await s3.listObjectsV2({
Bucket: env.BUCKET_NAME,
});

return listObjectsOutput.Contents ?? [];
})
export const s3 = new S3({
region: env.REGION,
credentials: {
accessKeyId: env.WASABI_ACCESS_KEY_ID,
secretAccessKey: env.WASABI_SECRET_ACCESS_KEY,
},
});

...

getObjects: publicProcedure.query(async ({ ctx }) => {
const { s3 } = ctx;
const listObjectsOutput = await s3.listObjectsV2({
Bucket: env.BUCKET_NAME,
});

return listObjectsOutput.Contents ?? [];
})
env:
WASABI_ACCESS_KEY_ID=""
WASABI_SECRET_ACCESS_KEY=""
BUCKET_NAME=""
REGION=""
WASABI_ACCESS_KEY_ID=""
WASABI_SECRET_ACCESS_KEY=""
BUCKET_NAME=""
REGION=""
❌ tRPC failed on wasabi.getObjects: The AWS Access Key Id you provided does not exist in our records.
I deleted and recreated the access keys multiples times making sure they were copied over perfectly. Its such a dumb error because its clear whats wrong, the access key is invalid. But I know its the one I got from wasabi... Any help is appriciated thanks
1 Reply
whatplan
whatplan2y ago
export const s3 = new S3({
region: env.REGION,
credentials: {
accessKeyId: env.WASABI_ACCESS_KEY_ID,
secretAccessKey: env.WASABI_SECRET_ACCESS_KEY,
},
endpoint: env.WASABI_ENDPOINT,
});

...

WASABI_ENDPOINT="https://s3.us-west-1.wasabisys.com"
export const s3 = new S3({
region: env.REGION,
credentials: {
accessKeyId: env.WASABI_ACCESS_KEY_ID,
secretAccessKey: env.WASABI_SECRET_ACCESS_KEY,
},
endpoint: env.WASABI_ENDPOINT,
});

...

WASABI_ENDPOINT="https://s3.us-west-1.wasabisys.com"
Thank you to Wasabi support (and there insanely quick response times at 10 at night) Hopefully this helps anyone with the same issue
Want results from more Discord servers?
Add your server