Mar-25-2021, 01:04 AM
I automated the creation and configuration of my Postgres db for my Django project hosted as an S3 bucket on AWS through Heroku using a
The problem is, I got an email notification from Amazon yesterday saying that my db contents are public so this prompted me to check out my S3 permissions. I found some guides and docs on AWS, on Heroku, and elsewhere around the web, which explain how to use AWS and how to view and modify S3 permissions. Guides I came across include:
I’ve got an AWS root account set up but I can’t figure out how to connect it to the S3 instances initialized by the helpful
My question: How do I access the Postgres db S3 buckets through the AWS Dashboard so that I can view and change their permissions?
dj_database_url.config()
method inside my settings.py
. Using this tool, I can just export the Postgres db env variables in my shell using the format: Quote:(local venv) $ export DATABASE_URL='postgres://USER:PASSWORD@HOST:PORT/NAME'and then I can enter data from my local dev server as if it were in the cloud. Very convenient!
The problem is, I got an email notification from Amazon yesterday saying that my db contents are public so this prompted me to check out my S3 permissions. I found some guides and docs on AWS, on Heroku, and elsewhere around the web, which explain how to use AWS and how to view and modify S3 permissions. Guides I came across include:
- Vitor Freitas’ How to Setup Amazon S3 in a Django Project
- Heroku’s official Using AWS S3 to Store Static Assets and File Uploads | Heroku Dev Center
- Another official Heroku doc titled, Direct to S3 File Uploads in Python | Heroku Dev Center
dj_database_url
has already done all the heavy lifting. None of these guides explain how to access my HEROKU_POSTGRESQL_<color>_URL
instances already existing on AWS configured by dj_database_url
as they appear as env variables within my Heroku Dashboard.I’ve got an AWS root account set up but I can’t figure out how to connect it to the S3 instances initialized by the helpful
dj_database_url
script.My question: How do I access the Postgres db S3 buckets through the AWS Dashboard so that I can view and change their permissions?