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

Поділитися
Вставка
  • Опубліковано 10 гру 2024

КОМЕНТАРІ • 47

  • @CodeWithMuh
    @CodeWithMuh  Рік тому +1

    Connect with me on LinkedIn: www.linkedin.com/in/muhammad-rashid-daha

  • @mystemresume
    @mystemresume 8 місяців тому +3

    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!!! 🙏🏼

  • @naveennirban
    @naveennirban Рік тому +2

    Love from India

  • @jahanasultan
    @jahanasultan Рік тому +2

    Very helpful video, thank you!

    • @CodeWithMuh
      @CodeWithMuh  Рік тому +1

      Glad to hear. You are welcome. ✨

  • @rlopxhan21
    @rlopxhan21 Рік тому +2

    This video is really informative and well-made.

  • @danielpintos6486
    @danielpintos6486 Місяць тому +1

    Thanks a lot.

  • @hopesain5065
    @hopesain5065 Рік тому +1

    Icons and the humberger are showing, any solutions on how you resolved this. As for the css is loading just fine. But only icons...

  • @UBUCURUZITV
    @UBUCURUZITV 6 місяців тому +1

    verry helpful. Thanks

  • @thisisme4547
    @thisisme4547 Рік тому +1

    Sir Will it also stored in django media folder?
    Or only stored in S3 bucket

  • @pythondjango1798
    @pythondjango1798 Рік тому +1

    Thanks 👍👍👍🎉🎉🎉

  • @milhoci
    @milhoci Рік тому +2

    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 Рік тому +2

      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

  • @DrCash7
    @DrCash7 Рік тому +1

    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  Рік тому

      There will be settings or configuration issue. Reach out to me at my email address for help

  • @rinzannp-eb3fu
    @rinzannp-eb3fu 2 місяці тому +1

    Have an error when i try to access the image through admin
    SignatureDoesNotMatch
    The request signature we calculated does not match the signature you provided. Check your key and signing method.

    • @CodeWithMuh
      @CodeWithMuh  2 місяці тому +1

      @@rinzannp-eb3fu s3 image expired. You can set signature to False in your project settings

    • @rinzannp-eb3fu
      @rinzannp-eb3fu 2 місяці тому

      @@CodeWithMuh Thank you very much .i have been stuck with this error for 2 days

  • @thabanincube3645
    @thabanincube3645 5 місяців тому +1

    Hi Muh, my setup using s3 through bucketeer for heroku is on working. Can you help please?

  • @maazshaikh7905
    @maazshaikh7905 5 місяців тому +1

    Is there a free tier for S3 or will we be charged from beginning?

  • @max72122
    @max72122 Рік тому +2

    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  Рік тому +1

      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.

  • @ashishchaudhary4938
    @ashishchaudhary4938 Рік тому +1

    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

  • @Afreedesign
    @Afreedesign Рік тому +1

    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 Рік тому +1

      @@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...

  • @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

  • @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.