3👍
✅
Your link is so-called S3 presigned URL and their expiration can’t be disabled. But you can make it longer. The maximum expiration time is 7 days provided the URL is created using IAM user. If you use IAM role or instance role to make the URLs the max times are 36 and 6 hours respectively.
If these times are not satisfactory, you have three general options:
- modify your app so that it auto-refreshes expired links.
- don’t use pre-sgined URLs. Instead make the s3 object public which never expire.
- again don’t use pre-sgined URL, but instead of making your objects public, create CloudFront distribution to server your objects from the CF. This way your bucket and objects are private (not accessible directly), but through CF which can also improve load times of the files.
Source:stackexchange.com