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
demandé il y a 6 ans1511 vues
3 réponses
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
répondu il y a 6 ans
0

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

xpli
répondu il y a 6 ans
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.

répondu il y a 4 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions