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
질문됨 6년 전1511회 조회
3개 답변
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
답변함 6년 전
0

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

xpli
답변함 6년 전
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.

답변함 4년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