Direkt zum Inhalt

Lambda not received "client-context"

0

I read this:https://docs.aws.amazon.com/lambda/latest/dg/python-context-object.html.
I think code is can receive "conext.client_context.custom" children. by this invoke.

aws lambda invoke --function-name "targetlambda" --invocation-type RequestResponse --client-context "eyJjb3VzdG9tIjp7ImZpenoiOiJidXp6In19" "output"

but.can't received this.
I try changing Runtime for Lambda to "Node.js 10.x". Result is success.Node.js Lambda can received.

client-context generated by javascript oneliner.

window.btoa(JSON.stringify({"coustom":{"fizz":"buzz"}}))
gefragt vor 6 Jahren510 Aufrufe
2 Antworten
0

"coustom" is typo. I fix to "custom"

beantwortet vor 6 Jahren
0

Hi TAC,

Glad you fixed it! Do you mind sharing a bit what is your purpose of using Client Context here? This is for my learning only. You can DM me.

Thanks
Jia

beantwortet vor 6 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.