How to Share Amazon S3 Files/Objects with External Users Using Presigned URLs | Python SDK Example

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 ต.ค. 2024

ความคิดเห็น • 50

  • @lumiere2598
    @lumiere2598 ปีที่แล้ว +3

    Within seconds of entering this video, I was surprised by how soft and pleasant you voice sounds! Then the content itself is made very easy to understand. It almost feel like I'm in school again and just met a teacher who made me go "hey now that she is teaching this class instead, i can understand it now, and she's so nice too"

    • @TinyTechnicalTutorials
      @TinyTechnicalTutorials  ปีที่แล้ว +1

      Awwwww...this is the nicest comment EVER! Thank you so much! Made my day. 🥰🙏🤓

  • @BrianScoggin
    @BrianScoggin หลายเดือนก่อน

    Excellent video. It solved my exact problem and then showed me how to not have the problem in the first place. Also, I really appreciate you having everything ready instead of watching you fumble around the keyboard and then forget things etc etc like so many other channels. A+ on organization.

  • @tartanrambo
    @tartanrambo 2 ปีที่แล้ว +4

    Happy 2022! You are my AWS genie! Thank you for granting my wish (request for assistance). This is a really practical and useful tutorial and your delivery is, as always, faultless! I look forward to more of your tutorials this year and sincerely appreciate your generous contribution to your subscribers. I wish you every success in growing your channel and encourage everyone reading comment this to get behind you. Thank you...

    • @TinyTechnicalTutorials
      @TinyTechnicalTutorials  2 ปีที่แล้ว

      Happy 2022 back at ya, Tartan! Many thanks for the nice comment and support for the channel! So glad you're finding it useful!

  • @kwabford
    @kwabford 2 หลายเดือนก่อน

    Best AWS tutorials around! Thank you so much for showing actual use cases in a delightful manner. You’ve probably saved weeks of my life😅

  • @jasusig8946
    @jasusig8946 ปีที่แล้ว

    Thanks for showing both ways though UI and programmatically.

  • @oa3699
    @oa3699 2 ปีที่แล้ว

    Fantastic Video... Very straightforward & helpful.. Many thanks..

  • @GreatDataVideos
    @GreatDataVideos ปีที่แล้ว

    Excellent. Didn't know you could do this.

  • @prabhupalanisamy8590
    @prabhupalanisamy8590 2 ปีที่แล้ว +1

    awesome tutorial, thanks for sharing !

  • @dfelton316
    @dfelton316 ปีที่แล้ว

    First, thank you for this straight forward explanation. The reality is though, the need to share one file at a time is rare. Is there a way to create a presign url for a folder with sub-folders that contain objects?

    • @dfelton316
      @dfelton316 ปีที่แล้ว

      I figured it out from your answer to someone else's question! I've subscribed as well! Thanks again!

    • @TinyTechnicalTutorials
      @TinyTechnicalTutorials  ปีที่แล้ว

      Oh, awesome! Glad you were able to find the answer. And welcome to the channel! 🤓🙏🌟

  • @stringztoo
    @stringztoo 5 วันที่ผ่านมา

    I was super psyched to find this video, hoping it would solve my problem.... but honestly I feel I've run into a wall. I have Google Drive and Mega and both allow me to just upload files and then get a download URL for my customers to use. Unfortunately I ran outta space and am looking for a 3rd option to host my files. Setting the permissions for them allows anyone who has that URL to access the file. On a suggestion I tried S3, but the presigned URLs only last a few minutes or hours (they don't even give me the option for days) and that's not going to work for me. I need the URL to be accessible at any time without me going through all that just to get a sharable URL (which is about 10x longer than the URLs that are generated by Google and Mega).

  • @mouradzellouf7174
    @mouradzellouf7174 ปีที่แล้ว

    Thanks a lot for the video.

  • @lifelessalarm
    @lifelessalarm ปีที่แล้ว +1

    Really great content, thanks for this. Do you know of an optimal approach for generating presigned urls for multiple files at the same time? Let's say we have a web application where we want to request all the images in a bucket belonging to a particular user (which image belongs to who is stored in a database). I guess your backend could loop over all the requested files and generate an individual presigned url for each file, and then send the list back to the frontend for display. Any other thoughts on this approach?
    Thanks again!

    • @TinyTechnicalTutorials
      @TinyTechnicalTutorials  ปีที่แล้ว

      Thanks, James! :) Yeah, the looping approach you described is the only one I'm aware of. I don't know of a way to create a presigned URL for multiple files. Though I suppose you could zip the files up in S3, and then create a presigned URL to grab the zip?

    • @lifelessalarm
      @lifelessalarm ปีที่แล้ว +1

      @@TinyTechnicalTutorials Great, thanks! I think I'll go with the looping approach for now. Keep up the great content!

    • @TinyTechnicalTutorials
      @TinyTechnicalTutorials  ปีที่แล้ว

      Cheers! :)

  • @chrisdietrich1533
    @chrisdietrich1533 5 หลายเดือนก่อน

    Great content!

    • @TinyTechnicalTutorials
      @TinyTechnicalTutorials  5 หลายเดือนก่อน

      Yay!!! I'm so glad it helped. Thanks for supporting the channel, and for such a nice comment! 🙏🌟

  • @TORMENTUMM
    @TORMENTUMM 5 หลายเดือนก่อน +1

    Thanks for your content. Isn't the first 5 gb of an s3 bucket part of aws free tier?

    • @TinyTechnicalTutorials
      @TinyTechnicalTutorials  5 หลายเดือนก่อน

      Yes! You got it. 👍 5GB of standard storage, 20,000 Get requests and 2,000 Put requests.

  • @GAURAVKUMAR-qf5xt
    @GAURAVKUMAR-qf5xt 2 ปีที่แล้ว +1

    wow…. thanks … can we provide external user ( non IAM user ) access to whole bucket without making it public?

    • @TinyTechnicalTutorials
      @TinyTechnicalTutorials  2 ปีที่แล้ว +1

      Hi Gaurav! Unfortunately, the presigned URL only works for a single object within the S3 bucket. If you need to share multiple files, the best approach is probably to compress them into a zip file and then generate a presigned URL for that zip. Hope that helps!

  • @jayant5555
    @jayant5555 ปีที่แล้ว +1

    Hi Thanks for sharing the video
    One question if the object is located under nested directory then, how this code will work?
    After generating the URL, its saying the key does not exist.

    • @TinyTechnicalTutorials
      @TinyTechnicalTutorials  ปีที่แล้ว +1

      Hi Jayant! I haven't tested this out, but try using the folder name as part of the object name (for example, "/foldername/filename.extension"). S3 doesn't truly have folders. The folder name is just part of the object name.
      Here are a couple other links that might help:
      -stackoverflow.com/questions/56748449/creating-presigned-url-for-a-s3-folder-in-python
      -stackoverflow.com/questions/36344194/pre-signed-url-for-multiple-files

    • @curiousobserver123
      @curiousobserver123 ปีที่แล้ว

      Hi Jayant, were you able to solve? I am attempting the same here; when a new zip gets uploaded, lambda gets triggered, for which I create a URL

    • @jayant5555
      @jayant5555 ปีที่แล้ว

      @@curiousobserver123 yes i solved it, actually it is the issue with the folder naming, there should not be any space in the folder name.

  • @nitinjaiswal3817
    @nitinjaiswal3817 ปีที่แล้ว +1

    I am trying to access some lambda microservices using presigned url. What would be the params in that case? Sorry but I am new to this

    • @TinyTechnicalTutorials
      @TinyTechnicalTutorials  ปีที่แล้ว

      Hi Nitin! 😊 Can you give me a little more detail? You're trying to call a Lambda function? Or general a presigned URL from the Lambda function? Which parameters are you passing and from where?

  • @dodokwak
    @dodokwak ปีที่แล้ว

    Thank you.

  • @LocalGhost_8080
    @LocalGhost_8080 2 ปีที่แล้ว +1

    How can I implement a restriction to allow logged users to download files only? I guess it's not with Pre-signed URLs...

    • @TinyTechnicalTutorials
      @TinyTechnicalTutorials  2 ปีที่แล้ว

      Hi Jose! When you say "logged in," do you mean logged in to the AWS Console? Or logged in to a custom app that you've built?

  • @shellenecross3703
    @shellenecross3703 8 หลายเดือนก่อน

    Hello. In simplified terms, this is what I understand about Amazon S3 Files in general... a company or organization would use this to create a speciifc URL to upload a document they want to have available on the web (to be seen or downloaded?). If that URL is created as "open to the public," then anyone searching the internet could find it? Is that correct? Why would a company do this if they have they're own website that could house and provide the document?

    • @TinyTechnicalTutorials
      @TinyTechnicalTutorials  7 หลายเดือนก่อน

      Hi Shellene! 👋 Sorry for the slow response! I think you've mostly got it correct, but just to make the distinction clear between a public file and a presigned URL file...
      -Public Files: When a file is made public on Amazon S3 (by opening up bucket permissions), it means that anyone with the URL can access it. This is similar to hosting files on a public website. This would be fine for things like public datasets, images for a website, or documents meant for public use. But for sensitive data, it's obviously not a good idea since (as you point out), anyone could access it.
      -Presigned URLs: This is a way to provide temporary access to a private file stored in an S3 bucket. This URL includes a signature and an expiration time, after which the URL becomes invalid. The main use case here is to securely share private files without making them publicly accessible to the entire internet. It gives you more control over who can access them and for how long.
      I hope that helps? 🤓

  • @siddheshveer
    @siddheshveer 2 ปีที่แล้ว

    Hello, Thank you for sharing. But I am a bit confused as I am able to share an uploaded PDF file using AWS S3 by simply selecting the uploaded file in my S3 bucket > clicking the OPEN button > opens in a new tab/ window and showing the uploaded PDF file. Then I simply copy the URL and share it with my friends via text/ Whats app/ iMessage/ FB messenger and everyone were able to access the file + Download it. Please let me know if this method (non-coding way) has a time limit of up to 12 hours or any other restrictions.

    • @siddheshveer
      @siddheshveer 2 ปีที่แล้ว +1

      UPDATE: The URL now shows access denied. Can you suggest a solution so that there is no time limit interval to view the shared object/ file with a client? They have access to it all the time. Thank you!

    • @TinyTechnicalTutorials
      @TinyTechnicalTutorials  2 ปีที่แล้ว

      Hi Sidd! If folks need access all the time, there are a few options. This article does a better job explaining than I will. :) aws.amazon.com/premiumsupport/knowledge-center/presigned-url-s3-bucket-expiration/. Hope it helps!

  • @Komas_Aryal
    @Komas_Aryal หลายเดือนก่อน

    What is the maximum size I can share?

  • @davewettlaufer7885
    @davewettlaufer7885 2 ปีที่แล้ว

    I’m trying to use the s3 to store all the ebooks and digital content that I have for sale and in the end share the “object” address after payment. You have shared good content and I thank you but … I’m still in the dark.

    • @TinyTechnicalTutorials
      @TinyTechnicalTutorials  ปีที่แล้ว

      Hey Dave! Apologies for SUCH a slow response! Hope you were able to sort this out. Let me know if you're still in the dark about anything.