aws / aws-sdk-js-v3

Modularized AWS SDK for JavaScript.
Apache License 2.0
3.04k stars 571 forks source link

Rename expiration param which accepts Date|string|number to expiresIn which accepts number in seconds #1035

Closed trivikr closed 4 years ago

trivikr commented 4 years ago

Is your feature request related to a problem? Please describe.

Describe the solution you'd like Allow SDK customer just to pass number in seconds after which the presigned URL should expire.

In both the cases, customer doesn't have to compute expiration Date|string|number

Describe alternatives you've considered Compute expiration Date|string|number, and pass while calling presign API

Update: param name will be changed to expiresIn as per findings in https://github.com/aws/aws-sdk-js-v3/issues/1035#issuecomment-602816992

trivikr commented 4 years ago

In v2, we accept expires param - number in seconds after which presigned URL should expire

trivikr commented 4 years ago

Some history in v3:

trivikr commented 4 years ago

The S3 operations except both Date/time for Expires parameter though

SDKs that accept expires in seconds for presign API:

SDKs which accept dates for presigned URLs:

Renaming the param to expiresIn just like CLI/python/Ruby so that it's self-explanatory

lock[bot] commented 4 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.