#✅ - EventBridge Pipe with DynamoDB table stream as source

1 messages · Page 1 of 1 (latest)

torn urchin
#

In a Gen 2 app, I'm trying to setup an EventBridge Pipe to use an Amplify created DynamoDB table stream as the source of the pipe.

The table name is ContactUsFormData which is created via the normal Gen 2 process:

// amplify/data/resource.ts
const schema = a.schema({
  ContactUsFormData: a
    .model({
      content: a.json(),
    })
    .authorization([a.allow.public().to(['create'])]),
});```

Table streams are enabled by default when created by Gen 2, but I'm setting the stream as follows:
```typescript
// amplify/backend.ts
const contactUsFormDataTable = backend.data.resources.amplifyDynamoDbTables.ContactUsFormData;
contactUsFormDataTable.streamSpecification = {
  streamViewType: StreamViewType.NEW_IMAGE,
};```
To accomplish what I'm trying to do via standard CDK, I'm referencing this pattern:
https://serverlessland.com/patterns/dynamodb-eventbridge-transformer

Specifically, it uses the `<TableName>.tableStreamArn` to retrieve and pass the arn into the pipe's `Source:`

In Gen2, I cannot figure out how to get the `tableStreamArn` value. It's not exposed in the `amplifyDynamoDbTables` wrapper:

```typescript
// amplify/backend.ts
backend.data.resources.amplifyDynamoDbTables.ContactUsFormData.```
Does anyone know of a way to get the tableStreamArn, or should I open a Github issue for a deeper dive?
dull coral
#

Reached out the Engineering team to inquire about obtaining the tableStreamArn and will provide you with an update shortly.

dull coral
#

The team is currently in the process of exposing this variable, and it will be incorporated into the GA release.

torn urchin
#

Excellent news. Thanks!

toxic iceBOT
#

✅ - EventBridge Pipe with DynamoDB table stream as source

#

Answer selected!
The team is currently in the process of exposing this variable, and it will be incorporated into the GA release.
Kudos to @dull coral!
#1207858385156841492 message