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?

gefragt vor 2 Jahren495 Aufrufe
1 Antwort
2
Akzeptierte Antwort

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
beantwortet vor 2 Jahren
profile pictureAWS
EXPERTE
überprüft vor 2 Jahren
  • Thank you, that helps. I did not have my leading zero. I had .55 and it requires it to be 0.55.

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.

Richtlinien für die Beantwortung von Fragen