15 hours ago
Subject: S3-compatible Bucket returns HTTP 400 on GET and HEAD
Hello Railway Team,
I'm experiencing an issue with Railway Object Storage.
I successfully uploaded two files through the Railway dashboard. Both files are visible in the bucket.
However, when accessing the files through Python boto3, both HeadObject and GetObject return HTTP 400.
Configuration:
- Endpoint: https://t3.storageapi.dev
- Region: auto
- Addressing style: virtual-host
- Python: 3.11
- boto3: 1.44.3
Could you advise how to diagnose this issue and confirm the correct S3 client configuration?
Please do not request credentials or private file contents in this public thread.
Thank you.
3 Replies
15 hours ago
The endpoint (https://t3.storageapi.dev) and virtual-host addressing you listed match what your bucket is configured with, and region auto is fine.
The remaining value to check is the bucket name passed as Bucket= in boto3. The S3 bucket name is not the display name you see in the dashboard: it is the display name plus a short hash suffix. Use the exact value from the bucket's Credentials tab (it is also what the BUCKET variable holds, whereas RAILWAY_BUCKET_NAME is only the display name), and make sure the access key ID and secret come from that same Credentials tab. Object keys must also match exactly, including any folder prefix and letter case.
Status changed to Awaiting User Response Railway • about 15 hours ago
15 hours ago
Thanks for the response.
I have confirmed that boto3 already uses the actual S3 bucket name with its hash suffix, not the dashboard display name.
The object keys also match the uploaded files, including case.
Both HeadObject and GetObject return HTTP 400.
Could you please escalate this to a human support engineer or advise how to identify the underlying S3 error?
I would also appreciate guidance on verifying the bucket credentials without resetting or exposing them.
Thank you.
Status changed to Awaiting Railway Response Railway • about 15 hours ago
8 hours ago
This thread has been opened as a bounty so the community can help solve it.
Status changed to Open Railway • about 8 hours ago
6 hours ago
Are you able to share how you're setting up the boto3 client? An example like that so I can reproduce the error would help a lot.
A 400 error usually means your setup or host is wrong, which is why I'm asking.
We can cross out whether you're using the right credentials and such by checking if the aws s3 cli works (so something like aws s3 ls), if that works then we know the client config is wrong.
I'd also recommend trying a fetch that isn't a HeadObject so you can get the error body (so something like list_objects_v2), if you do, mind sharing the error body?
Finally, when was this bucket created? If it's relatively old then you'll want to make sure you're using url path style