You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How should I configure django-storages for static and media files while using an S3 access point? I want to do this because I run django on an AWS AppRunner service, which connects via a private VPC to access points for RDS, S3, other AWS services.
Right now I have the config below in my settings. I replaced them with placeholders here, but in my deploy I read them from environment or AWS secrets.
The result of this config is that:
The value in bucket_name is used as a folder on my S3 bucket. I can put whatever value in bucket_name if it passes bucket_name validation. The access point URL in endpoint_url already points to the right bucket and I'm stuck with an extra folder in my bucket.
The value in custom_domain needs to be appended with the value in bucket_name as that became a folder in the bucket. So that's my cloudfront custom domain appended with '/bucket_name'.
It works, but my folder structure in my bucket is not what I intended and it took some time trying to figure out how to use my access point.
Is this how django-storages is supposed to work with S3 access points? If so, then an example in the documentation would be useful I think.
How should I configure django-storages for static and media files while using an S3 access point? I want to do this because I run django on an AWS AppRunner service, which connects via a private VPC to access points for RDS, S3, other AWS services.
Right now I have the config below in my settings. I replaced them with placeholders here, but in my deploy I read them from environment or AWS secrets.
The result of this config is that:
'/bucket_name'
.It works, but my folder structure in my bucket is not what I intended and it took some time trying to figure out how to use my access point.
Is this how django-storages is supposed to work with S3 access points? If so, then an example in the documentation would be useful I think.
The text was updated successfully, but these errors were encountered: