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

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

КОМЕНТАРІ • 48

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

    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. 🥰🙏🤓

  • @kwabford
    @kwabford Місяць тому

    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😅

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

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

    Thanks for showing both ways though UI and programmatically.

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

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

  • @prabhupalanisamy8590
    @prabhupalanisamy8590 2 роки тому +1

    awesome tutorial, thanks for sharing !

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

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

    Excellent. Didn't know you could do this.

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

      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?

  • @Komas_Aryal
    @Komas_Aryal 6 днів тому

    What is the maximum size I can share?

  • @shellenecross3703
    @shellenecross3703 6 місяців тому

    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  6 місяців тому

      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? 🤓

  • @TORMENTUMM
    @TORMENTUMM 4 місяці тому +1

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

    • @TinyTechnicalTutorials
      @TinyTechnicalTutorials  3 місяці тому

      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.

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

    Thanks a lot for the video.

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

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

    Thank you.

  • @chrisdietrich1533
    @chrisdietrich1533 3 місяці тому

    Great content!

    • @TinyTechnicalTutorials
      @TinyTechnicalTutorials  3 місяці тому

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

  • @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! 🤓🙏🌟

  • @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! :)

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