diff --git a/docs/database-dynamodb-single-table.md b/docs/database-dynamodb-single-table.md index 4bb2ba07..17b392c6 100644 --- a/docs/database-dynamodb-single-table.md +++ b/docs/database-dynamodb-single-table.md @@ -39,6 +39,7 @@ The `database/dynamodb-single-table` construct creates and configures the table All database constructs expose the following variables: - `tableName`: the name of the deployed DynamoDB table +- `tableArn`: the arn of the deployed DynamoDB table - `tableStreamArn`: the ARN of the stream of the deployed DynamoDB table This can be used to inject the tableName to a Lambda functions using the SDK to read or write data from the table, for example: diff --git a/src/constructs/aws/DatabaseDynamoDBSingleTable.ts b/src/constructs/aws/DatabaseDynamoDBSingleTable.ts index 91e8b00e..efa030ce 100644 --- a/src/constructs/aws/DatabaseDynamoDBSingleTable.ts +++ b/src/constructs/aws/DatabaseDynamoDBSingleTable.ts @@ -99,6 +99,7 @@ export class DatabaseDynamoDBSingleTable extends AwsConstruct { variables(): Record { return { tableName: this.table.tableName, + tableArn: this.table.tableArn, tableStreamArn: this.table.tableStreamArn, }; }