Skip to content

Commit

Permalink
Merge pull request #205 from LouisPinsard/feat/expose-tableArn-variable
Browse files Browse the repository at this point in the history
  • Loading branch information
fredericbarthelet authored May 16, 2022
2 parents cb162a9 + 2826927 commit a26b434
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/database-dynamodb-single-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions src/constructs/aws/DatabaseDynamoDBSingleTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export class DatabaseDynamoDBSingleTable extends AwsConstruct {
variables(): Record<string, unknown> {
return {
tableName: this.table.tableName,
tableArn: this.table.tableArn,
tableStreamArn: this.table.tableStreamArn,
};
}
Expand Down

0 comments on commit a26b434

Please sign in to comment.