Set Up AWS S3 Bucket with Django for Static and Media Files

  Рет қаралды 17,736

CodeWithMuh

CodeWithMuh

Жыл бұрын

Learn how to set up an AWS S3 bucket with Django for storing static and media files.
☕ Buy me a coffee: www.buymeacoffee.com/codewithmuh
This tutorial covers step-by-step instructions to connect your Django project with AWS S3, configure AWS credentials, and upload files to the bucket. With this setup, you can store and serve your files securely and with scalability on the AWS cloud.
Watch this tutorial to get started! 💻
👍 Subscribe to My Channel tutorials & Courses.
🔥 Become A Backend Developer in 3 Hours: • Become a Backend Devel...
🔥 Learn Python in 1 Hour: • Python for Beginners -...
_ _ _ _ _ _ _ _ _ _ _ _ __ __ _ _ _ _
Please let me know if you would like to consult with or hire me.
Hire me on Upwork: www.upwork.com/freelancers/~0...
Place an order on Fiverr: www.fiverr.com/s/rBpEdD
_ _ _ _ _ _ _ _ _ _ _ _ __ __ _ _ _ _
Social Links:
Github: github.com/codewithmuh
LinkedIn: / muhammad-rashid-daha
Upwork: www.upwork.com/freelancers/~0...
X: / rashiddaha80
Instagram: / rashiddaha1
Medium: / codewithmuh
Website: codewithmuh.com
_ _ _ _ _ _ _ _ _ _ _ _ __ __ _ _ _ _
📔 Source Code: github.com/rashiddaha/backend...
The article used in this Video:
• / configure-aws-s3-with-...
#amazons3 #s3

