DynamoLambdaSubscriber
Reference doc for the `sst.aws.DynamoLambdaSubscriber` component.
The DynamoLambdaSubscriber
component is internally used by the Dynamo
component to
add stream subscriptions to Amazon DynamoDB.
You’ll find this component returned by the subscribe
method of the Dynamo
component.
Constructor
Parameters
-
name
string
-
args
Args
-
opts?
ComponentResourceOptions
Properties
nodes
Type Object
The underlying resources this component creates.
nodes.eventSourceMapping
Type EventSourceMapping
The Lambda event source mapping.
nodes.function
Type Output
<
Function
>
The Lambda function that’ll be notified.
Args
dynamo
Type Input
<
Object
>
The DynamoDB table to use.
dynamo.streamArn
Type Input
<
string
>
The ARN of the stream.
filters?
Type Input
<
Input
<
Record
<
string
, any
>
>
[]
>
Filter the records processed by the subscriber
function.
You can pass in up to 5 different filter policies. These will logically ORed together. Meaning that if any single policy matches, the record will be processed.
For example, if your DynamoDB table’s stream contains the follow record.
To process only those records where the CustomerName
is AnyCompany Industries
.
subscriber
Type Input
<
string
|
FunctionArgs
>
The subscriber function.
transform?
Type Object
Transform how this subscription creates its underlying resources.
transform.eventSourceMapping?
Type EventSourceMappingArgs
|
(
args
:
EventSourceMappingArgs
,
opts
:
ComponentResourceOptions
,
name
:
string
)
=>
void
Transform the Lambda Event Source Mapping resource.