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
feita há 6 anos1511 visualizações
3 Respostas
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 há 6 anos
0

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

xpli
respondido há 6 anos
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 há 4 anos

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas