When I try to access an S3 object, I get the error "Request has expired." Why?

Last updated: 2022-11-07

I'm trying to access an object in Amazon Simple Storage Service (Amazon S3), but I'm getting the error message "Request has expired." How can I fix this?

Resolution

Amazon S3 returns this error message when you try to access a presigned URL past the specified expiration date of the URL.

For example, in the following response, the expiration date of the presigned URL is October 28, 2022. You'll get an error message if you try to access this URL after that date.

<Error>
    <Code>AccessDenied</Code>
    <Message>Request has expired</Message>
    <Expires>2022-10-28T07:13:14Z</Expires>
    <ServerTime>2022-10-28T20:03:02Z</ServerTime>
    <RequestId>87E1D2CFAAA7F9A6</RequestId>
    <HostId>
    A9BEluTV2hk3ltdFkixvQFa/yUBfUSgDjptwphKze+jXR6tYbpHCx8Z7y6WTfxu3rS4cGk5/WTQ=
    </HostId>
</Error>

To resolve this issue, the owner of the object must generate a new presigned URL with a new expiration date. If you own that object, see presign or Sharing objects using presigned URLs for more information.

Note: The presigned URL might expire before the configured expiration date. This is because the AWS Identity and Access Management (IAM) entity STS token has expired before the presigned URL expiration date. For more information about STS session duration, see Comparing the AWS STS API operations.


Did this article help?


Do you need billing or technical support?