From a520b66dad945179fbf5c7d46cae382e632267eb Mon Sep 17 00:00:00 2001 From: Daniel Ancuta Date: Tue, 22 Sep 2020 18:55:36 +0200 Subject: [PATCH 1/2] Change `bool` to `BOOL` index name when accessing boolean value in dynamodb. (#176) It seems that when accessing boolean value from dynamodb index name `bool` is used instead of correct one `BOOL`. Have a look at https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_AttributeValue.html to see list of available attribute values --- .../utilities/data_classes/dynamo_db_stream_event.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws_lambda_powertools/utilities/data_classes/dynamo_db_stream_event.py b/aws_lambda_powertools/utilities/data_classes/dynamo_db_stream_event.py index db581ceaf7d..bc3a4a82995 100644 --- a/aws_lambda_powertools/utilities/data_classes/dynamo_db_stream_event.py +++ b/aws_lambda_powertools/utilities/data_classes/dynamo_db_stream_event.py @@ -35,7 +35,7 @@ def bool_value(self) -> Optional[bool]: Example: >>> {"BOOL": True} """ - item = self.get("bool") + item = self.get("BOOL") return None if item is None else bool(item) @property From 0b9294a590056d031a1ff09b3198ad3f4324aa76 Mon Sep 17 00:00:00 2001 From: Tom McCarthy Date: Wed, 23 Sep 2020 15:57:34 +0200 Subject: [PATCH 2/2] chore: bump to 1.6.1 (#177) --- CHANGELOG.md | 5 +++++ pyproject.toml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4298915a309..5deb6a8d9b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.6.1] - 2020-09-23 + +### Fixed +- **Utilities**: Fix issue with boolean values in DynamoDB stream event data class. + ## [1.6.0] - 2020-09-22 ### Added diff --git a/pyproject.toml b/pyproject.toml index 803b200a0c9..78f501c9227 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "aws_lambda_powertools" -version = "1.6.0" +version = "1.6.1" description = "Python utilities for AWS Lambda functions including but not limited to tracing, logging and custom metric" authors = ["Amazon Web Services"] classifiers=[