Using AWS S3 to Store Static Assets on Heroku
1. Django Setting
1-1. Install storages
storages
Installation
Add
storages
to the INSTALLED_APPS in thesettings.py
1-2 . Install boto3
boto3
Boto3 is the Amazon Web Services (AWS) Software Development Kit (SDK) for Python
1-3. Modify your settings.py
settings.py
1-4. Make storages.py
where your settings.py
at
storages.py
where your settings.py
at
storages.py
1-5. Run collectstatic
Type 'yes' when the message pops up
1-6. Go to your Amazon S3 console
If you see the static folder after the upload image, you've been successfully connect your project with S3
2. Heroku settings
2-1. Config Vars
2-2. Back to settings.py
& modify
settings.py
& modify
3. Deploy
3-1. requirements.txt
requirements.txt
3-2. Disable collectstatic
3-3. Push to heroku
DONE
+
Amazon S3
출처: 클라우드 시작하기 - 장기웅, AWS 테크니컬 트레이너 :: AWSome Day 온라인 컨퍼런스
https://www.slideshare.net/awskorea/aws-awsome-day-234395883
Last updated