Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

326
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda