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 the 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.permission

Type Permission

The Lambda permission.

nodes.rule

Type TopicRule

The IoT Topic rule.

nodes.function

Type Output<Function>

The Lambda function that’ll be notified.

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, opts: ComponentResourceOptions, name: string) => void

Transform the IoT Topic rule resource.