-
Notifications
You must be signed in to change notification settings - Fork 610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Messages with "payload" property broken in spring-cloud-function-adapter-aws #1154
Comments
Since this message does not correspond to any valid format we really don't know what
We monitor that? |
The lambda is triggered by a step function that builds a json object as input for the lambda.
Would log: |
We are getting a similar error after upgrading to Spring Cloud Function 4.1.1. (Or actually same as #1135, but after upgrading to 4.1.2 I expect the same as above). Same scenario as @M0rious: our Lambda input request has a json field called "payload" that is not expecting any special handling on an AWS Lambda adapter level. The special handling of the "payload" field seems to have been introduced by the following commit, although I'm not sure how the change is related to #1086 as mentioned in the commit message: @olegz What was the original reason for adding special handling of requests having a "payload" field? Ideally there would be some way to opt in or opt out from this behavior to avoid breaking changes to existing AWS Lambda functions. |
Don't get me wrong, we can fix it, just trying to understand your expectation and what I read is that given that Spring |
Yes - if we send a JSON-Message to the Lambda we expect the whole message to be in the payload field - regardless of the fields contained in the message we send. We use Message as Input for the Lambda so we can call getHeaders to use e.g. the 'aws-context' header for logging. |
Describe the bug
We are using SpringCloudFunctions on AWS for Lambdas.
The messages send to the Lambdas contain a property "payload".
This worked fine up until spring-cloud-function-adapter-aws@4.0.6.
With the current version 4.1.2 the message does not reach the lambda implementation correctly.
Only the "payload" property gets passed to the function-code
Sample
Deploy a SCF-Lambda to AWS or Localstack and log the input:
Sample-Input:
Output:
"Debug: {\"c\":\"d\"},.."
The text was updated successfully, but these errors were encountered: