Skip to content

docs(idempotency): add default table configuration for those not using IaC #391

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions docs/utilities/idempotency.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,26 @@ times with the same parameters**. This makes idempotent operations safe to retry

### Required resources

Before getting started, you need to create a persistent storage layer where the idempotency utility can store its
state - your lambda functions will need read and write access to it.
Before getting started, you need to create a persistent storage layer where the idempotency utility can store its state - your lambda functions will need read and write access to it.

As of now, Amazon DynamoDB is the only supported persistent storage layer, so you'll need to create a table first.

> Example using AWS Serverless Application Model (SAM)
**Default table configuration**

If you're not [changing the default configuration for the DynamoDB persistence layer](#dynamodbpersistencelayer), this is the expected default configuration:

Configuration | Value | Notes
------------------------------------------------- | ------------------------------------------------- | -------------------------------------------------
Partition key | `id` |
TTL attribute name | `expiration` | This can only be configured after your table is created if you're using AWS Console

=== "template.yml"

!!! tip "You can share a single state table for all functions"
> New in 1.12.0
!!! tip "You can share a single state table for all functions"
You can reuse the same DynamoDB table to store idempotency state. We add your `function_name` in addition to the idempotency key as a hash key.

You can reuse the same DynamoDB table to store idempotency state. We add your function_name in addition to the idempotency key as a hash key.
> Example using AWS Serverless Application Model (SAM)

=== "template.yml"

```yaml hl_lines="5-13 21-23"
Resources:
Expand Down