Пікірлер: 41
@CodeWithMuh
@CodeWithMuh 8 ай бұрын
Connect with me on LinkedIn: www.linkedin.com/in/muhammad-rashid-daha
@mystemresume
@mystemresume 4 ай бұрын
Your video was very helpful and your explanation and step-by-step tutorial helped me so much, because I’ve been trying to use s3 for a little while now. Thank you!!! 🙏🏼
@CodeWithMuh
@CodeWithMuh 4 ай бұрын
I am happy to hear
@jahanasultan
@jahanasultan Жыл бұрын
Very helpful video, thank you!
@CodeWithMuh
@CodeWithMuh Жыл бұрын
Glad to hear. You are welcome. ✨
@rlopxhan21
@rlopxhan21 Жыл бұрын
This video is really informative and well-made.
@CodeWithMuh
@CodeWithMuh Жыл бұрын
Glad to hear ☺️
@thabanincube3645
@thabanincube3645 Ай бұрын
Hi Muh, my setup using s3 through bucketeer for heroku is on working. Can you help please?
@UBUCURUZITV
@UBUCURUZITV Ай бұрын
verry helpful. Thanks
@CodeWithMuh
@CodeWithMuh Ай бұрын
Glad to hear
@pythondjango1798
@pythondjango1798 9 ай бұрын
Thanks 👍👍👍🎉🎉🎉
@CodeWithMuh
@CodeWithMuh 8 ай бұрын
Welcome 😊
@naveennirban
@naveennirban 11 ай бұрын
Love from India
@CodeWithMuh
@CodeWithMuh 11 ай бұрын
Thanks 🙌
@milhoci
@milhoci Жыл бұрын
Does anyone knows if amazon changed something in the last month? I´m trying to send the files thru collectstatic and I´m getting the error: botocore.exceptions.ClientError: An error occurred (403) when calling the HeadObject operation: Forbidden. I used s3 + django in the past but now i´m facing this error. My code is the same of the video.
@milhoci
@milhoci Жыл бұрын
little update, I discover that the problem is in the s3 that is not allowing to upload and serving the files, I´ve tried to upload manually via browser, but even that I can´t access the files, I get Access Denied... In this case I changed the bucket to accept ACL and manually turn the file public using acl to can use as static files
@ashishchaudhary4938
@ashishchaudhary4938 11 ай бұрын
Hey I deployed my project Already on aws by watching youtube video can anybody tell me how to use s3 bucket for media files that are already in the project......i think in this video We can store present....pls help
@hopesain5065
@hopesain5065 8 ай бұрын
Icons and the humberger are showing, any solutions on how you resolved this. As for the css is loading just fine. But only icons...
@CodeWithMuh
@CodeWithMuh 8 ай бұрын
Didn't get you
@DrCash7
@DrCash7 11 ай бұрын
I have a WP frontend and Django API. I have the bucket setup with the persmissions etc but i'm not getting any picture uploads 😕
@CodeWithMuh
@CodeWithMuh 11 ай бұрын
There will be settings or configuration issue. Reach out to me at my email address for help
@max72122
@max72122 Жыл бұрын
is it possible to use IAM role by assigning it to ec2 without the need to put the access keys in the code?
@CodeWithMuh
@CodeWithMuh Жыл бұрын
Yes, it is possible to use IAM roles to grant permissions to an EC2 instance without the need to put the access keys in the code. When an EC2 instance is launched with an IAM role, temporary security credentials are automatically assigned to the instance. These temporary security credentials are automatically rotated on a regular basis, which helps to ensure the security of your AWS resources. You can then configure your application to use the instance metadata service to retrieve the temporary security credentials, which can be used to make AWS API calls. By using IAM roles, you can simplify your application's security by eliminating the need to manage access keys, and you can also improve security by ensuring that your AWS resources are accessed only by trusted entities. Also, you can create an env file, and only place the env file on the Ec2 instance, Not in Code.
@FahadAhmed-ln7so
@FahadAhmed-ln7so Жыл бұрын
Hello, I have a static file which is a video to be played on the home page of the website. How do I link the video which is in the s3 bucket to the website?
@CodeWithMuh
@CodeWithMuh Жыл бұрын
You have to write code. Which framework you are using
@maazshaikh7905
@maazshaikh7905 Ай бұрын
Is there a free tier for S3 or will we be charged from beginning?
@stivomoses8882
@stivomoses8882 9 күн бұрын
there is a free tier
@natanfelipe3002
@natanfelipe3002 Жыл бұрын
got this An error occurred (InvalidArgument) when calling the PutObject operation: None
@CodeWithMuh
@CodeWithMuh Жыл бұрын
You are not sending arguments property. Look at my Backend developer video(Postman section) to see how to send request
@Coden69
@Coden69 Жыл бұрын
i am fullstack dev (django) and i have 1 year exp now i want make a switch in a good company could u please guide me a little about how to get interview call from good reputed company. in between i m getting multiples calls from small small company. thanks in advance
@CodeWithMuh
@CodeWithMuh Жыл бұрын
Prepare a Good Portfolio Get Ready Attractive RESUME and then apply. You have to present your Experience and work you did in portfolio and In resume.
@thisisme4547
@thisisme4547 8 ай бұрын
Sir Will it also stored in django media folder? Or only stored in S3 bucket
@CodeWithMuh
@CodeWithMuh 8 ай бұрын
It will be stored on S3.
@Afreedesign
@Afreedesign Жыл бұрын
Great video, thanks but I'm getting a 403 error "An error occurred (403) when calling the HeadObject operation: Forbidden"
@CodeWithMuh
@CodeWithMuh Жыл бұрын
Make sure configurations are fine
@Afreedesign
@Afreedesign Жыл бұрын
@@CodeWithMuh which configurations?
@CodeWithMuh
@CodeWithMuh Жыл бұрын
1.Make sure s3 configurations are correct in your settings.py file. 2. Media files are defined in settings.py 3.make sure Public access is enabled on s3. You can also clone my code . If your access is public and your place correct acces keys etc for s3 configuration. And if it works fine. Then issue will be in your code
@Afreedesign
@Afreedesign Жыл бұрын
@@CodeWithMuh thank you, I will do that now
@milhoci
@milhoci Жыл бұрын
@@Afreedesign Did you have success with that? I´m trying and getting the same error. The AWS changed the policy of ner buckets in April 2023...
Amazing weight loss transformation !! 😱😱
00:24
Tibo InShape
Рет қаралды 60 МЛН
Дарю Самокат Скейтеру !
00:42
Vlad Samokatchik
Рет қаралды 9 МЛН
Looks realistic #tiktok
00:22
Анастасия Тарасова
Рет қаралды 106 МЛН
Implement Amazon S3 Storage for Static and Media files in Django
44:04
Cloud With Django
Рет қаралды 8 М.
4 ways to serve static files in Django
8:11
Django road
Рет қаралды 11 М.
Connect S3 Bucket to EC2 Instance with IAM role
14:46
IFYStudio
Рет қаралды 49 М.
How to Use AWS S3 with NodeJS?
30:39
Piyush Garg
Рет қаралды 41 М.
AWS S3 Tutorial For Beginners
27:18
Be A Better Dev
Рет қаралды 226 М.
AWS re:Invent 2023 - Dive deep on Amazon S3 (STG314)
51:25
AWS Events
Рет қаралды 9 М.
Build a Video Streaming Service on AWS! (S3 + CloudFront)
8:01
Nikita Dev
Рет қаралды 24 М.