Giter Club home page Giter Club logo

Comments (2)

hobaen avatar hobaen commented on June 6, 2024 1

Aligned the values, turned out the issue was with the expires_in value. Any value greater than 900 causes both methods to fail, and value 900 or less and they both succeed.

https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-presigned-url.html#PresignedUrl-Expiration says that

A presigned URL remains valid for the period of time specified when the URL is generated. If you create a presigned URL with the Amazon S3 console, the expiration time can be set between 1 minute and 12 hours. If you use the AWS CLI or AWS SDKs, the expiration time can be set as high as 7 days.

If you created a presigned URL by using a temporary token, then the URL expires when the token expires, even if you created the URL with a later expiration time. For more information about how the credentials you use affect the expiration time, see [Who can create a presigned URL](https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-presigned-url.html#who-presigned-url).

yet it is looking like the observed behavior is that the presigned URL is being rejected if its expiry is longer than the temporary token used to generate it... literally not what the docs say.

But thats an AWS issue not a aiobotocore one. Thanks @jakob-keller for the help!

from aiobotocore.

jakob-keller avatar jakob-keller commented on June 6, 2024

Hello and thanks for reporting!

Your example is fairly complex and I am struggling to reproduce the issue on my end. In general, resigned URLs are supported by aiobotocore and I just confirmed this locally for the S3 service.

I noticed two deviations in your example that could be to blame:

  • you're not passing the region parameter to await signer.generate_presigned_url()
  • you're passing different values for expires_in to signer.generate_presigned_url()

Could you please try to align those and try again?

from aiobotocore.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.