Storage Bucket AccessDenied on PutObject despite correct service binding and variables
coddermind
PROOP

a month ago

I am facing an issue with Railway Storage Buckets where uploads (PutObject) are consistently failing with AccessDenied, even though the setup appears to be correct.

What I have already verified:

  • The bucket is correctly connected to the Django backend service using “Connect Service to Bucket”

  • All bucket variables are injected automatically via Railway references (no manual credentials)

  • Bucket and service are in the same environment

  • Environment variables are present and correctly mapped:

    • AWS_ACCESS_KEY_ID

    • AWS_SECRET_ACCESS_KEY

    • AWS_ENDPOINT_URL

    • AWS_S3_BUCKET_NAME

    • AWS_DEFAULT_REGION

  • Using boto3 directly (outside Django) with the injected credentials also results in:

    botocore.exceptions.ClientError: AccessDenied when calling PutObject
    
  • Signed URLs previously worked for reading, but writing has never succeeded

  • This confirms the issue is not Django, not django-storages, and not application logic

Expected behavior:

The service-bound credentials should allow s3:PutObject on the connected bucket, as described in the Storage Buckets documentation.

Actual behavior:

All write attempts fail with AccessDenied, even with correct service binding and variable injection.

NOTE:

I am select N/A as it does not showing that bucket service in the service dropdown

$10 Bounty

0 Replies

Loading...