Created new buckets and S3 credentials, but the new credentials don't let me access my content

I’ve been using STORJ for some time on my site and I love it. However I recently made a few more buckets that I needed, and created a new S3 credential with the setting ‘same passphrase’. When I use the id and secret in my NodeJS server (using S3 API), it either gets an Unauthorized error or just doesn’t return any of my data.

I enabled all access to all buckets with no expiration date in the new S3 credentials. How should I be doing this? Thank you.

Hello @samy,
Welcome to the forum!

When you configure your NodeJS server you need to provide an endpoint to, otherwise it will try to use an Amazon’s one and of course Storj S3 credentials will not work there.
You may also take a look on a native integration GitHub - storj-thirdparty/uplink-nodejs: NodeJS / typescript bindings for libuplink

Hi @Alexey , thanks for the response. Do you mean like this?

const s3 = new S3({
  s3ForcePathStyle: true,
  signatureVersion: "v4",
  connectTimeout: 0,
  httpOptions: { timeout: 0 }

If so, I already had that set up previously. It was working fine for months until I created new buckets and decided to make new credentials for those buckets. Any help would be appreciated than you.

I believe I found the answer. It’s because I already had an access key associated with the buckets, and I had to switch over to that access key in the dashboard and create the bucket + new S3 credentials which on that access key. Was a tad confusing, thanks for the help.

You may have as much access grants (and related S3 credentials) as you want, but they should be created using the same encryption phrase, as used during upload of objects to be able to decrypt them in your application.
Please also note, that bucket will be available independently of used encryption phrase, but prefixes (“folders”) are part of the object name, so they encrypted together. With a different encryption phrase your objects cannot be decrypted and will be hidden, so the bucket will look like empty.