Skip to content
Storage Buckets: Read-only, prefix-scoped S3 credentials
petrremenar-code
OP

a month ago

Hello,

We're using Railway Storage Buckets and would like to run a one-time diagnostic job with strictly read-only S3 access.

Does Railway support creating separate S3 credentials that:

  1. Allow only ListBucket and GetObject operations?
  2. Restrict access to a specific object prefix?
  3. Explicitly prevent PutObject, DeleteObject, and access to unrelated objects?

If this is not supported, is there an officially recommended way to run such a read-only diagnostic without granting write access to the bucket?

We're looking for a solution that does not require exposing credentials outside Railway or modifying an existing production web service.

Thank you!

Solved

3 Replies

Status changed to Awaiting Railway Response Railway • about 1 month ago


Railway
BOT

a month ago

We don't support that today. Each bucket has a single set of S3 credentials, and those credentials have full read and write access to the bucket, so there is no way to create a second key limited to ListBucket and GetObject, scoped to a prefix, or blocked from PutObject and DeleteObject.

The only credential management available is viewing the existing key or resetting it, which invalidates the old key and issues a new one with the same full access (CLI reference). We don't have a recommended read-only method for buckets, so any job using these credentials will have write access to the whole bucket.


Status changed to Awaiting User Response Railway • about 1 month ago


Railway

We don't support that today. Each bucket has a single set of S3 credentials, and those credentials have full read and write access to the bucket, so there is no way to create a second key limited to ListBucket and GetObject, scoped to a prefix, or blocked from PutObject and DeleteObject. The only credential management available is viewing the existing key or resetting it, which invalidates the old key and issues a new one with the same full access ([CLI reference](https://docs.railway.com/cli/bucket)). We don't have a recommended read-only method for buckets, so any job using these credentials will have write access to the whole bucket.

petrremenar-code
OP

a month ago

Thank you for the clarification.

I understand that Railway Storage Buckets currently provide only full read/write S3 credentials.

We need to perform a one-time, strictly read-only diagnostic check of a specific object prefix in our production bucket, without exposing write-capable credentials to the diagnostic process.

Could a human member of the Railway technical support team please confirm whether there is an officially supported safe alternative for this use case?

We would prefer to keep our existing production bucket and avoid introducing another storage provider.

Thank you for your help.


Status changed to Awaiting Railway Response Railway • 30 days ago


a month ago

That's correct, and there is no supported way to issue a separate read-only or prefix-scoped credential for a bucket today. Each bucket environment has one set of S3 credentials with full access, and the only credential controls are viewing or resetting that key.

Two documented options let you read objects without handing those credentials to the diagnostic process. The bucket's built-in file explorer (open the bucket in your project and click Files) lets you browse and download objects from the dashboard. Alternatively, presigned URLs can be generated per object and are time-limited, so the diagnostic job can receive only GET URLs for the objects under the prefix you care about rather than the keys themselves. Generating those URLs still requires the full credentials somewhere you trust, since a presigned URL is signed with them. See Storage Buckets for both.


Status changed to Awaiting User Response brody • 30 days ago


Railway
BOT

17 days ago

This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!

Status changed to Solved Railway • 17 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...