

Now add the storages to your INSTALLED_APPS inside the settings.py module: The easiest way is to install the libraries using pip: pip install boto3

Let’s leave it like this and let’s start working on the Django side. Leave the remaining of the settings as it is, proceed to the next steps just using the defaults and finally hit theĬreate bucket button. So the path to my assets will be something like this: Set a DNS-compliant name for your bucket. If you see the screen below,Ĭlick in the + Create bucket to start the flow. But,įor the most part you will only need one bucket per website.Ĭlick in the Services menu and search for S3. We can work with several buckets within the same Django project. Now, it’s time to create our very first bucket.īucket is what we call a storage container in S3. Save them for later.Ĭlick in the Close button and let’s proceed. Take note of all the information: User, Access key ID and the Secret access key. Review the information, if everything is correct proceed to create the new user. Will show up selected, keep it that way and finally click in the button Next: Review: Follow the wizard and click in the Create group button:ĭefine a name for the group and search for the built-in policy AmazonS3FullAccess:Ĭlick in the Create group to finalize the group creation process, in the next screen, the recently created group At this point we will need to create a new group with the right S3

Give a user name and select the programmatic access option:Ĭlick next to proceed to permissions. Go to the Users tab and click in the Add user button: Logged in the AWS web page, find the IAM in the list of services, it’s listed under We will need to create a user that have access to manage We will only need to add a fewĬonfiguration parameters and it will do all the hard work for us.īefore we get to the Django part, let’s set up the S3 part. In other words, it will make you life easier,Īs it won’t drastically change how you interact with the static/media assets. Very convenient, as it plugs in the built-in Django storage backend API. The django-storages is an open-source library to manage storage backends like Dropbox, OneDrive and Amazon S3. It’s an official distribution maintained by Amazon. The boto3 library is a public API client to access the Amazon Web Services (AWS) resources, such as the Amazon S3. You will need to install two Python libraries:

