You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
KMS fails to decrypt the code sent by Cognito to a CustomEmailSender lambda and issues error:
ERROR Lambda runtime invoke{requestId="496c3ff2-8bb4-42cb-b345-7ef621146677" xrayTraceId="Root=1-6799211c-1337c4e0703ffcc60eb00b57;Parent=42ed294d8792c7d9;Sampled=0;Lineage=1:e20a1e54:0"}: "Failed to decrypt: service error"
Regression Issue
Select this option if this issue appears to be a regression.
ERROR Lambda runtime invoke{requestId="496c3ff2-8bb4-42cb-b345-7ef621146677" xrayTraceId="Root=1-6799211c-1337c4e0703ffcc60eb00b57;Parent=42ed294d8792c7d9;Sampled=0;Lineage=1:e20a1e54:0"}: "Failed to decrypt: service error"
I have tried the rust lambda on both x86 and arm64 architectures and both fail.
I have then written a JavaScript version of the lambda which works perfectly well. There is no change in the SAM template besides changing:
CodeUri: ../src/cognito/email_sender_nodejs # Points to dir of bootstrap
Handler: /index.handler
Runtime: nodejs20.x
I was wondering if there was an issue in the Rust version with the AWS Lambda runtime not getting the encrypted code from Cognito properly and so hardcoded in the JavaScript version of the Lambda a code read from the logs of the Rust Lambda and the JavaScript version decrypted the code from the rust lambda with no issue.
Hi, in order to try isolating the underlying issue from lambda, is it possible to reproduce it outside lambda environment? On the other hand, if the issue is specific to lambda environment, you might want to file an issue in the aws-lambda-rust-runtime repository.
I do see the use of lambda_runtime in the attached archive, so I'd start filing an issue in the aws-lambda-rust-runtime repository. We can better assist once the underlying root cause is identified to be outside the lambda environment.
Describe the bug
KMS fails to decrypt the code sent by Cognito to a CustomEmailSender lambda and issues error:
Regression Issue
Expected Behavior
Decrypt the code token.
Current Behavior
Here is the extract from the log:
Raw code from event:
Decoded bytes length: 624
Decoded bytes:
log-events-viewer-result.csv
Reproduction Steps
Create a Lambda function and Key with SAM Template:
Use cargo lambda to create a base template and then build the release binary.
Archive.zip
Possible Solution
No response
Additional Information/Context
I have tried the rust lambda on both x86 and arm64 architectures and both fail.
I have then written a JavaScript version of the lambda which works perfectly well. There is no change in the SAM template besides changing:
I was wondering if there was an issue in the Rust version with the AWS Lambda runtime not getting the encrypted code from Cognito properly and so hardcoded in the JavaScript version of the Lambda a code read from the logs of the Rust Lambda and the JavaScript version decrypted the code from the rust lambda with no issue.
Version
Environment details (OS name and version, etc.)
Mac OS 14.6.1 (M2).
Logs
No response
The text was updated successfully, but these errors were encountered: