Skip to content

Improve/Fix documentation to correctly set "table name" for the Idempotency DynamoDB table for Powertool for v2 #1786

@Vadym79

Description

@Vadym79

What were you searching in the docs?

In all examples for the v2 version (in preview) provided here Idempotency is configured like this:

Idempotency.config().withPersistenceStore(DynamoDBPersistenceStore.builder()
.withTableName(System.getenv("TABLE_NAME")).build()).configure();

where DynamoDB table name is retrieved from the environment variable with the name TABLE_NAME.

On the same documentation page, IaC example with AWS SAM to set this table name is defined in the environment variable IDEMPOTENCY_TABLE Lambda Function like this

IdempotencyFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: Function
Handler: helloworld.App::handleRequest
Policies:
- DynamoDBCrudPolicy:
TableName: !Ref IdempotencyTable
Environment:
Variables:
IDEMPOTENCY_TABLE: !Ref IdempotencyTable

Is this related to an existing documentation section?

https://docs.powertools.aws.dev/lambda/java/preview/utilities/idempotency

How can we improve?

use environment variable with the name TABLE_NAME instead like this:
Environment:
Variables:
TABLE_NAME: !Ref IdempotencyTable

Got a suggestion in mind?

use environment variable with the name TABLE_NAME instead like this:
Environment:
Variables:
TABLE_NAME: !Ref IdempotencyTable

Acknowledgment

  • I understand the final update might be different from my proposed suggestion, or refused.

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentation

Type

No type

Projects

Status

Shipped

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions