https://pulumi.com logo
#general
Title
# general
s

swift-painter-31084

06/26/2019, 11:37 PM
I'm trying to attach a DynamoDB stream handler function to a
cloud.Table
, but
postsTable.dynamodbTable.onEvent( 'parseFeedPost', async ( e ) => {
won't deploy because the stream doesn't exist and throws an error based on an empty ARN. It doesn't appear that I can set that directly when creating a Cloud Table, is there a way to set it later i.e. const enableStream = () => { postsTable.dynamodbTable.streamEnabled( true ); };?
w

white-balloon-205

06/27/2019, 5:21 AM
I believe you cannot do this with
cloud.Table
- but since you are relying on AWS explicitly here anyway, you can just use
new aws.dynamodb.Table()
to get full flexibility. Note that you will then need to use
aws.sdk.dynamodb.DocumentClient
to operate on the table, but this will again give you full flexibility with DynamoDB. Here’s a good example of this: https://github.com/pulumi/examples/blob/master/aws-ts-apigateway/index.ts