aws-sdk-js-v3: S3:PutObject doesn't work when key has any non alphanumeric character and getSignerURL doesn't work
Describe the bug S3:PutObject doesn’t work when key has any non alphanumeric character such as space and getSignerURL doesn’t work.
Both return a SignatureDoesNotMatch
exception.
SDK version number
"@aws-sdk/client-s3": "^1.0.0-alpha.10",
"@aws-sdk/s3-request-presigner": "^1.0.0-alpha.10",
"@aws-sdk/util-create-request": "^1.0.0-alpha.9",
"@aws-sdk/util-format-url": "^1.0.0-alpha.4",
Is the issue in the browser/Node.js? Browser
Details of the browser/Node.js version Browsers: Chrome: 79.0.3945.117 Safari: 13.0.4
To Reproduce (observed behavior)
- Clone and run the repo app https://github.com/Amplifiyer/aws-sdk-js-tests/tree/s3client
- The first three results are from V2 and last three are from V3
- When key of file being uploaded has spaces, V3 throws exception
SignatureDoesNotMatch
while V2 doesn’t - Copy paste the signed URL generated by V2 and V3 and open in new tab and see that V2 file is downloaded while V3 fails.
Expected behavior No errors…
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (14 by maintainers)
@Amplifiyer Sorry for the regression. https://github.com/awslabs/smithy-typescript/pull/123 is ready to fix the problem.