1 Answer
- Newest
- Most votes
- Most comments
1
Hello,
How did you configure the Lambda's event source? You need to configure the lambda with an event source on the delta topic for shadow as shown here: https://docs.aws.amazon.com/greengrass/v2/developerguide/interact-with-shadows-in-components.html#react-shadow-events.
Cheers, Michael
Relevant content
- asked 5 months ago
- asked 3 years ago
- Accepted Answerasked 3 months ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 10 months ago
Thank you for pointing me in the right direction. For the record in my lambda config I've added
and in the access control section of the deployment recipe I have
The lambda handler does indeed get now called although I still have a little issue with parsing the input as I get
Failed to parse input payload: com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of
java.lang.Stringout of START_OBJECT token.
My handler is
RequestHandler<String, Unit>
(this is Kotlin, in Java it would be Void)May I ask what type the input is and please point me to some documentation for the conversion?
With an event source you do not need any access control to subscribe. Lambda will subscribe for you.
If you set your lambda's inputPayloadEncodingType to JSON instead of BINARY then the input will be a map
Thank you very much for your help. It's much appreciated. I finally got it to work by setting
inputPayloadEncodingType
tobinary
and implementingRequestHandler<InputStream, Unit>
.