Token expires in presigned url

0

We have a presigned url to allow our customers to download our S3 objects.

The URL params are as below,
AWSAccessKeyId=xxxxxx&
Expires=1531884932& //Wednesday, July 18, 2018 3:35:32 AM
Signature=xxxxxx&
x-amz-security-token=xxxxxx

When I clicked the URL today (July 11, 2018), I got this error,
<Code>ExpiredToken</Code>
<Message>The provided token has expired.</Message>

Is there a way to set expires limit of the token?
thanks!

xpli
asked 6 years ago1459 views
3 Answers
0

Short answer: no. Signed URLs expire at the earlier of the explicit expiration or the expiration or invalidation of the credentials that signed them.

Longer answer: Stil technicallyl no, but you may be able to use a different strategy in order to obtain a token with a longer life than what you have, now. Where are you getting the credentials? Are they from an EC2 instance role, or are you getting them some other way?

sqlb0t
answered 6 years ago
0

great thanks.
It seems the token was from our AMI role. We probably need create a user to sign it.

xpli
answered 6 years ago
0

Hello, I have the same problem and discovered now that the token will expire, no matter what I set for a time. But how do I know when the token will expire? Is there some way to find out or set it explicitly?
I found it seems to be something between 2 and 5h but how can I know for sure?

thanks.

answered 4 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions