Amplify.Storage.getUrl Security Token expiry date

0

Is there any expiry date of the security token present in the URL which I got through:

Amplify.Storage.getUrl(
    "ExampleKey",
    result -> Log.i("MyAmplifyApp", "Successfully generated: " + result.getUrl()),
    error -> Log.e("MyAmplifyApp", "URL generation failure", error)
);

I'm asking this because I want to hardcode the URL in my post model of graphql schema

Second question: is it good to hardcode the URL? I'm worried because recently the s3 object URL format got deprecated.

Update (September 23, 2020) – Over the last year, we’ve heard feedback from many customers who have asked us to extend the deprecation date. Based on this feedback we have decided to delay the deprecation of path-style URLs to ensure that customers have the time that they need to transition to virtual hosted-style URLs.

Like this one day, virtual hosted-style URLs might be deprecated

1개 답변
1
수락된 답변

Hi there, You can use expires option in the Storage.get[1] call but the maximum time is seven days[2]. So you might not want to persist that. Typically we recommend to generate the presigned URLs only when you want to download the object.

AWS
Clay_B
답변함 일 년 전
  • Then how to access urls? should I make my bucket completely public?

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

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

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

관련 콘텐츠