How to pass float numbers to Lambda event object

0

I have a Lambda function running Python 3.8 and am trying to run a test event using the JSON event object. When I try to put a float in the JSON, it tells me that my JSON is not formatted properly. How do you pass floats or are only strings allowed?

已提問 2 年前檢視次數 495 次
1 個回答
2
已接受的答案

This is a sample event with a float https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-concepts.html#gettingstarted-concepts-event

Are you able to share what your event looks like?

Kishan
已回答 2 年前
profile pictureAWS
專家
已審閱 2 年前
  • Thank you, that helps. I did not have my leading zero. I had .55 and it requires it to be 0.55.

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南