Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

325
Views
How do I get an object from S3 using it's pre-signed url in boto3?

I have generated a pre-signed url for an object in one of my buckets using boto3:

s3.generate_presigned_url('get_object', Params = {'Bucket': 'https://s3.amazonaws.com/<>', 'Key': '<>.json'}, ExpiresIn = 100)

Now, how do I get_object it in boto3? The boto3's get_object reference doesn't specify any argument for a pre-signed url.

So, how do I get that object from S3 using it's pre-signed url in boto3?

about 4 years ago · Santiago Trujillo
2 answers
Answer question

0

If you have a pre-signed URL, you don't need boto -- you can download the object using any HTTP user agent library.

Conversely, if you have boto and the credentials, you don't need a pre-signed URL.

Pre-signed URLs are intended for allowing someone with credentials to enable someone else without credentials to access a resource, without exposing the credentials to them.

A pre-signed URL includes the access-key-id and possibly a session-token, but not the access-key-secret, and are computationally-infeasible to reverse-engineer... and in this sense, they do not expose the credentials in a way that allows the entity possessing the pre-signed URL to use the associated credentials for any other purpose.

about 4 years ago · Santiago Trujillo Report

0

you can use this code to get the result.

import boto3
s3_client = boto3.client('s3')
resp = s3_client.generate_presigned_url('get_object', Params = {'Bucket': 'your-s3-bucket', 'Key': 'filepath/inside-bucket/filename.json'}, ExpiresIn = 100)
print(resp)

if any doubt please let me know.

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!