File Storage with AWS S3 Buckets Upload | Django (3.0) Crash Course Tutorials (pt 22)

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

КОМЕНТАРІ • 279

  • @DennisIvy
    @DennisIvy  4 місяці тому

    Don't forget to check out my Complete Django course! dub.sh/NvGboTI

  • @karudish
    @karudish 4 роки тому +81

    For those who can't write the CORS configuration in xml:
    [
    {
    "AllowedHeaders": [
    "*"
    ],
    "AllowedMethods": [
    "POST",
    "GET",
    "PUT"
    ],
    "AllowedOrigins": [
    "*"
    ]
    }
    ]

    • @petenjs3500
      @petenjs3500 3 роки тому

      Thanks bro!

    • @malayparmar504
      @malayparmar504 3 роки тому

      Thanks alot

    • @elmanotas4041
      @elmanotas4041 3 роки тому

      i've access dennied for any image file

    • @petenjs3500
      @petenjs3500 3 роки тому

      @@elmanotas4041 You may need to make the bucket publicly accessible, I did this and changed everyone's permission to only 'Read'.

    • @karudish
      @karudish 3 роки тому +1

      ​@@elmanotas4041 Exactly. As the above reply mentioned, you need tweak the security settings. Lookup something to change the permissions "available to everyone" or something like that

  • @DarkStarRules
    @DarkStarRules 3 роки тому +11

    For everyone getting problems logging in, all of your previous customers, tags, products, are all deleted. They all got deleted in the previous video. What you need to do is to create a super user. if your are NOT able to create a superuser: Go to signals.py, and change "group = Group.objects.get(name='customer')" to "group, created = Group.objects.get_or_create(name='customer')". Once you create superuser with "python manage.py createsuperuser", log in to the admin panel (/admin). Go to the group section, create two groups with one being called (capitalisation does matter for both), "customer" and "admin". I would give all permissions to the admin group just because.
    Lastly, go to part 6 in the tutorial at 10:09-11:36 and 12:16-end of video. I spent four days trying to figure this out but after nothing else working, so I hope my frustration doesn't go to y'all.

    • @DarkStarRules
      @DarkStarRules 3 роки тому +2

      Also, make sure to go to your super account in users, and give your self the admin group.

    • @tusharvyavahare9229
      @tusharvyavahare9229 3 роки тому

      I can't thank you enough. I recently learned django and just know basics, this is my first tutorial project. I'm following this course from the beginning. And today suddenly nothing works all I get is errors. No id can be logged in. I tried to create new super user but couldn't. Checked settings, decorators, views for an hour to see if I done any mistakes but nothing. Then I see this comment. thanks a ton. This helped me a lot.

    • @DarkStarRules
      @DarkStarRules 3 роки тому +1

      @@tusharvyavahare9229 No problem and good luck 😊

    • @abhavgoel9390
      @abhavgoel9390 Рік тому

      you are a life saver , can you please explain what happens in get_or_create?

  • @sanjeevpanicker9813
    @sanjeevpanicker9813 3 роки тому +30

    Awesome tutorials. Instead of copying over the files from local 'static' folder, it's better to run 'python manage.py collectstatic' after configuring AWS settings. This command auto uploads all the local static files including 'admin' files.

    • @joelmiruni8660
      @joelmiruni8660 3 роки тому

      why does it take time to collectstatic

    • @hrishikeshkale8403
      @hrishikeshkale8403 3 роки тому +2

      Yes, But then why is that neither my admin css nor my app css are working, also the images are not been loaded, could you please help here

    • @ribeiroWilliam
      @ribeiroWilliam 3 роки тому

      you are a god

    • @engrenzoyoung9964
      @engrenzoyoung9964 3 роки тому

      @@hrishikeshkale8403 that's the reason collectstatic would be powerful...
      It will collect the files of your admin too

    • @work9167
      @work9167 2 роки тому

      Awesome. Your comment should be higher

  • @O.nitin353
    @O.nitin353 3 роки тому +6

    if you are beginner to AWS like technology a single error can give you head attack.

  • @sandeepsinghnegi6348
    @sandeepsinghnegi6348 4 роки тому +8

    I'm getting a 'net::ERR_ABORTED 400 (Bad Request) 'in console for every file in the s3 bucket and the static files are not loading in my project. can you help me out with this.

  • @ShaviSuri
    @ShaviSuri 4 роки тому +6

    Those who are not able to load static files:
    add these following lines in settings.py
    AWS_S3_ENDPOINT_URL: 'sts.ap-south-1.amazonaws.com'
    AWS_S3_REGION_NAME = 'ap-south-1'
    change region code according to your account settings.

    • @santoshkumarpatro3691
      @santoshkumarpatro3691 4 роки тому +1

      Thankx a lot..that worked!!!!!!!!!!!!!!!!!!!!!!!!!!!!✌✌✌✌✌✌✌✌✌✌

    • @santoshkumarpatro3691
      @santoshkumarpatro3691 4 роки тому

      Although in AWS s3 its mentioned that region not required...but it works only if region is selected

    • @uvu
      @uvu 4 роки тому

      Thank you sir! I was almost giving up

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

    Okay dude I have been putting off the aws stuff in my current project for like 3 months because I wasn't sure why I couldn't get it to work the first time. I was missing the boto3 package and trying to do it without. 🙃 Now I know, thanks man.

  • @MrYoklmn
    @MrYoklmn 4 роки тому +6

    Ох красавчик! Спасибо огромное) буду ждать видео о деплое на амазон с безлимитным масштабированием и лоад бэлэнсером) спасибо и удачи!

  • @malayparmar504
    @malayparmar504 3 роки тому +4

    10:47
    As he mentioned, we need to configure how to save the image in the images folder. Does anyone know how to do that??

    • @samstoppani8558
      @samstoppani8558 3 роки тому

      I also have this problem, MEDIA_ROOT = os.path.join(BASE_DIR, 'static/images') does not solve it for me

  • @DarkStarRules
    @DarkStarRules 3 роки тому +5

    If the Image is not loading/you get error when going to image link "The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256.", what you need to do is put " AWS_S3_REGION_NAME = 'us-east-2' " in settings.py. I live at the US east coast so this will work for me. If you live in another region, find the code that corresponds with you. Hope this helps.

  • @janulation6115
    @janulation6115 2 роки тому +2

    How do we ensure that users can not access other users images by modify the S3 path in the inspector of the browser?

  • @knug125
    @knug125 3 роки тому +13

    If anyone is having issues with images not loading in after configuring settings...
    I kept getting this error when I followed Image URL "SignatureDoesNotMatch: The request signature we calculated does not match the signature you provided. Check your key and signing method. "
    I fixed it by adding AWS_S3_ADDRESSING_STYLE = "virtual" into my settings.py. Apparently this is a problem if you're using us-east-2 server. I hope this helps anyone out there I was stuck with this bug for 3 hrs.
    P.S If you're already deployed to heroku, make sure you update requirements.txt when new packages.

    • @Variety65
      @Variety65 3 роки тому

      Thank you so much. It worked.

    • @dejandiklic7183
      @dejandiklic7183 3 роки тому

      I was looking on internet for 2h, my region was eu-central-1, and i had this problem, thank you so much!!!

    • @Consignee-g5r
      @Consignee-g5r 3 роки тому +1

      Life Savior

    • @anubhavgupta7155
      @anubhavgupta7155 3 роки тому

      THANK YOU ! Even I was stuck at it for 3 hrs !

    • @work9167
      @work9167 2 роки тому

      Beautiful answer! Thanks! This also works for eu-north-1

  • @BhatiJhabarSingh
    @BhatiJhabarSingh 4 роки тому +5

    I am getting this error though I installed django-storages, boto3

  • @beikeni
    @beikeni 3 роки тому +2

    Please make a video on how to set up an Elastic Beanstalk environment with Django. I'm super stuck at trying to access ENV variables

  • @felipeekeziarosa4270
    @felipeekeziarosa4270 3 роки тому

    Amazing. I can believe I just upload my static files to Aws. It was incredible simple with your help. Thx so much.

    • @Adewale-Ayomide
      @Adewale-Ayomide Рік тому

      Hi do you have the cors configuration? I need it. thanks

  • @mrutyunjayashiremath5589
    @mrutyunjayashiremath5589 4 роки тому +1

    I've completed 14 videos thank u very much 🙏

  • @allanchan339
    @allanchan339 4 роки тому +5

    It seems the photo cannot render as expected. So I need to add something more based on Django-storages guidelines. First, AWS_S3_SIGNATURE_VERSION ='s3v4' Second: AWS_S3_REGION_NAME = "us-east-2"
    One more thing to point out, safari didn't render images successfully, while chrome work completely fine.... This took me a day to find out

    • @magiccode3396
      @magiccode3396 4 роки тому +1

      THANKS

    • @e-FundaLMS
      @e-FundaLMS 2 роки тому

      You are a superstar !!!!!

    • @ValentinKunz-d3i
      @ValentinKunz-d3i 3 місяці тому

      Some people don't need to wear a cape to be heroes.
      Lots of love from Germany. I hope you and your family stay safe :)

  • @ashleyadrias
    @ashleyadrias 4 роки тому +9

    how to do configure it so that the image goes into the img folder on s3? I watched all the videos and i didnt see it. Thanks for the great tutorial!

    • @blood4bones366
      @blood4bones366 4 роки тому +1

      this works for me
      ProfilePicture = models.ImageField(upload_to='ProfileImages/')
      Django will Automatically create the folder, You can name it any name you want. Just make sure you've configured you media url in your settings.py . Happy Coding 😉
      ALL THE TIME WITH AWS

  • @AlifAhsanul
    @AlifAhsanul 4 роки тому +2

    Hi Dennis,
    I can't fetch the logo from S3 Bucket
    The error message is
    This XML file does not appear to have any style information associated with it. The document tree is shown below.
    SignatureDoesNotMatch
    The request signature we calculated does not match the signature you provided. Check your key and signing method.
    I have set in settings.py
    AWS_S3_HOST = 'us-east-2.amazonaws.com'
    AWS_S3_REGION_NAME = 'us-east-2'

    • @AlifAhsanul
      @AlifAhsanul 4 роки тому +3

      oh i have to add
      AWS_S3_SIGNATURE_VERSION = 's3v4'
      to settings.py

    • @ARKPROCODER
      @ARKPROCODER 4 роки тому

      Bro i can't debug that error what to do??

    • @duckbox
      @duckbox 4 роки тому +1

      Thanks, helped a lot!!
      in fact I have only set in
      AWS_S3_REGION_NAME = 'us-east-2'
      and worked fine.

  • @nazishaslam9576
    @nazishaslam9576 4 роки тому +5

    Hi Dennis, I've got a problem when using aws database (followed all the steps in the tutorial). After connecting and running the server, I'm UNABLE TO LOGIN WITH ANY REGISTERED USER & ITS CORRECT PASSWORD. However, when I switch to the default 'sqlite' database it works perfectly! Same happens with the /admin login too.
    Also, when I tried to create a new user, I get an error "DoesNotExist at /register/.....Group matching query does not exist.". Please suggest the solution.

    • @gen-ztiktok6990
      @gen-ztiktok6990 4 роки тому

      Same here

    • @adamsk2624
      @adamsk2624 4 роки тому +2

      when you migrated the database, all the created groups were deleted and you need to create them once again

    • @gen-ztiktok6990
      @gen-ztiktok6990 4 роки тому

      @@adamsk2624 Thanks for the reply, I really appreciate that

    • @gen-ztiktok6990
      @gen-ztiktok6990 4 роки тому

      @@adamsk2624 I'm sorry I'm unable to create a new group because I get an error while creating a new superuser

    • @ТимурАбдуллаев-ь6ъ
      @ТимурАбдуллаев-ь6ъ 3 роки тому

      @@gen-ztiktok6990 what error did you have?

  • @jhkz4313
    @jhkz4313 4 роки тому +2

    what would be the reason that I can't see status part colors and logo on navbar?
    I have managed to see uploaded profile photos on account settings but not logo picture.

    • @ribeiroWilliam
      @ribeiroWilliam 3 роки тому

      right click the page, inspect, click on console and see the error message in red. google the message and most likely there will be a stackoverflow article with the solution.

  • @JackHeidz
    @JackHeidz 4 роки тому

    Dennis congrats, what should I do, about showing images com table field? like {{ table.image }} ? it is not working here.

  • @harshadkoravi7520
    @harshadkoravi7520 4 роки тому +1

    I am getting putobject error while uploading profile pic , how do i fix this?

  • @PythonCareerCoach
    @PythonCareerCoach 4 роки тому

    in between last video and this video , did you create your admin user and different user accounts ? I am getting and error while creating admin account as "django.contrib.auth.models.DoesNotExist: User matching query does not exist"
    please help how to create super user to proceed. Excited to learn more. Pls help

  • @Shivam_Manswalia
    @Shivam_Manswalia 4 роки тому +1

    images are not showing. they are working fine using direct address. but can't make them work while updating profile pictures.

  • @hansalexander1051
    @hansalexander1051 4 роки тому

    How to separate Media Files and Static Files in one bucket ?
    For example,
    In local I have "media" folder for file uploads, and "staticfiles" for collected static files.
    How can I define those folders in bucket?
    In the video you shown only putting
    DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage' #for media
    STATICFILES_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage' #for static
    Please advise..Thanks

  • @JenniferKaiser-jk8zy
    @JenniferKaiser-jk8zy Рік тому

    How do you change the configuration so that the uploaded file goes into the images/ dir instead of the main dir in the S3 bucket?

  • @cosrumut2681
    @cosrumut2681 3 роки тому

    Hello , I'm still a beginner at this, when i try creating custom storage, i cannot import s3boto3storages from storages.backends.s3boto3 , can you help me

  • @ElvisMunteanu
    @ElvisMunteanu 4 роки тому +3

    I managed to upload the files, and in that moment the static files are loaded , but I loose any configuration to the admin pages, those look really basic. Anyone had this and know what happened or how to fix it ?

    • @MrFelipe91
      @MrFelipe91 4 роки тому +1

      yes it happens when you don't configure correctly your remote s3 source and you just delete your local statics, In that case admin doesn't have the knowledge of the styling. Also remember to put in your S3 bucket the admin folder under static. (local: static/admin, in your s3 bucket: admin).

    • @MrFelipe91
      @MrFelipe91 4 роки тому +1

      Also if you want your admin o other static info serve in your server instead of S3, just remove STATICFILES_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage' from your settings and run python manage.py collectstatic

  • @Kayioki
    @Kayioki 4 роки тому +1

    Thanks I was having a problem with this and the videos helped out a lot

  • @devanshujotwani
    @devanshujotwani 2 роки тому

    I have multiple apps so how do I proceed uploading my static files on AWS?

  • @mvn3949
    @mvn3949 2 роки тому

    Will this work on S3 services from another providers or just on Amazon AWS?

  • @elprinz6604
    @elprinz6604 4 роки тому +2

    Hi wondering if anyone has seen a solution to this issue.
    Ever since I migrated from localhost to postgres/AWS, I am not able to login or register even as Admin.
    Seems all migrated tables to pgAdmin did not include any data. So the tables are empty and wont let me login. Can you help in any way?

    • @marlinmyers2648
      @marlinmyers2648 4 роки тому

      I have had this same issue (as well as a few others in this comment section). I have been working to figure it out but have not been successful so far

    • @elprinz6604
      @elprinz6604 4 роки тому +1

      So finally I was able to get all data migrated to postgres/AWS databases.
      This is how I did it after several hours unfortunately;
      -- First I followed this guide: www.vphventures.com/how-to-migrate-your-django-project-from-sqlite-to-postgresql/
      -- But before I started I stripped the sqlite3 db of all data leaving only the superuser from "127.0.0.1:8000/admin" (Everything including customer, orders, customer group etc.)
      ---then I ran a TRUNCATE django_content_type CASCADE; from python manage.py dbshell on the sqlite3 db and postgres db.
      --Finally python manage.py loaddata db.json
      -- and boom it worked!!
      Took a little too long but paid off in the end. Gained a lot from the research.
      Thanks Dennis

    • @keomariccidelima2877
      @keomariccidelima2877 4 роки тому

      @@elprinz6604 Hello, I have been stuck on this for a long time as well! Since I'm a beginner I didn't understand fully your solution, would you be able to give more details of how you were able to do it? Thanks!

  • @PranoySinha
    @PranoySinha Рік тому

    Hello Dennis - thanks for sharing nice tuts. I am pretty new to Django. Can you pls advise me how do I configure boto3 so that I can able to upload (few) files like some CSV Data to s3 (for further processing) and others (like images etc) in local storage. So basically S3 will be for remote processing of CSV data through Lambda.

  • @malikbrahimi7504
    @malikbrahimi7504 4 роки тому

    How would you make the images private such that they need a user session which corresponds to the "owner" of the image

  • @MrBrightsideTK
    @MrBrightsideTK 4 роки тому

    Added STATICFILES_STORAGE but it still reads files from localhost. What is wrong?

  • @gauravthapar6597
    @gauravthapar6597 4 роки тому

    how to download media files which we are storing gin s3 bucket in django ? Now i am only able to open in browser only. I want to download the file directly from the link.

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

    if anyone faces Access Denied Error even after trying all the things mentioned in the video and comments just add the bucket policy which will also help to render images and CSS styling. Use the following policy and just change the Resouce by pasting your bucket arn in it
    {
    "Version": "2012-10-17",
    "Statement": [
    {
    "Effect": "Allow",
    "Principal": "*",
    "Action": "s3:*",
    "Resource": "/*"
    }
    ]
    }

  • @amankumar-qs5fy
    @amankumar-qs5fy 3 роки тому

    Sir, after attaching to AWS i can't able to access by old user names which we created in local server , even the admin ,
    It says username or password incorrect
    But if i create new user, that able to access (login) correctly
    So sir please help me with how to fix this data loss issue.

  • @mm333-e1t
    @mm333-e1t 4 роки тому +1

    I have a css background image set for body tag and it is not loading on the page through s3. The error i get is 403 forbidden. But the images in img tag like the logo are loading fine.

    • @NiM44
      @NiM44 4 роки тому +3

      i try many ways for solve this in the end you can add this in your settings.py and will be fine
      ```
      AWS_QUERYSTRING_AUTH=False
      ```
      from s3 you have to make public directory , Gluck

    • @muhammadasadarshed6877
      @muhammadasadarshed6877 4 роки тому

      @@NiM44 Thank you can you give some information of it that after setting it what happen that all our files work fine

  • @technoinfoworldwide2329
    @technoinfoworldwide2329 4 роки тому +2

    When admin gets login and enter dasboard,there is feature of "create customer" and when admin view the customer,there is another feature "update customer" ..you haven't work in both yet.hope you will cover this too soon

    • @DejAyEnterprise
      @DejAyEnterprise 4 роки тому +2

      I am also interested in the code for the "create customer" and "update customer". Earlier on, you also indicated that you'll show how to select multiple items with checkboxes from a dropdown. I have tried doing this using django-multiselectfield but no luck getting check box included. Please assist or point me in the right direction on these 3 items. Completed your tut, great stuff!

  • @pranavbakare8922
    @pranavbakare8922 3 роки тому

    Dennis sir whether it is free to use aws as a beginner person to test our application????

  • @fikrimusic2234
    @fikrimusic2234 3 роки тому

    if i added STATICFILES_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage', then my admin page is broken, do you have any idea?

  • @pauzc5210
    @pauzc5210 3 роки тому

    Damn man thank you SO much. Is people like you that go to heaven

  • @moneeshkumar1838
    @moneeshkumar1838 3 роки тому +1

    Those who are facing image is not showing issue
    Just upload (AWS_S3_CUSTOM_DOMAIN = '%s.s3.amazonaws.com' % AWS_STORAGE_BUCKET_NAME) in setting.py
    Then, go to your AWS S3 make the folder which contains image, make that folder to public
    That's it your good to go

  • @iosefespiritu678
    @iosefespiritu678 3 роки тому

    Nice tutorial! My portfolio is already running in Heroku server. Thanks for this tutorial Dennis!

  • @obapalacebenin9413
    @obapalacebenin9413 2 роки тому

    Great job bro. thank you so much for this, the static files for my application seems to be loading just fine, but by admin static file isn't loading, please help.

  • @rayganmudberry375
    @rayganmudberry375 4 роки тому +5

    Request! Next project React with Django new domain covering scratch to advance(complete). thank you.

    • @beyzaaydn2896
      @beyzaaydn2896 4 роки тому +1

      I would love to see React on Django video with simple teaching method :)

    • @rayganmudberry375
      @rayganmudberry375 4 роки тому

      @@beyzaaydn2896 yes that what i want too.

  • @manavpatnaik222
    @manavpatnaik222 4 роки тому +1

    I am not able to write the CORS cofiguration in XML. AWS says that only JSON is valid. Please help.

    • @hugobritto9873
      @hugobritto9873 4 роки тому

      This is the equivalent code in JSON: [
      {
      "AllowedHeaders": [
      "*"
      ],
      "AllowedMethods": [
      "GET",
      "POST",
      "PUT"
      ],
      "AllowedOrigins": [
      "*"
      ],
      "ExposeHeaders": []
      }
      ]

    • @gen-ztiktok6990
      @gen-ztiktok6990 4 роки тому

      @@hugobritto9873 I got an error while creating a superuser after connecting AWS to my project, the error says: django.contrib.auth.models.DoesNotExist: Group matching query does not exist.

  • @davidsulaberidze5978
    @davidsulaberidze5978 4 роки тому +3

    Hello Dennis,
    Thank you very much for sharing your knowledge and helping us, I am following your Django course (on 14th video currently) and learning much, enjoying much and evolving much from your course. What you are doing and how you are doing is really wonderful.
    very_grateful = True

  • @mohamedsameh3126
    @mohamedsameh3126 4 роки тому +1

    the static files and images are not loaded when using s3 aws, I have tried all the suggestions in the comments but all of them did not work for me. I have tried to set the region and still nothing is loading. However when I inspect the elements in the page I can see the url like this "bucket-name.s3.amazonaws.com/image01.png" or "bucket-name.s3.amazonaws.com/project-name/css/bootstrap.min.css". However css not displayed all what I can see HTML and failed to load images. Can anybody help me with this?

    • @sergimartinez7060
      @sergimartinez7060 4 роки тому

      same thing, did you solve it?

    • @mohamedsameh3126
      @mohamedsameh3126 4 роки тому

      @@sergimartinez7060 yes it the bucket policy need to be set you will find Denis written a code in one pf his videos that solves that issue. I think it was the portfolio website time lapse check it in the videos section

    • @jubrilosunlana6141
      @jubrilosunlana6141 3 роки тому

      @@mohamedsameh3126 hello, this is the same issue i've been trying to solve for the past one week, can you kindly put me through how you were able to debug the issue?

  • @iosefespiritu678
    @iosefespiritu678 3 роки тому

    Uhm... I would like to ask if you have alternative Storage Server aside from Amazon S3, based on their website, their free tier will only last for 12 months, then they will charge on your registered Credit card.

  • @drustan6890
    @drustan6890 3 роки тому

    amazon s3 is serving user uploaded images as expected, but it is not serving my static images.

  • @kaam8h
    @kaam8h 4 роки тому +2

    Hey man, thanks for the new upload. Video 13 seems to be missing though

    • @DennisIvy
      @DennisIvy  4 роки тому +2

      That was supposed to be "Pagination". It fell of the priority list but i'll add it soon :)

  • @sandeepsinghnegi6348
    @sandeepsinghnegi6348 4 роки тому

    what if i want to store only media file to aws-backet and not the whole css, jss files

  • @the_sage_007
    @the_sage_007 4 роки тому

    Great Video !!! Really helpful series !!

  • @jawwadhussain8457
    @jawwadhussain8457 2 роки тому

    Can you help me with mayan edms S3 integration?

  • @digitalcatofficial
    @digitalcatofficial 4 роки тому +1

    Thank you Dennis~ great course.
    I have a problem, after I set up the S3 Bucket when I collect static files, they are all uploaded to bucket with no problem. But when I run my server on the localhost, I got 400 (Bad Reqeust).
    Do you know what might cause that issue? If anyone runs into the same problem as me?
    Thank you!

    • @digitalcatofficial
      @digitalcatofficial 4 роки тому

      400 (Bad Request) only for those file on AWS bucket

    • @digitalcatofficial
      @digitalcatofficial 4 роки тому +2

      For anyone who faces the same problem, I change my region from Canada-central to another region in the US. It solves my problem, but I still don't know what should I set up for bucket locate in Canada.

  • @ifeoluwaajumobi3974
    @ifeoluwaajumobi3974 3 роки тому

    Keep getting this Error @ the CORS configuration.
    The CORS configuration must be written in valid JSON.

  • @christiankyleching442
    @christiankyleching442 4 роки тому

    Are there any free CDNs available for a Django app hosted on Heroku (free tier)? My site is only for my personal portfolio and I don't want to spend just to get a custom domain (which Cloudflare requires).

  • @TheZipzapzum
    @TheZipzapzum 4 роки тому

    Do we need to configure (due to s3) , when we upload project to heroku

  • @seng.a.0
    @seng.a.0 3 роки тому

    just the thing i was looking for

  • @sriram9786
    @sriram9786 4 роки тому

    Dennis can you put a video on launching complete django project meaning serving user uploaded image and databases and using s3 baucket. Simply everything uploading our django project to aws

  • @shalemrobin6233
    @shalemrobin6233 4 роки тому +1

    If static files are not getting loaded.
    In settings.py add
    WS_S3_REGION_NAME = 'ap-south-1'
    mine is 'ap-south-1' your might be different, you can find it on AWS site on right of you name

    • @ShaviSuri
      @ShaviSuri 4 роки тому +2

      still not loaded

  • @timminshall1221
    @timminshall1221 2 роки тому

    Awesome video thank you so much! This really helped me :)

  • @greensinais_bots
    @greensinais_bots 3 роки тому

    thank you man!! I'm from Brazil !

  • @paulaalejandradiazsilva2333
    @paulaalejandradiazsilva2333 4 роки тому

    Do you know of a good tutorial to upload a site to AWS elastics beans?

  • @freekeys
    @freekeys 4 роки тому

    SSL validation failed for (bucket name).... PLS sir help me🙏

  • @tanaypatil5476
    @tanaypatil5476 4 роки тому

    Hi, I'm getting 403 error when Public access is denied for bucket. I want the images to be accessible only through my website. How can I do that?

  • @mayanktripathi4u
    @mayanktripathi4u 4 роки тому

    For Media files / images, do we need to do the same configuration? or it is different then what is setup for static files / images.

    • @berkansems9053
      @berkansems9053 4 роки тому

      actually you need to public your bucket in s3 you can use this link havecamerawilltravel.com/photographer/how-allow-public-access-amazon-bucket/

  • @syrgakomuraliev
    @syrgakomuraliev 3 роки тому

    Why my app started loading much longer after this and all my data lost ?

  • @danielkasaine1629
    @danielkasaine1629 4 роки тому

    Clearly explained. Thank you

  • @santoshkumarpatro3691
    @santoshkumarpatro3691 4 роки тому

    Although in AWS s3 its mentioned that region not required...but it works only if region is selected

  • @ryan_0337
    @ryan_0337 4 роки тому

    You're awesome Dennis, thanks a lot !!!!!!!

  • @rakeshravig
    @rakeshravig 4 роки тому

    Very nice tutorial. Thank you

  • @saukhinsarkar2920
    @saukhinsarkar2920 3 роки тому

    I am able to see the media files but not the css which show 403 forbidden error

  • @dabdevs
    @dabdevs 4 роки тому

    Thank you mate for this tutorial!

  • @apoorvajyoti8066
    @apoorvajyoti8066 4 роки тому

    can you provide me with thw link of this project ?

  • @RiccardoDiBiagio88
    @RiccardoDiBiagio88 4 роки тому +2

    all is working but my 127.0.0.1:8000/admin has no staticfiles

    • @RiccardoDiBiagio88
      @RiccardoDiBiagio88 4 роки тому +2

      sorry , has only html code and no css

    • @ElvisMunteanu
      @ElvisMunteanu 4 роки тому

      @@RiccardoDiBiagio88 in settings.py add ADMIN_MEDIA_PREFIX = '/static/admin/' and in order to copy the CSS for the admin interface to the static folder that was moved on cloud run python manage.py collectstatic
      in terminal. Did the trick

    • @ElvisMunteanu
      @ElvisMunteanu 4 роки тому +3

      in settings.py add ADMIN_MEDIA_PREFIX = '/static/admin/' and in order to copy the CSS for the admin interface to the static folder that was moved on cloud run python manage.py collectstatic
      in terminal. Did the trick

    • @RiccardoDiBiagio88
      @RiccardoDiBiagio88 4 роки тому

      @@ElvisMunteanu i've admin file in the main directory so i've :
      ADMIN_MEDIA_PREFIX = 'admin/'
      but this doesen't work for me.
      my urls are:
      MEDIA_URL = '/media/'
      STATIC_URL = '/static/'
      I add that my admin directory has been added on s3 bucket by collectstatic

    • @RiccardoDiBiagio88
      @RiccardoDiBiagio88 4 роки тому

      @@ElvisMunteanu where have you find the solution?

  • @1santyjara
    @1santyjara 4 роки тому +3

    Hi Dennis, whats happending here. The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256.

  • @stagecoachmechanic
    @stagecoachmechanic 4 роки тому +1

    When I start using aws my app doesn't allow me log in user or even register them. Somebody help me please.

    • @aneessyeda4704
      @aneessyeda4704 4 роки тому +1

      Nick Selemogo in your Group table, add groups admin and customer

    • @amantayal1897
      @amantayal1897 4 роки тому

      @@aneessyeda4704 how to add in groups. plz tell

    • @rickinio
      @rickinio 4 роки тому

      @@aneessyeda4704 Thank you!

  • @FernandoLopez-kj1pu
    @FernandoLopez-kj1pu 4 роки тому

    It gives me an error when I configure the cors and it does not let me save because
    Unknown error
    Unexpected error has ocurred.
    API response
    Expected params.CORSConfiguration.CORSRules to be an Array

    • @dianalovette2078
      @dianalovette2078 4 роки тому +1

      I had the same error, replacing everything with this JSON worked for me:
      [
      {
      "AllowedHeaders": [
      "*"
      ],
      "AllowedMethods": [
      "GET",
      "PUT",
      "POST",
      "HEAD",
      "DELETE"
      ],
      "AllowedOrigins": [
      "*"
      ],
      "ExposeHeaders": [],
      "MaxAgeSeconds": 3000
      }
      ]
      Reference:
      docs.aws.amazon.com/AmazonS3/latest/dev/cors.html#how-do-i-enable-cors

    • @Khanzaki1
      @Khanzaki1 4 роки тому +1

      @@dianalovette2078 Thanks man

  • @ThePassportPapi
    @ThePassportPapi 4 роки тому

    great video worked for me!

  • @ifeoluwaajumobi3974
    @ifeoluwaajumobi3974 3 роки тому

    Thanks Dennis for the amazing tutorial....when i open Amazon S3 , I keep getting this Error "Unknown Error An unexpected error occurred".

  • @StoryOfOurMarriage
    @StoryOfOurMarriage 4 роки тому

    After doing Everything, I am unable to see CSS effects (even images ) to CRM dashboards.
    Please suggest if anyone faces same.
    I have followed proper CORS configuration and also created IAM user .
    All details updated in settings.py file with 'storages' as installed apps.
    Please help

  • @kibi4979
    @kibi4979 4 роки тому

    Just EXCELLENT! can you help us to do the same with Dropbox API?

  • @kapilpalotra6279
    @kapilpalotra6279 4 роки тому

    Hello Dennis, thank you for your wonderful videos, just need your little help here.
    I'm getting this ERROR when i try to go to the uploaded image link of bucket at 10:45
    image is also uploaded to bucket but it cannot be fetched
    """This XML file does not appear to have any style information associated with it. The document tree is shown below.
    InvalidRequest
    The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256.
    C4C0828B6D0E5A13
    ErzKAWxZHLovlnuNW2rQf6wIiYJaoklTU/17GEp0W4Frr6cLhGF49lXdqpzSmSUcDg7r886AQ5Q=
    """

    • @DennisIvy
      @DennisIvy  4 роки тому

      Thank you Kapil :)
      It seems like you either didnt provide the right credentials or maybe didn't fully set the user permissions.

    • @kapilpalotra6279
      @kapilpalotra6279 4 роки тому +5

      ​@@DennisIvy SOLVED.
      All credentials were right, but needed extra parameter in my case i.e.;
      AWS_S3_REGION_NAME = 'us-east-2'
      thanks

    • @sannjayy
      @sannjayy 4 роки тому

      According to docs.aws.amazon.com/general/latest/gr/rande.html#s3_region, there are 8 Regions that support v2 and v4:
      US East (Virginia Only)
      US West (Oregon)
      US West ( N. California)
      Asia Pacific (Singapore)
      Asia Pacific (Sydney)
      Asia Pacific (Tokyo)
      EU (Ireland Only)
      South America (São Paulo)

    • @killianpinier5074
      @killianpinier5074 2 роки тому

      @@kapilpalotra6279 thank you very much !!

  • @sharker1969
    @sharker1969 3 роки тому

    Thank you so much, Bro!

  • @tecnojv
    @tecnojv 4 роки тому

    Understood that this is best practices, but if my project only has a few images, no users or updating is it worth it to get my static files hosted here? Or might that not be worth my time to do so? Thanks as always.

    • @DennisIvy
      @DennisIvy  4 роки тому +1

      You should be fine if you only have a few images. I'll be filming "Pushing live to heroku" in a few minutes and in that video you will see that I I will upload images without using S3 buckets. I'll try to mention your question in there :)

    • @tecnojv
      @tecnojv 4 роки тому

      @@DennisIvy Awesome. Good timing

  • @abdurahmanyusuf5170
    @abdurahmanyusuf5170 4 роки тому

    Thanks alot sir it really help full

  • @louzynerd129
    @louzynerd129 4 роки тому

    i can't access my website anymore, or login to the admin django site, what is happening

    • @louzynerd129
      @louzynerd129 4 роки тому

      it's like my database just disappeared and now i cant log in to my site someone help

    • @ТимурАбдуллаев-ь6ъ
      @ТимурАбдуллаев-ь6ъ 3 роки тому

      @@louzynerd129 after you create the postgreSQL database and connect it to your project, you need to create a new django superuser

  • @debashishchakraborty7524
    @debashishchakraborty7524 4 роки тому +1

    God level

  • @debasishbezborah9285
    @debasishbezborah9285 3 роки тому

    Thank you so much.. Its working..

  • @patrickemerysevor7410
    @patrickemerysevor7410 4 роки тому

    Ivy please can you do something on react and django?

  • @Magistrado1914
    @Magistrado1914 4 роки тому

    Excellent course
    26/07/2020

  • @paulklein5167
    @paulklein5167 4 роки тому +2

    This is killing me, but my S3 bucket gives me a restricted access 403 for everything. I followed you and Corey's lead on this exactly. Thoughts?

  • @ericksaenz7418
    @ericksaenz7418 4 роки тому

    If you change the area zone thing for the bucket you will need to add more code. Don't know why but it pisses me off.

  • @nasimiakhmedov7249
    @nasimiakhmedov7249 4 роки тому

    Please make a video using Google Cloud Storage, on UA-cam there is not a single video with django and Google Cloud Storage, I tried it myself and can not figure it out.

    • @DennisIvy
      @DennisIvy  4 роки тому +1

      I'll have to look into it since its not something I've done myself. Appreciate the input :)

  • @johnmendoza7077
    @johnmendoza7077 4 роки тому

    Great!! my bro