ClientContext json exception when we have json input as payload
See original GitHub issueI have a json payload of api gateway request for one of my java functions this is a seperate file http-event.json in my serverless stack
warmup:
enabled: false
cleanFolder: false
memorySize: 256
name: ${self:custom.stageOption}-warmup
timeout: 20
prewarm: true
payload: ${file(http-event.json)}
function produces payload with json string, but when invoking the function with client context below param is not working as it produces a JSON and when the target function gets invoked with the context it tries to json parse the string and getting an exception in target lambda
const params = {
ClientContext: Buffer.from(`{"custom":${func.config.payload}}`).toString('base64'),
FunctionName: func.name,
InvocationType: "RequestResponse",
LogType: "None",
Qualifier: process.env.SERVERLESS_ALIAS || "$LATEST",
Payload: func.config.payload
};
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
ClientContext json exception when we have json input as ...
I have a json payload of api gateway request for one of my java functions this is a seperate file http-event.json in my...
Read more >ClientContext json exception when we have json input as payload -
I have a json payload of api gateway request for one of my java functions this is a seperate file http-event.json in my...
Read more >Common JSON payload for cases and case types - IBM
The IBM® Case Manager REST protocol defines a JSON payload that is used in the methods that get or return information about a...
Read more >lambda invoke payload error - Stack Overflow
The ClientContext JSON must be base64-encoded and has a maximum size of 3583 bytes. input := &lambda.InvokeInput{ // ClientContext: aws.
Read more >Invoke - AWS Lambda - AWS Documentation
The request payload exceeded the Invoke request body JSON input quota. For more information, see Lambda quotas. HTTP Status Code: 413. ResourceConflictException.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@juanjoDiaz please suggest an approach by which we can use this plugin like having a flag to remove the clientContext or removing the clientContext completly? if so I can look into a PR ?
so in that repo found this
custom is a map and does not support complex objects, not sure if its a requirement i couldn’t find any docs on this