Skip to content

RealtimeLambdaSubscriber

Reference doc for the `sst.aws.RealtimeLambdaSubscriber` component.

The RealtimeLambdaSubscriber component is internally used by the Realtime component to add subscriptions to AWS IoT endpoint.

You’ll find this component returned by the subscribe method of the Realtime component.


Constructor

new RealtimeLambdaSubscriber(name, args, opts?)

Parameters

Properties

nodes

Type Object

The underlying resources this component creates.

nodes.function

Type Output<Function>

The Lambda function that’ll be notified.

nodes.permission

Type Permission

The Lambda permission.

nodes.rule

Type TopicRule

The IoT topic rule.

Args

filter

Type Input<string>

Filter the topics that’ll be processed by the subscriber.

Subscribe to a specific topic.

{
filter: `${$app.name}/${$app.stage}/chat/room1`
}

Subscribe to all topics under a prefix.

{
filter: `${$app.name}/${$app.stage}/chat/#`
}

iot

Type Input<Object>

The IoT websocket server to use.

iot.name

Type Input<string>

The name of the Realtime component.

subscriber

Type Input<string | FunctionArgs>

The subscriber function.

transform?

Type Object

Transform how this subscription creates its underlying resources.

transform.topicRule?

Type TopicRuleArgs | (args: TopicRuleArgs => void)

Transform the IoT topic rule resource.