Can a lamda Function handle event type other than JSON?

0

I am sending data to IOT Core in the string format , i created a rule to forward it to a lamda function, but can this lamda function process string events and not json? Can i get a code layout?

asked a year ago238 views
2 Answers
3
Accepted Answer

If the data is not JSON, Lambda will fail.
So, base64 encode the data to be passed to Lambda in IoT Core as follows.

SELECT encode(*,'base64') as payload FROM '/test/hoge'

In Lambda, when an event is received, the code is written so that base64 decoding is performed and the data is restored.

profile picture
EXPERT
answered a year ago
0

The Lambda function will get the event as a JSON format. It may include a string field in it that includes the data from the IoT device.

profile pictureAWS
EXPERT
Uri
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions