You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Vadym79
changed the title
Improve/Fix documentation to correctly set "table name" for the Idempotency DynamoDB table for v2
Improve/Fix documentation to correctly set "table name" for the Idempotency DynamoDB table for Powertool for v2
Mar 4, 2025
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
The text was updated successfully, but these errors were encountered: