I am currently fiddeling around with AWS GreenGrass and I have gone through most of the basic examples. Now the problem I have understanding how I would perform different actions in my lambda function depending on the MQTT topic it was triggered by. I could not really find a documentation on how to differentiate which topic triggered the function handler in my python script. The thing I am trying to build is a small controller for my sonos system which uses the following very basic topics:
sonos/play
Which just tries playing a certain song I hardcoded.
sonos/pause
Which should be pausing the system.
I know I could create several lambdas for each command but that seems pretty finicky. Can someone please explain how one would tackle this sort of issue?