* Parses the dev mode function identifier into an object containing its constituent components. * * The development mode function identifier is expected to be a string formatted as follows: * "sls/regionName/serviceName/stageName/functionName". This method splits the identifier by '/' *
(topicId)
| 830 | * and function name from the development mode function identifier. |
| 831 | */ |
| 832 | parseTopicId(topicId) { |
| 833 | const [_, regionName, serviceName, stageName, functionName] = |
| 834 | topicId.split('/') |
| 835 | |
| 836 | return { |
| 837 | regionName, |
| 838 | serviceName, |
| 839 | stageName, |
| 840 | functionName, |
| 841 | } |
| 842 | } |
| 843 | |
| 844 | /** |
| 845 | * Connects to the IoT endpoint over websockets and listens for lambda events. |