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
preguntada hace 6 años1511 visualizaciones
3 Respuestas
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
respondido hace 6 años
0

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

xpli
respondido hace 6 años
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.

respondido hace 4 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas