Skip to content

S3 presign cli allow url generated more than 7 days (--expires-in greater than 604800) #5464

Closed

Description

@kpx-dev

Confirm by changing [ ] to [x] below to ensure that it's a bug:

Describe the bug
aws s3 presign --expires-in 604801 will allow url to be generated. But when view the url, S3 will said that url is not valid as it's expiring in more than 7 days.

Error message:
X-Amz-Expires must be less than a week (in seconds); that is, the given X-Amz-Expires must be less than 604800 seconds

SDK version number
aws --version
aws-cli/2.0.17 Python/3.7.4 Darwin/19.6.0 botocore/2.0.0dev21

Platform/OS/Hardware/Device
macOS Catalina 10.15.6

To Reproduce (observed behavior)
Run: aws s3 presign --expires-in 604801 s3://any-object

Expected behavior
When generate expires-in greater than 604800, it should reports error and not generate any url.

Logs/output
N/A

Additional context
N/A

Activity

  1. added
    investigatingThis issue is being investigated and/or work is in progress to resolve the issue.
    on Aug 12, 2020
  2. kdaily commented on Aug 12, 2020

    @kdaily
    Member

    Looking into this, thanks!

  3. self-assigned this
    on Aug 12, 2020
  4. removed
    needs-triageThis issue or PR still needs to be triaged.
    on Aug 12, 2020
  5. kdaily commented on Aug 13, 2020

    @kdaily
    Member

    Hi @kienpham2000, this maximum time limit is specific to S3 presigned URLs with the SigV4 signing method. Previously (SigV2) a presigned URL could be valid indefinitely. I'm going to mark this as a documentation issue to note the maximum value in the client documentation that is also present in the S3 documentation.

  6. added
    documentationThis is a problem with documentation.
    and removed
    investigatingThis issue is being investigated and/or work is in progress to resolve the issue.
    on Aug 13, 2020
  7. removed their assignment
    on Aug 13, 2020
  8. kpx-dev commented on Aug 13, 2020

    @kpx-dev
    Author

    Thanks @kdaily , didn't know that :).

  9. github-actions commented on Aug 13, 2021

    @github-actions
    Contributor

    Greetings! It looks like this issue hasn’t been active in longer than one year. We encourage you to check if this is still an issue in the latest release. Because it has been longer than one year since the last update on this, and in the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment to prevent automatic closure, or if the issue is already closed, please feel free to reopen it.

  10. added
    closing-soonThis issue will automatically close in 4 days unless further comments are made.
    on Aug 13, 2021
  11. added
    needs-reviewThis issue or pull request needs review from a core team member.
    feature-requestA feature should be added or improved.
    and removed
    closing-soonThis issue will automatically close in 4 days unless further comments are made.
    on Aug 13, 2021
  12. tim-finnigan commented on Nov 19, 2021

    @tim-finnigan
    Contributor

    Closing this as the PR mentioned above was merged.

  13. github-actions commented on Nov 19, 2021

    @github-actions
    Contributor

    ⚠️COMMENT VISIBILITY WARNING⚠️

    Comments on closed issues are hard for our team to see.
    If you need more assistance, please open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationThis is a problem with documentation.feature-requestA feature should be added or improved.needs-reviewThis issue or pull request needs review from a core team member.s3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions