Skip to content

Commit 85a4800

Browse files
Merge branch 'develop' into drop-python37
2 parents 56863ec + ced0a3d commit 85a4800

File tree

74 files changed

+2715
-755
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+2715
-755
lines changed

CHANGELOG.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
## Documentation
1212

1313
* **metrics:** fix empty metric warning filter ([#3660](https://github.com/aws-powertools/powertools-lambda-python/issues/3660))
14+
* **proccess:** add versioning and maintenance policy ([#3682](https://github.com/aws-powertools/powertools-lambda-python/issues/3682))
1415

1516
## Features
1617

@@ -19,16 +20,16 @@
1920
## Maintenance
2021

2122
* **deps:** bump codecov/codecov-action from 3.1.4 to 3.1.5 ([#3674](https://github.com/aws-powertools/powertools-lambda-python/issues/3674))
23+
* **deps:** bump squidfunk/mkdocs-material from `58eef6c` to `9aad7af` in /docs ([#3670](https://github.com/aws-powertools/powertools-lambda-python/issues/3670))
2224
* **deps:** bump squidfunk/mkdocs-material from `9aad7af` to `a4a2029` in /docs ([#3679](https://github.com/aws-powertools/powertools-lambda-python/issues/3679))
23-
* **deps:** bump pydantic from 1.10.13 to 1.10.14 ([#3655](https://github.com/aws-powertools/powertools-lambda-python/issues/3655))
24-
* **deps:** bump codecov/codecov-action from 3.1.5 to 3.1.6 ([#3683](https://github.com/aws-powertools/powertools-lambda-python/issues/3683))
2525
* **deps:** bump the layer-balancer group in /layer/scripts/layer-balancer with 1 update ([#3665](https://github.com/aws-powertools/powertools-lambda-python/issues/3665))
26-
* **deps:** bump squidfunk/mkdocs-material from `58eef6c` to `9aad7af` in /docs ([#3670](https://github.com/aws-powertools/powertools-lambda-python/issues/3670))
27-
* **deps-dev:** bump aws-cdk from 2.122.0 to 2.123.0 ([#3673](https://github.com/aws-powertools/powertools-lambda-python/issues/3673))
28-
* **deps-dev:** bump ruff from 0.1.13 to 0.1.14 ([#3656](https://github.com/aws-powertools/powertools-lambda-python/issues/3656))
26+
* **deps:** bump codecov/codecov-action from 3.1.5 to 3.1.6 ([#3683](https://github.com/aws-powertools/powertools-lambda-python/issues/3683))
27+
* **deps:** bump pydantic from 1.10.13 to 1.10.14 ([#3655](https://github.com/aws-powertools/powertools-lambda-python/issues/3655))
2928
* **deps-dev:** bump aws-cdk from 2.123.0 to 2.124.0 ([#3678](https://github.com/aws-powertools/powertools-lambda-python/issues/3678))
3029
* **deps-dev:** bump sentry-sdk from 1.39.2 to 1.40.0 ([#3684](https://github.com/aws-powertools/powertools-lambda-python/issues/3684))
30+
* **deps-dev:** bump ruff from 0.1.13 to 0.1.14 ([#3656](https://github.com/aws-powertools/powertools-lambda-python/issues/3656))
3131
* **deps-dev:** bump ruff from 0.1.14 to 0.1.15 ([#3685](https://github.com/aws-powertools/powertools-lambda-python/issues/3685))
32+
* **deps-dev:** bump aws-cdk from 2.122.0 to 2.123.0 ([#3673](https://github.com/aws-powertools/powertools-lambda-python/issues/3673))
3233

3334

3435
<a name="v2.32.0"></a>

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ dev:
88
pip install --upgrade pip pre-commit poetry
99
poetry config --local virtualenvs.in-project true
1010
@$(MAKE) dev-version-plugin
11-
poetry install --extras "all datamasking-aws-sdk redis"
11+
poetry install --extras "all redis"
1212
pre-commit install
1313

1414
dev-gitpod:
1515
pip install --upgrade pip poetry
1616
@$(MAKE) dev-version-plugin
17-
poetry install --extras "all datamasking-aws-sdk redis"
17+
poetry install --extras "all redis"
1818
pre-commit install
1919

2020
format:

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Powertools for AWS Lambda (Python) is a developer toolkit to implement Serverles
3030
* **[Event source data classes](https://docs.powertools.aws.dev/lambda/python/latest/utilities/data_classes/)** - Data classes describing the schema of common Lambda event triggers
3131
* **[Parser](https://docs.powertools.aws.dev/lambda/python/latest/utilities/parser/)** - Data parsing and deep validation using Pydantic
3232
* **[Idempotency](https://docs.powertools.aws.dev/lambda/python/latest/utilities/idempotency/)** - Convert your Lambda functions into idempotent operations which are safe to retry
33+
* **[Data Masking](https://docs.powertools.aws.dev/lambda/python/latest/utilities/data_masking/)** - Protect confidential data with easy removal or encryption
3334
* **[Feature Flags](https://docs.powertools.aws.dev/lambda/python/latest/utilities/feature_flags/)** - A simple rule engine to evaluate when one or multiple features should be enabled depending on the input
3435
* **[Streaming](https://docs.powertools.aws.dev/lambda/python/latest/utilities/streaming/)** - Streams datasets larger than the available memory as streaming data.
3536

aws_lambda_powertools/shared/functions.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,18 @@ def resolve_env_var_choice(
9696

9797
def base64_decode(value: str) -> bytes:
9898
try:
99-
logger.debug("Decoding base64 record item before parsing")
99+
logger.debug("Decoding base64 item to bytes")
100100
return base64.b64decode(value)
101101
except (BinAsciiError, TypeError):
102-
raise ValueError("base64 decode failed")
102+
raise ValueError("base64 decode failed - is this base64 encoded string?")
103+
104+
105+
def bytes_to_base64_string(value: bytes) -> str:
106+
try:
107+
logger.debug("Encoding bytes to base64 string")
108+
return base64.b64encode(value).decode()
109+
except TypeError:
110+
raise ValueError(f"base64 encoding failed - is this bytes data? type: {type(value)}")
103111

104112

105113
def bytes_to_string(value: bytes) -> str:

aws_lambda_powertools/utilities/_data_masking/base.py

Lines changed: 0 additions & 174 deletions
This file was deleted.

aws_lambda_powertools/utilities/_data_masking/constants.py

Lines changed: 0 additions & 5 deletions
This file was deleted.

aws_lambda_powertools/utilities/_data_masking/provider/__init__.py

Lines changed: 0 additions & 5 deletions
This file was deleted.

aws_lambda_powertools/utilities/_data_masking/provider/base.py

Lines changed: 0 additions & 34 deletions
This file was deleted.

aws_lambda_powertools/utilities/_data_masking/provider/kms/__init__.py

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)