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
Copy file name to clipboardExpand all lines: docs/utilities/idempotency.md
+30-27
Original file line number
Diff line number
Diff line change
@@ -3,8 +3,11 @@ title: Idempotency
3
3
description: Utility
4
4
---
5
5
6
-
This utility provides a simple solution to convert your Lambda functions into idempotent operations which are safe to
7
-
retry.
6
+
!!! attention
7
+
**This utility is currently in beta**. Please open an [issue in GitHub](https://github.com/awslabs/aws-lambda-powertools-python/issues/new/choose) for any bugs or feature requests.
8
+
9
+
The idempotency utility provides a simple solution to convert your Lambda functions into idempotent operations which
10
+
are safe to retry.
8
11
9
12
## Terminology
10
13
@@ -31,31 +34,31 @@ storage layer, so you'll need to create a table first.
31
34
> Example using AWS Serverless Application Model (SAM)
32
35
33
36
=== "template.yml"
34
-
```yaml
35
-
Resources:
36
-
HelloWorldFunction:
37
-
Type: AWS::Serverless::Function
38
-
Properties:
39
-
Runtime: python3.8
40
-
...
41
-
Policies:
42
-
- DynamoDBCrudPolicy:
43
-
TableName: !Ref IdempotencyTable
44
-
IdempotencyTable:
45
-
Type: AWS::DynamoDB::Table
46
-
Properties:
47
-
AttributeDefinitions:
48
-
- AttributeName: id
49
-
AttributeType: S
50
-
BillingMode: PAY_PER_REQUEST
51
-
KeySchema:
52
-
- AttributeName: id
53
-
KeyType: HASH
54
-
TableName: "IdempotencyTable"
55
-
TimeToLiveSpecification:
56
-
AttributeName: expiration
57
-
Enabled: true
58
-
```
37
+
```yaml
38
+
Resources:
39
+
HelloWorldFunction:
40
+
Type: AWS::Serverless::Function
41
+
Properties:
42
+
Runtime: python3.8
43
+
...
44
+
Policies:
45
+
- DynamoDBCrudPolicy:
46
+
TableName: !Ref IdempotencyTable
47
+
IdempotencyTable:
48
+
Type: AWS::DynamoDB::Table
49
+
Properties:
50
+
AttributeDefinitions:
51
+
- AttributeName: id
52
+
AttributeType: S
53
+
BillingMode: PAY_PER_REQUEST
54
+
KeySchema:
55
+
- AttributeName: id
56
+
KeyType: HASH
57
+
TableName: "IdempotencyTable"
58
+
TimeToLiveSpecification:
59
+
AttributeName: expiration
60
+
Enabled: true
61
+
```
59
62
60
63
!!! warning
61
64
When using this utility with DynamoDB, your lambda responses must always be smaller than 400kb. Larger items cannot
0 commit comments