fix: Signing and presigning s3-object-lambda requests fail #2459
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #2328
Description of changes:
When signing and presigning s3-object-lambda requests we get an invalid signature error, due to that the signature provider was not resolving the right signature class implementation, which handle s3-object-lambda requests; The name for that class is S3SignatureV4 and the reason why was not resolved is that the s3-object-lambda service name was not in the s3-v4-signed-services-list "$s3v4SignedServices", so that to fix this behavior I added the desired services in that array. This fix also add a special handling in the presigning proccess that validates if the service is s3-object-lambda, then that is the service used for the signature, otherwise the default signing service is used.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.