diff --git a/.github/ISSUE_TEMPLATE/share_your_work.yml b/.github/ISSUE_TEMPLATE/share_your_work.yml
new file mode 100644
index 00000000000..974aec87b06
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/share_your_work.yml
@@ -0,0 +1,56 @@
+name: I Made This (showcase your work)
+description: Share what you did with Powertools 💞💞. Blog post, workshops, presentation, sample apps, etc.
+title: "[I Made This]:
"
+labels: ["community-content"]
+body:
+ - type: markdown
+ attributes:
+ value: Thank you for helping spread the word out on Powertools, truly!
+ - type: input
+ id: content
+ attributes:
+ label: Link to your material
+ description: |
+ Please share the original link to your material.
+
+ *Note: Short links will be expanded when added to Powertools documentation*
+ validations:
+ required: true
+ - type: textarea
+ id: description
+ attributes:
+ label: Description
+ description: Describe in one paragraph what's in it for them (readers)
+ validations:
+ required: true
+ - type: input
+ id: author
+ attributes:
+ label: Preferred contact
+ description: What's your preferred contact? We'll list it next to this content
+ validations:
+ required: true
+ - type: input
+ id: author-social
+ attributes:
+ label: (Optional) Social Network
+ description: If different from preferred contact, what's your preferred contact for social interactions?
+ validations:
+ required: false
+ - type: textarea
+ id: notes
+ attributes:
+ label: (Optional) Additional notes
+ description: |
+ Any notes you might want to share with us related to this material.
+
+ *Note: These notes are explicitly to Powertools maintainers. It will not be added to the community resources page.*
+ validations:
+ required: false
+ - type: checkboxes
+ id: acknowledgment
+ attributes:
+ label: Acknowledgment
+ options:
+ - label: I understand this content may be removed from Powertools documentation if it doesn't conform with the [Code of Conduct](https://aws.github.io/code-of-conduct)
+ required: true
diff --git a/.github/ISSUE_TEMPLATE/support_powertools.yml b/.github/ISSUE_TEMPLATE/support_powertools.yml
new file mode 100644
index 00000000000..e03b1627044
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/support_powertools.yml
@@ -0,0 +1,64 @@
+name: Support Lambda Powertools (become a reference)
+description: Add your organization's name or logo to the Lambda Powertools documentation
+title: "[Support Lambda Powertools]: "
+labels: ["customer-reference"]
+body:
+ - type: markdown
+ attributes:
+ value: |
+ Thank you for becoming a reference customer. Your support means a lot to us. It also helps new customers to know who's using it.
+
+ If you would like us to also display your organization's logo, please share a link in the `Company logo` field.
+ - type: input
+ id: organization
+ attributes:
+ label: Organization Name
+ description: Please share the name of your organization
+ placeholder: ACME
+ validations:
+ required: true
+ - type: input
+ id: name
+ attributes:
+ label: Your Name
+ description: Please share your name
+ validations:
+ required: true
+ - type: input
+ id: job
+ attributes:
+ label: Your current position
+ description: Please share your current position at your company
+ validations:
+ required: true
+ - type: input
+ id: logo
+ attributes:
+ label: (Optional) Company logo
+ description: Company logo you want us to display. You also allow us to resize for optimal placement in the documentation.
+ validations:
+ required: false
+ - type: textarea
+ id: use_case
+ attributes:
+ label: (Optional) Use case
+ description: How are you using Lambda Powertools today? *features, etc.*
+ validations:
+ required: false
+ - type: checkboxes
+ id: other_languages
+ attributes:
+ label: Also using other Lambda Powertools languages?
+ options:
+ - label: Java
+ required: false
+ - label: TypeScript
+ required: false
+ - label: .NET
+ required: false
+ - type: markdown
+ attributes:
+ value: |
+ *By raising a Support Lambda Powertools issue, you are granting AWS permission to use your company's name (and/or logo) for the limited purpose described here. You are also confirming that you have authority to grant such permission.*
+
+ *You can opt-out at any time by commenting or reopening this issue.*
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ef23f9d6c8f..005fcb1036b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,7 +6,29 @@
## Maintenance
+* **layer:** bump to 1.31.1 (v39)
+
+
+
+## [v1.31.1] - 2022-10-14
+## Bug Fixes
+
+* **parser:** loose validation on SNS fields to support FIFO ([#1606](https://github.com/awslabs/aws-lambda-powertools-python/issues/1606))
+
+## Documentation
+
+* **governance:** allow community to suggest feature content ([#1593](https://github.com/awslabs/aws-lambda-powertools-python/issues/1593))
+* **governance:** new form to allow customers self-nominate as public reference ([#1589](https://github.com/awslabs/aws-lambda-powertools-python/issues/1589))
+* **homepage:** include .NET powertools
+* **idempotency:** "persisntence" typo ([#1596](https://github.com/awslabs/aws-lambda-powertools-python/issues/1596))
+* **logger:** fix typo. ([#1587](https://github.com/awslabs/aws-lambda-powertools-python/issues/1587))
+
+## Maintenance
+
+* add dummy v2 sar deploy job
* bump layer version to 38
+* **deps-dev:** bump mypy-boto3-ssm from 1.24.81 to 1.24.90 ([#1594](https://github.com/awslabs/aws-lambda-powertools-python/issues/1594))
+* **deps-dev:** bump flake8-builtins from 1.5.3 to 2.0.0 ([#1582](https://github.com/awslabs/aws-lambda-powertools-python/issues/1582))
@@ -2408,7 +2430,8 @@
* Merge pull request [#5](https://github.com/awslabs/aws-lambda-powertools-python/issues/5) from jfuss/feat/python38
-[Unreleased]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.31.0...HEAD
+[Unreleased]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.31.1...HEAD
+[v1.31.1]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.31.0...v1.31.1
[v1.31.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.30.0...v1.31.0
[v1.30.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.29.2...v1.30.0
[v1.29.2]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.29.1...v1.29.2
diff --git a/MAINTAINERS.md b/MAINTAINERS.md
index fb94090f762..4e78aac2eb4 100644
--- a/MAINTAINERS.md
+++ b/MAINTAINERS.md
@@ -94,6 +94,8 @@ These are the most common labels used by maintainers to triage issues, pull requ
| github-actions | Changes in GitHub workflows | PR automation |
| github-templates | Changes in GitHub issue/PR templates | PR automation |
| internal | Changes in governance, tech debt and chores (linting setup, baseline, etc.) | PR automation |
+| customer-reference | Authorization to use company name in our documentation | Public Relations |
+| community-content | Suggested content to feature in our documentation | Public Relations |
## Maintainer Responsibilities
diff --git a/README.md b/README.md
index c1845f43ce7..fb5fc480f37 100644
--- a/README.md
+++ b/README.md
@@ -3,10 +3,11 @@
[](https://github.com/awslabs/aws-lambda-powertools-python/actions/workflows/python_build.yml)
[](https://app.codecov.io/gh/awslabs/aws-lambda-powertools-python)
-   
-[](https://discord.gg/B8zZKbbyET)
+   [](https://discord.gg/B8zZKbbyET)
-A suite of Python utilities for AWS Lambda functions to ease adopting best practices such as tracing, structured logging, custom metrics, and more. (AWS Lambda Powertools [Java](https://github.com/awslabs/aws-lambda-powertools-java) and [Typescript](https://github.com/awslabs/aws-lambda-powertools-typescript) is also available).
+A suite of Python utilities for AWS Lambda functions to ease adopting best practices such as tracing, structured logging, custom metrics, and more.
+
+> Also available in [Java](https://github.com/awslabs/aws-lambda-powertools-java), [Typescript](https://github.com/awslabs/aws-lambda-powertools-typescript), and [.NET](https://awslabs.github.io/aws-lambda-powertools-dotnet/).
**[📜Documentation](https://awslabs.github.io/aws-lambda-powertools-python/)** | **[🐍PyPi](https://pypi.org/project/aws-lambda-powertools/)** | **[Roadmap](https://awslabs.github.io/aws-lambda-powertools-python/latest/roadmap/)** | **[Detailed blog post](https://aws.amazon.com/blogs/opensource/simplifying-serverless-best-practices-with-lambda-powertools/)**
diff --git a/aws_lambda_powertools/utilities/parser/models/sns.py b/aws_lambda_powertools/utilities/parser/models/sns.py
index 1b095fde2c4..4666d1c4ff2 100644
--- a/aws_lambda_powertools/utilities/parser/models/sns.py
+++ b/aws_lambda_powertools/utilities/parser/models/sns.py
@@ -22,10 +22,10 @@ class SnsNotificationModel(BaseModel):
MessageAttributes: Optional[Dict[str, SnsMsgAttributeModel]]
Message: Union[str, TypingType[BaseModel]]
MessageId: str
- SigningCertUrl: HttpUrl
- Signature: str
+ SigningCertUrl: Optional[HttpUrl] # NOTE: FIFO opt-in removes attribute
+ Signature: Optional[str] # NOTE: FIFO opt-in removes attribute
Timestamp: datetime
- SignatureVersion: str
+ SignatureVersion: Optional[str] # NOTE: FIFO opt-in removes attribute
@root_validator(pre=True, allow_reuse=True)
def check_sqs_protocol(cls, values):
diff --git a/docs/core/logger.md b/docs/core/logger.md
index 4b16a1eeb71..f98962a0f5f 100644
--- a/docs/core/logger.md
+++ b/docs/core/logger.md
@@ -619,7 +619,7 @@ By default all registered loggers will be modified. You can change this behavior
### How can I add standard library logging attributes to a log record?
-The Python standard library log records contains a [large set of atttributes](https://docs.python.org/3/library/logging.html#logrecord-attributes){target="_blank"}, however only a few are included in Powertools Logger log record by default.
+The Python standard library log records contains a [large set of attributes](https://docs.python.org/3/library/logging.html#logrecord-attributes){target="_blank"}, however only a few are included in Powertools Logger log record by default.
You can include any of these logging attributes as key value arguments (`kwargs`) when instantiating `Logger` or `LambdaPowertoolsFormatter`.
diff --git a/docs/index.md b/docs/index.md
index 3ba70df740c..b0fd3f40ce5 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -8,13 +8,13 @@ description: AWS Lambda Powertools for Python
A suite of utilities for AWS Lambda functions to ease adopting best practices such as tracing, structured logging, custom metrics, idempotency, batching, and more.
???+ note
- Lambda Powertools is also available for [Java](https://awslabs.github.io/aws-lambda-powertools-java/){target="_blank"} and [TypeScript](https://awslabs.github.io/aws-lambda-powertools-typescript/latest/){target="_blank"}.
+ Lambda Powertools is also available for [Java](https://awslabs.github.io/aws-lambda-powertools-java/){target="_blank"}, [TypeScript](https://awslabs.github.io/aws-lambda-powertools-typescript/latest/){target="_blank"}, and [.NET](https://awslabs.github.io/aws-lambda-powertools-dotnet/){target="_blank"}.
## Install
Powertools is available in the following formats:
-* **Lambda Layer**: [**arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPython:38**](#){: .copyMe}:clipboard:
+* **Lambda Layer**: [**arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPython:39**](#){: .copyMe}:clipboard:
* **PyPi**: **`pip install aws-lambda-powertools`**
???+ hint "Support this project by using Lambda Layers :heart:"
@@ -32,28 +32,28 @@ You can include Lambda Powertools Lambda Layer using [AWS Lambda Console](https:
| Region | Layer ARN |
| ---------------- | -------------------------------------------------------------------------------------------------------- |
- | `af-south-1` | [arn:aws:lambda:af-south-1:017000801446:layer:AWSLambdaPowertoolsPython:38](#){: .copyMe}:clipboard: |
- | `ap-east-1` | [arn:aws:lambda:ap-east-1:017000801446:layer:AWSLambdaPowertoolsPython:38](#){: .copyMe}:clipboard: |
- | `ap-northeast-1` | [arn:aws:lambda:ap-northeast-1:017000801446:layer:AWSLambdaPowertoolsPython:38](#){: .copyMe}:clipboard: |
- | `ap-northeast-2` | [arn:aws:lambda:ap-northeast-2:017000801446:layer:AWSLambdaPowertoolsPython:38](#){: .copyMe}:clipboard: |
- | `ap-northeast-3` | [arn:aws:lambda:ap-northeast-3:017000801446:layer:AWSLambdaPowertoolsPython:38](#){: .copyMe}:clipboard: |
- | `ap-south-1` | [arn:aws:lambda:ap-south-1:017000801446:layer:AWSLambdaPowertoolsPython:38](#){: .copyMe}:clipboard: |
- | `ap-southeast-1` | [arn:aws:lambda:ap-southeast-1:017000801446:layer:AWSLambdaPowertoolsPython:38](#){: .copyMe}:clipboard: |
- | `ap-southeast-2` | [arn:aws:lambda:ap-southeast-2:017000801446:layer:AWSLambdaPowertoolsPython:38](#){: .copyMe}:clipboard: |
- | `ap-southeast-3` | [arn:aws:lambda:ap-southeast-3:017000801446:layer:AWSLambdaPowertoolsPython:38](#){: .copyMe}:clipboard: |
- | `ca-central-1` | [arn:aws:lambda:ca-central-1:017000801446:layer:AWSLambdaPowertoolsPython:38](#){: .copyMe}:clipboard: |
- | `eu-central-1` | [arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPython:38](#){: .copyMe}:clipboard: |
- | `eu-north-1` | [arn:aws:lambda:eu-north-1:017000801446:layer:AWSLambdaPowertoolsPython:38](#){: .copyMe}:clipboard: |
- | `eu-south-1` | [arn:aws:lambda:eu-south-1:017000801446:layer:AWSLambdaPowertoolsPython:38](#){: .copyMe}:clipboard: |
- | `eu-west-1` | [arn:aws:lambda:eu-west-1:017000801446:layer:AWSLambdaPowertoolsPython:38](#){: .copyMe}:clipboard: |
- | `eu-west-2` | [arn:aws:lambda:eu-west-2:017000801446:layer:AWSLambdaPowertoolsPython:38](#){: .copyMe}:clipboard: |
- | `eu-west-3` | [arn:aws:lambda:eu-west-3:017000801446:layer:AWSLambdaPowertoolsPython:38](#){: .copyMe}:clipboard: |
- | `me-south-1` | [arn:aws:lambda:me-south-1:017000801446:layer:AWSLambdaPowertoolsPython:38](#){: .copyMe}:clipboard: |
- | `sa-east-1` | [arn:aws:lambda:sa-east-1:017000801446:layer:AWSLambdaPowertoolsPython:38](#){: .copyMe}:clipboard: |
- | `us-east-1` | [arn:aws:lambda:us-east-1:017000801446:layer:AWSLambdaPowertoolsPython:38](#){: .copyMe}:clipboard: |
- | `us-east-2` | [arn:aws:lambda:us-east-2:017000801446:layer:AWSLambdaPowertoolsPython:38](#){: .copyMe}:clipboard: |
- | `us-west-1` | [arn:aws:lambda:us-west-1:017000801446:layer:AWSLambdaPowertoolsPython:38](#){: .copyMe}:clipboard: |
- | `us-west-2` | [arn:aws:lambda:us-west-2:017000801446:layer:AWSLambdaPowertoolsPython:38](#){: .copyMe}:clipboard: |
+ | `af-south-1` | [arn:aws:lambda:af-south-1:017000801446:layer:AWSLambdaPowertoolsPython:39](#){: .copyMe}:clipboard: |
+ | `ap-east-1` | [arn:aws:lambda:ap-east-1:017000801446:layer:AWSLambdaPowertoolsPython:39](#){: .copyMe}:clipboard: |
+ | `ap-northeast-1` | [arn:aws:lambda:ap-northeast-1:017000801446:layer:AWSLambdaPowertoolsPython:39](#){: .copyMe}:clipboard: |
+ | `ap-northeast-2` | [arn:aws:lambda:ap-northeast-2:017000801446:layer:AWSLambdaPowertoolsPython:39](#){: .copyMe}:clipboard: |
+ | `ap-northeast-3` | [arn:aws:lambda:ap-northeast-3:017000801446:layer:AWSLambdaPowertoolsPython:39](#){: .copyMe}:clipboard: |
+ | `ap-south-1` | [arn:aws:lambda:ap-south-1:017000801446:layer:AWSLambdaPowertoolsPython:39](#){: .copyMe}:clipboard: |
+ | `ap-southeast-1` | [arn:aws:lambda:ap-southeast-1:017000801446:layer:AWSLambdaPowertoolsPython:39](#){: .copyMe}:clipboard: |
+ | `ap-southeast-2` | [arn:aws:lambda:ap-southeast-2:017000801446:layer:AWSLambdaPowertoolsPython:39](#){: .copyMe}:clipboard: |
+ | `ap-southeast-3` | [arn:aws:lambda:ap-southeast-3:017000801446:layer:AWSLambdaPowertoolsPython:39](#){: .copyMe}:clipboard: |
+ | `ca-central-1` | [arn:aws:lambda:ca-central-1:017000801446:layer:AWSLambdaPowertoolsPython:39](#){: .copyMe}:clipboard: |
+ | `eu-central-1` | [arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPython:39](#){: .copyMe}:clipboard: |
+ | `eu-north-1` | [arn:aws:lambda:eu-north-1:017000801446:layer:AWSLambdaPowertoolsPython:39](#){: .copyMe}:clipboard: |
+ | `eu-south-1` | [arn:aws:lambda:eu-south-1:017000801446:layer:AWSLambdaPowertoolsPython:39](#){: .copyMe}:clipboard: |
+ | `eu-west-1` | [arn:aws:lambda:eu-west-1:017000801446:layer:AWSLambdaPowertoolsPython:39](#){: .copyMe}:clipboard: |
+ | `eu-west-2` | [arn:aws:lambda:eu-west-2:017000801446:layer:AWSLambdaPowertoolsPython:39](#){: .copyMe}:clipboard: |
+ | `eu-west-3` | [arn:aws:lambda:eu-west-3:017000801446:layer:AWSLambdaPowertoolsPython:39](#){: .copyMe}:clipboard: |
+ | `me-south-1` | [arn:aws:lambda:me-south-1:017000801446:layer:AWSLambdaPowertoolsPython:39](#){: .copyMe}:clipboard: |
+ | `sa-east-1` | [arn:aws:lambda:sa-east-1:017000801446:layer:AWSLambdaPowertoolsPython:39](#){: .copyMe}:clipboard: |
+ | `us-east-1` | [arn:aws:lambda:us-east-1:017000801446:layer:AWSLambdaPowertoolsPython:39](#){: .copyMe}:clipboard: |
+ | `us-east-2` | [arn:aws:lambda:us-east-2:017000801446:layer:AWSLambdaPowertoolsPython:39](#){: .copyMe}:clipboard: |
+ | `us-west-1` | [arn:aws:lambda:us-west-1:017000801446:layer:AWSLambdaPowertoolsPython:39](#){: .copyMe}:clipboard: |
+ | `us-west-2` | [arn:aws:lambda:us-west-2:017000801446:layer:AWSLambdaPowertoolsPython:39](#){: .copyMe}:clipboard: |
??? question "Can't find our Lambda Layer for your preferred AWS region?"
You can use [Serverless Application Repository (SAR)](#sar) method, our [CDK Layer Construct](https://github.com/aws-samples/cdk-lambda-powertools-python-layer){target="_blank"}, or PyPi like you normally would for any other library.
@@ -67,7 +67,7 @@ You can include Lambda Powertools Lambda Layer using [AWS Lambda Console](https:
Type: AWS::Serverless::Function
Properties:
Layers:
- - !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPython:38
+ - !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPython:39
```
=== "Serverless framework"
@@ -77,7 +77,7 @@ You can include Lambda Powertools Lambda Layer using [AWS Lambda Console](https:
hello:
handler: lambda_function.lambda_handler
layers:
- - arn:aws:lambda:${aws:region}:017000801446:layer:AWSLambdaPowertoolsPython:38
+ - arn:aws:lambda:${aws:region}:017000801446:layer:AWSLambdaPowertoolsPython:39
```
=== "CDK"
@@ -93,7 +93,7 @@ You can include Lambda Powertools Lambda Layer using [AWS Lambda Console](https:
powertools_layer = aws_lambda.LayerVersion.from_layer_version_arn(
self,
id="lambda-powertools",
- layer_version_arn=f"arn:aws:lambda:{env.region}:017000801446:layer:AWSLambdaPowertoolsPython:38"
+ layer_version_arn=f"arn:aws:lambda:{env.region}:017000801446:layer:AWSLambdaPowertoolsPython:39"
)
aws_lambda.Function(self,
'sample-app-lambda',
@@ -142,7 +142,7 @@ You can include Lambda Powertools Lambda Layer using [AWS Lambda Console](https:
role = aws_iam_role.iam_for_lambda.arn
handler = "index.test"
runtime = "python3.9"
- layers = ["arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPython:38"]
+ layers = ["arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPython:39"]
source_code_hash = filebase64sha256("lambda_function_payload.zip")
}
@@ -161,7 +161,7 @@ You can include Lambda Powertools Lambda Layer using [AWS Lambda Console](https:
? Do you want to configure advanced settings? Yes
...
? Do you want to enable Lambda layers for this function? Yes
- ? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPython:38
+ ? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPython:39
❯ amplify push -y
@@ -172,7 +172,7 @@ You can include Lambda Powertools Lambda Layer using [AWS Lambda Console](https:
- Name:
? Which setting do you want to update? Lambda layers configuration
? Do you want to enable Lambda layers for this function? Yes
- ? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPython:38
+ ? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPython:39
? Do you want to edit the local lambda function now? No
```
@@ -180,7 +180,7 @@ You can include Lambda Powertools Lambda Layer using [AWS Lambda Console](https:
Change {region} to your AWS region, e.g. `eu-west-1`
```bash title="AWS CLI"
- aws lambda get-layer-version-by-arn --arn arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPython:38 --region {region}
+ aws lambda get-layer-version-by-arn --arn arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPython:39 --region {region}
```
The pre-signed URL to download this Lambda Layer will be within `Location` key.
diff --git a/docs/utilities/idempotency.md b/docs/utilities/idempotency.md
index 7ba61fd3062..4893bb76ab0 100644
--- a/docs/utilities/idempotency.md
+++ b/docs/utilities/idempotency.md
@@ -402,7 +402,7 @@ To prevent against extended failed retries when a [Lambda function times out](ht
This means that if an invocation expired during execution, it will be quickly executed again on the next retry.
???+ important
- If you are only using the [@idempotent_function decorator](#idempotentfunction-decorator) to guard isolated parts of your code, you must use `register_lambda_context` available in the [idempotency config object](#customizing-the-default-behavior) to benefit from this protection.
+ If you are only using the [@idempotent_function decorator](#idempotent_function-decorator) to guard isolated parts of your code, you must use `register_lambda_context` available in the [idempotency config object](#customizing-the-default-behavior) to benefit from this protection.
Here is an example on how you register the Lambda context in your handler:
@@ -842,7 +842,7 @@ This utility provides an abstract base class (ABC), so that you can implement yo
You can inherit from the `BasePersistenceLayer` class and implement the abstract methods `_get_record`, `_put_record`,
`_update_record` and `_delete_record`.
-```python hl_lines="8-13 57 65 74 96 124" title="Excerpt DynamoDB Persisntence Layer implementation for reference"
+```python hl_lines="8-13 57 65 74 96 124" title="Excerpt DynamoDB Persistence Layer implementation for reference"
import datetime
import logging
from typing import Any, Dict, Optional
diff --git a/poetry.lock b/poetry.lock
index 8f13157b12b..1d3756ad9fa 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -18,7 +18,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
dev = ["cloudpickle", "coverage[toml] (>=5.0.2)", "furo", "hypothesis", "mypy", "pre-commit", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "six", "sphinx", "sphinx-notfound-page", "zope.interface"]
docs = ["furo", "sphinx", "sphinx-notfound-page", "zope.interface"]
tests = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "six", "zope.interface"]
-tests_no_zope = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "six"]
+tests-no-zope = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "six"]
[[package]]
name = "aws-cdk-lib"
@@ -159,7 +159,7 @@ optional = false
python-versions = ">=3.5.0"
[package.extras]
-unicode_backport = ["unicodedata2"]
+unicode-backport = ["unicodedata2"]
[[package]]
name = "click"
@@ -335,7 +335,7 @@ dev = ["coverage", "hypothesis", "hypothesmith (>=0.2)", "pre-commit"]
[[package]]
name = "flake8-builtins"
-version = "1.5.3"
+version = "2.0.0"
description = "Check for python builtins being used as variables or parameters."
category = "dev"
optional = false
@@ -345,7 +345,7 @@ python-versions = "*"
flake8 = "*"
[package.extras]
-test = ["coverage", "coveralls", "mock", "pytest", "pytest-cov"]
+test = ["pytest"]
[[package]]
name = "flake8-comprehensions"
@@ -523,9 +523,9 @@ python-versions = ">=3.6.1,<4.0"
[package.extras]
colors = ["colorama (>=0.4.3,<0.5.0)"]
-pipfile_deprecated_finder = ["pipreqs", "requirementslib"]
+pipfile-deprecated-finder = ["pipreqs", "requirementslib"]
plugins = ["setuptools"]
-requirements_deprecated_finder = ["pip-api", "pipreqs"]
+requirements-deprecated-finder = ["pip-api", "pipreqs"]
[[package]]
name = "jinja2"
@@ -596,7 +596,7 @@ python-versions = "*"
six = "*"
[package.extras]
-restructuredText = ["rst2ansi"]
+restructuredtext = ["rst2ansi"]
[[package]]
name = "markdown"
@@ -824,8 +824,8 @@ typing-extensions = ">=4.1.0"
[[package]]
name = "mypy-boto3-ssm"
-version = "1.24.81"
-description = "Type annotations for boto3.SSM 1.24.81 service generated with mypy-boto3-builder 7.11.9"
+version = "1.24.90"
+description = "Type annotations for boto3.SSM 1.24.90 service generated with mypy-boto3-builder 7.11.10"
category = "dev"
optional = false
python-versions = ">=3.7"
@@ -1186,7 +1186,7 @@ urllib3 = ">=1.21.1,<1.27"
[package.extras]
socks = ["PySocks (>=1.5.6,!=1.5.7)", "win-inet-pton"]
-use_chardet_on_py3 = ["chardet (>=3.0.2,<5)"]
+use-chardet-on-py3 = ["chardet (>=3.0.2,<5)"]
[[package]]
name = "retry"
@@ -1383,7 +1383,7 @@ pydantic = ["pydantic", "email-validator"]
[metadata]
lock-version = "1.1"
python-versions = "^3.6.2"
-content-hash = "b6eba8ccb0bd0673dec8656d0fafa5aac520761f92cc152798c41883e3c92dca"
+content-hash = "f41f8a4ab4a0734540d6f34d1b99fe926df7f3d40cde90db062e9a0fb0a1baa0"
[metadata.files]
atomicwrites = [
@@ -1558,8 +1558,8 @@ flake8-bugbear = [
{file = "flake8_bugbear-22.9.23-py3-none-any.whl", hash = "sha256:cd2779b2b7ada212d7a322814a1e5651f1868ab0d3f24cc9da66169ab8fda474"},
]
flake8-builtins = [
- {file = "flake8-builtins-1.5.3.tar.gz", hash = "sha256:09998853b2405e98e61d2ff3027c47033adbdc17f9fe44ca58443d876eb00f3b"},
- {file = "flake8_builtins-1.5.3-py2.py3-none-any.whl", hash = "sha256:7706babee43879320376861897e5d1468e396a40b8918ed7bccf70e5f90b8687"},
+ {file = "flake8-builtins-2.0.0.tar.gz", hash = "sha256:98833fa16139a75cd4913003492a9bd9a61c6f8ac146c3db12a2ebaf420dade3"},
+ {file = "flake8_builtins-2.0.0-py3-none-any.whl", hash = "sha256:39bfa3badb5e8d22f92baf4e0ea1b816707245233846932d6b13e81fc6f673e8"},
]
flake8-comprehensions = [
{file = "flake8-comprehensions-3.7.0.tar.gz", hash = "sha256:6b3218b2dde8ac5959c6476cde8f41a79e823c22feb656be2710cd2a3232cef9"},
@@ -1799,8 +1799,8 @@ mypy-boto3-secretsmanager = [
{file = "mypy_boto3_secretsmanager-1.24.83-py3-none-any.whl", hash = "sha256:9ed3ec38a6c05961cb39a2d9fb891441d4cf22c63e34a6998fbd3d28ba290d9a"},
]
mypy-boto3-ssm = [
- {file = "mypy-boto3-ssm-1.24.81.tar.gz", hash = "sha256:2b3167faa868442e43f0c6065fac8549762aafc967e487aae2d9e15c5bad20c3"},
- {file = "mypy_boto3_ssm-1.24.81-py3-none-any.whl", hash = "sha256:a50fe448f3c18f76255e15878e21020001ec04a85b42996db721d9b89770ff11"},
+ {file = "mypy-boto3-ssm-1.24.90.tar.gz", hash = "sha256:8fdc65a34958ae89d4ae8ea7748caec46226216b35d75adf87e8ed40a798bf95"},
+ {file = "mypy_boto3_ssm-1.24.90-py3-none-any.whl", hash = "sha256:6fc26896e1fb4f84f5bbc04f79ba698e4dd296586ca462c517bc64e78d326fb5"},
]
mypy-boto3-xray = [
{file = "mypy-boto3-xray-1.24.36.post1.tar.gz", hash = "sha256:104f1ecf7f1f6278c582201e71a7ab64843d3a3fdc8f23295cf68788cc77e9bb"},
diff --git a/pyproject.toml b/pyproject.toml
index eeb60fd0d4a..612c44d4028 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "aws_lambda_powertools"
-version = "1.31.0"
+version = "1.31.1"
description = "A suite of utilities for AWS Lambda functions to ease adopting best practices such as tracing, structured logging, custom metrics, batching, idempotency, feature flags, and more."
authors = ["Amazon Web Services"]
include = ["aws_lambda_powertools/py.typed", "THIRD-PARTY-LICENSES"]
@@ -33,7 +33,7 @@ email-validator = {version = "*", optional = true }
coverage = {extras = ["toml"], version = "^6.2"}
pytest = "^7.0.1"
black = "^22.8"
-flake8-builtins = "^1.5.3"
+flake8-builtins = "^2.0.0"
flake8-comprehensions = "^3.7.0"
flake8-debugger = "^4.0.0"
flake8-fixme = "^1.1.1"
@@ -63,7 +63,7 @@ mypy-boto3-dynamodb = { version = "^1.24.74", python = ">=3.7" }
mypy-boto3-lambda = { version = "^1.24.0", python = ">=3.7" }
mypy-boto3-logs = { version = "^1.24.0", python = ">=3.7" }
mypy-boto3-secretsmanager = { version = "^1.24.83", python = ">=3.7" }
-mypy-boto3-ssm = { version = "^1.24.81", python = ">=3.7" }
+mypy-boto3-ssm = { version = "^1.24.90", python = ">=3.7" }
mypy-boto3-s3 = { version = "^1.24.76", python = ">=3.7" }
mypy-boto3-xray = { version = "^1.24.0", python = ">=3.7" }
types-requests = "^2.28.11"
diff --git a/tests/events/snsSqsFifoEvent.json b/tests/events/snsSqsFifoEvent.json
new file mode 100644
index 00000000000..6c23ef62945
--- /dev/null
+++ b/tests/events/snsSqsFifoEvent.json
@@ -0,0 +1,23 @@
+{
+ "Records": [
+ {
+ "messageId": "69bc4bbd-ed69-4325-a434-85c3b428ceab",
+ "receiptHandle": "AQEBbfAqjhrgIdW3HGWYPz57mdDatG/dT9LZhRPAsNQ1pJmw495w4esDc8ZSbOwMZuPBol7wtiNWug8U25GpSQDDLY1qv//8/lfmdzXOiprG6xRVeiXSHj0j731rJQ3xo+GPdGjOzjIxI09CrE3HtZ4lpXY9NjjHzP8hdxkCLlbttumc8hDBUR365/Tk+GfV2nNP9qvZtLGEbKCdTm/GYdTSoAr+ML9HnnGrS9T25Md71ASiZMI4DZqptN6g7CYYojFPs1LVM9o1258ferA72zbNoQ==",
+ "body": "{\n \"Type\" : \"Notification\",\n \"MessageId\" : \"a7c9d2fa-77fa-5184-9de9-89391027cc7d\",\n \"SequenceNumber\" : \"10000000000000004000\",\n \"TopicArn\" : \"arn:aws:sns:eu-west-1:231436140809:Test.fifo\",\n \"Message\" : \"{\\\"message\\\": \\\"hello world\\\", \\\"username\\\": \\\"lessa\\\"}\",\n \"Timestamp\" : \"2022-10-14T13:35:25.419Z\",\n \"UnsubscribeURL\" : \"https://sns.eu-west-1.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=arn:aws:sns:eu-west-1:231436140809:Test.fifo:bb81d3de-a0f9-46e4-b619-d3152a4d545f\"\n}",
+ "attributes": {
+ "ApproximateReceiveCount": "1",
+ "SentTimestamp": "1665754525442",
+ "SequenceNumber": "18873177232222703872",
+ "MessageGroupId": "powertools-test",
+ "SenderId": "AIDAWYJAWPFU7SUQGUJC6",
+ "MessageDeduplicationId": "4e0a0f61eed277a4b9e4c01d5722b07b0725e42fe782102abee5711adfac701f",
+ "ApproximateFirstReceiveTimestamp": "1665754525442"
+ },
+ "messageAttributes": {},
+ "md5OfBody": "f3c788e623445e3feb263e80c1bffc0b",
+ "eventSource": "aws:sqs",
+ "eventSourceARN": "arn:aws:sqs:eu-west-1:231436140809:Test.fifo",
+ "awsRegion": "eu-west-1"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/tests/functional/parser/test_sns.py b/tests/functional/parser/test_sns.py
index 6042322e88a..10674c88ef5 100644
--- a/tests/functional/parser/test_sns.py
+++ b/tests/functional/parser/test_sns.py
@@ -110,19 +110,6 @@ def test_handle_sns_sqs_trigger_event_json_body(): # noqa: F811
handle_sns_sqs_json_body(event_dict, LambdaContext())
-def test_handle_sns_sqs_trigger_event_json_body_missing_signing_cert_url():
- # GIVEN an event is tampered with a missing SigningCertURL
- event_dict = load_event("snsSqsEvent.json")
- payload = json.loads(event_dict["Records"][0]["body"])
- payload.pop("SigningCertURL")
- event_dict["Records"][0]["body"] = json.dumps(payload)
-
- # WHEN parsing the payload
- # THEN raise a ValidationError error
- with pytest.raises(ValidationError):
- handle_sns_sqs_json_body(event_dict, LambdaContext())
-
-
def test_handle_sns_sqs_trigger_event_json_body_missing_unsubscribe_url():
# GIVEN an event is tampered with a missing UnsubscribeURL
event_dict = load_event("snsSqsEvent.json")
@@ -134,3 +121,8 @@ def test_handle_sns_sqs_trigger_event_json_body_missing_unsubscribe_url():
# THEN raise a ValidationError error
with pytest.raises(ValidationError):
handle_sns_sqs_json_body(event_dict, LambdaContext())
+
+
+def test_handle_sns_sqs_fifo_trigger_event_json_body():
+ event_dict = load_event("snsSqsFifoEvent.json")
+ handle_sns_sqs_json_body(event_dict, LambdaContext())