1 Risposta
- Più recenti
- Maggior numero di voti
- Maggior numero di commenti
0
Currently IPC is the only available method for communicating with the local shadow manager. However, the next release of Shadow Manager will support a PubSub API (code) which will enable you to access shadows via MQTT (as long as you configure the appropriate routes in the MQTT Bridge component).
There are downsides to your approach, as you'll need to model your lambda as a client device and give it a private key / cert. But it should serve as a stop gap solution.
con risposta 2 anni fa
Contenuto pertinente
- AWS UFFICIALEAggiornata 4 mesi fa
- AWS UFFICIALEAggiornata 5 mesi fa
Awesome! I tried creating a device and using the certs and the aws-iot-device-sdk-v2 js mqtt client from a lambda but I get an AWS_IO_TLS_ERROR_NEGOTIATION_FAILURE TLS (SSL) Negotiation failed. Is this expected until the updates you mention? I have not been able to get a lambda function as a device to connect to the local MQTT broker. Thanks for all your responses.
You won't be able to get this working end-to-end until the next Shadow Manager release. However, you should be able to get the MQTT connection to work.
We have a detailed tutorial on how to set up client devices here: https://docs.aws.amazon.com/greengrass/v2/developerguide/client-devices-tutorial.html
TLS failures are usually caused by your client using an incorrect CA, or Greengrass not having sufficient permissions in the certificate policy to verify the client certificate. Both are covered in the above tutorial.
You can check
greengrass.log
for hints. Anything along the lines of "bad_ca" points to an issue with the client. Otherwise it's likely a Greengrass configuration issue and the logs should point you in the right direction.