Skip to content

Conversation

@yenfryherrerafeliz
Copy link
Contributor

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.

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.
@yenfryherrerafeliz yenfryherrerafeliz changed the title Fix issue 2328 fix: Signing and presigning s3-object-lambda requests fail Jun 7, 2022
Copy link
Member

@stobrien89 stobrien89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I like the refactor and addition of the new method. I made one comment about adding a test case and would like us to have a separate test in the S3ClientTest file for presigning object-lambda requests.

ValeroYiqqi added a commit to ValeroYiqqi/aws-sdk-php that referenced this pull request Jun 29, 2022
Add a test case in Signature/SignatureProviderTest that validates if when the service is s3-object-lambda the right signature provider is resolved, and add another test case in S3/S3ClientTest that evaluate creating presigned url for s3-object-lambda service.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants