MCPcopy Index your code
hub / github.com/serverless/serverless / parseTopicId

Method parseTopicId

packages/serverless/lib/plugins/aws/dev/index.js:832–842  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

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.

Callers 1

connectMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected