1 réponse
- Le plus récent
- Le plus de votes
- La plupart des commentaires
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
Contenus pertinents
- demandé il y a un an
- demandé il y a 2 mois
- demandé il y a 6 mois
- AWS OFFICIELA mis à jour il y a 4 mois
- AWS OFFICIELA mis à jour il y a 3 ans
- AWS OFFICIELA mis à jour il y a 10 mois
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>
.