Releases: aws-powertools/powertools-lambda-python
v3.9.0
This release improves the OpenAPI utility, letting customers distinguish between request and response validation errors. It also adds support for API Gateway WebSocket in the Event Source Data Class utility.
Thanks to @ericbn, we simplified the Event Source Data Class utility code, making it more readable and easier to maintain.
⭐ A huge thanks to our new contributor: @amin-farjadi.
Working with OpenAPI response validation
Customers can now customize response validation errors to be clearly identified.
Previously, both request and response validation failures triggered the same RequestValidationError
, making debugging difficult. Response validation now raises a specific ResponseValidationError
, helping you quickly identify validation issues. This is useful to both detect and handle these types of errors more easily.
Working with API Gateway WebSocket events
You can now use the APIGatewayWebSocketEvent
data class when working with WebSocket API events. This simplifies handling of API Gateway WebSocket events by providing better type completion in IDEs and easy access to event properties.
Changes
- refactor(data_classes): Add base class with common code (#6297) by @ericbn
- refactor(data_classes): remove duplicated code (#6288) by @ericbn
- refactor(data_classes): simplify nested data classes (#6289) by @ericbn
- refactor(tests): add LambdaContext type in tests (#6214) by @basvandriel
🌟New features and non-breaking changes
- feat(general): make logger, tracer and metrics utilities aware of provisioned concurrency (#6324) by @leandrodamascena
- feat(metrics): allow change ColdStart function_name dimension (#6315) by @leandrodamascena
- feat(data_classes): add API Gateway Websocket event (#6287) by @ericbn
- feat(event_handler): add custom method for OpenAPI configuration (#6204) by @leandrodamascena
- feat(event_handler): add custom response validation in OpenAPI utility (#6189) by @amin-farjadi
📜 Documentation updates
- docs(public_reference): add Guild as a public reference (#6342) by @leandrodamascena
- docs(homepage): update layer instructions link (#6242) by @ChristophrK
🐛 Bug and hot fixes
- fix(idempotency): include sk in error msgs when using composite key (#6325) by @leandrodamascena
- fix(metrics): ensure proper type conversion for
DD_FLUSH_TO_LOG
env var (#6280) by @leandrodamascena
🔧 Maintenance
- chore(documentation): v2 end of support (#6343) by @leandrodamascena
- chore(deps-dev): bump sentry-sdk from 2.24.0 to 2.24.1 (#6339) by @dependabot[bot]
- chore(deps-dev): bump mkdocstrings-python from 1.16.7 to 1.16.8 (#6338) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.37.18 to 1.37.19 (#6337) by @dependabot[bot]
- chore(deps-dev): bump sentry-sdk from 2.23.1 to 2.24.0 (#6329) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.37.16 to 1.37.18 (#6327) by @dependabot[bot]
- chore(deps-dev): bump coverage from 7.7.0 to 7.7.1 (#6328) by @dependabot[bot]
- chore(deps-dev): bump ruff from 0.11.1 to 0.11.2 (#6326) by @dependabot[bot]
- chore(deps-dev): bump ruff from 0.11.0 to 0.11.1 (#6320) by @dependabot[bot]
- chore(deps-dev): bump mkdocstrings-python from 1.16.6 to 1.16.7 (#6319) by @dependabot[bot]
- chore(deps-dev): bump cfn-lint from 1.31.3 to 1.32.0 (#6316) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.184.1a0 to 2.185.0a0 (#6317) by @dependabot[bot]
- chore(ci): Fix SAR pipeline (#6313) by @leandrodamascena
- chore(logger): clear prev request buffers in manual mode (#6314) by @leandrodamascena
- chore(deps-dev): bump cfn-lint from 1.31.0 to 1.31.3 (#6306) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.37.15 to 1.37.16 (#6305) by @dependabot[bot]
- chore(deps): bump actions/setup-go from 5.3.0 to 5.4.0 (#6304) by @dependabot[bot]
- chore(deps): bump actions/download-artifact from 4.2.0 to 4.2.1 (#6303) by @dependabot[bot]
- chore(deps): bump actions/upload-artifact from 4.6.1 to 4.6.2 (#6302) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk from 2.1004.0 to 2.1005.0 (#6301) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.37.14 to 1.37.15 (#6295) by @dependabot[bot]
- chore(deps-dev): bump cfn-lint from 1.30.0 to 1.31.0 (#6296) by @dependabot[bot]
- chore(deps): bump actions/download-artifact from 4.1.9 to 4.2.0 (#6294) by @dependabot[bot]
- fix(metrics): ensure proper type conversion for
DD_FLUSH_TO_LOG
env var (#6280) by @leandrodamascena - chore(deps-dev): bump mkdocs-material from 9.6.8 to 9.6.9 (#6285) by @dependabot[bot]
- chore(deps-dev): bump coverage from 7.6.12 to 7.7.0 (#6284) by @dependabot[bot]
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.296 to 0.1.297 (#6281) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.37.12 to 1.37.14 (#6282) by @dependabot[bot]
- chore(deps): bump squidfunk/mkdocs-material from
479a06a
tof226a2d
in /docs (#6279) by @dependabot[bot] - chore(deps): bump actions/setup-node from 4.2.0 to 4.3.0 (#6278) by @dependabot[bot]
- feat(event_handler): add custom method for OpenAPI configuration (#6204) by @leandrodamascena
- chore(deps-dev): bump ruff from 0.9.10 to 0.11.0 (#6273) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-lib from 2.183.0 to 2.184.1 (#6272) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.183.0a0 to 2.184.1a0 (#6271) by @dependabot[bot]
- chore(deps-dev): bump filelock from 3.17.0 to 3.18.0 (#6270) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.37.11 to 1.37.12 (#6266) by @dependabot[bot]
- chore(deps-dev): bump mkdocs-material from 9.6.7 to 9.6.8 (#6264) by @dependabot[bot]
- chore(deps-dev): bump cfn-lint from 1.29.1 to 1.30.0 (#6263) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk from 2.1003.0 to 2.1004.0 (#6262) by @dependabot[bot]
- chore(deps): bump squidfunk/mkdocs-material from
047452c
to479a06a
in /docs (#6261) by @dependabot[bot] - chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.182.0a0 to 2.183.0a0 (#6258) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-lib from 2.182.0 to 2.183.0 (#6257) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.37.10 to 1.37.11 (#6252) by @dependabot[bot]
- chore(deps-dev): bump cfn-lint from 1.28.0 to 1.29.1 (#6249) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.37.8 to 1.37.10 (#6248) by @dependabot[bot]
- chore(deps-dev): bump ruff from 0.9.9 to 0.9.10 (#6241) by @dependabot[bot]
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.295 to 0.1.296 (#6240) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.37.7 to 1.37.8 (#6239) by @dependabot[bot]
This release was made possible by the following contributors:
@ChristophrK, @amin-farjadi, @basvandriel, @dependabot[bot], @ericbn, @github-actions[bot], @leandrodamascena, dependabot[bot] and github-actions[bot]
v3.8.0
Summary
We are excited to announce a new feature in Logger: Logger buffering. This new feature allows you to buffer logs for a specific invocation, and flush them automatically on error or manually as needed.
A special thanks to Ollie Saul and James Saull from Dotelastic for their instrumental input on this new feature!
⭐ Also, huge thanks to our new contributors: @tiagohconte and @speshak.
New Log Buffering feature
You can now enable log buffering by passing buffer_config
when initializing a new Logger instance. This feature allows you to:
- Buffer logs at the
WARNING
,INFO
, andDEBUG
levels - Automatically flush logs on error or manually as needed
- Reduce CloudWatch costs by decreasing the number of emitted log messages
Configuration options
Option | Description | Default |
---|---|---|
max_bytes |
Maximum size of the buffer in bytes | 20480 |
buffer_at_verbosity |
Minimum log level to buffer (more verbose levels are also buffered) | DEBUG |
flush_on_error_log |
Whether to flush buffer when an error is logged | True |
When log buffering is enabled, you can now pass a new opt-in flush_buffer_on_uncaught_error
flag to the inject_lambda_context()
decorator. When enabled, 1/ we'll intercept any raised exception, 2/ flush the buffer, and 3/ re-raise your original exception. This enables you to have detailed logs from your application when you need them the most.
For detailed explanations with diagrams, please refer to our comprehensive documentation.
Buffering FAQs
Q: Does the buffer persist across Lambda invocations?
A: No, each Lambda invocation has its own buffer. The buffer is initialized when the Lambda function is invoked and is cleared after the function execution completes or when flushed manually.
Q: Are my logs buffered during cold starts?
A: No. We never buffer logs during cold starts to ensure all logs from this phase are immediately available for debugging.
Q: How can I prevent log buffering from consuming excessive memory?
A: You can limit the size of the buffer by setting the max_bytes
option in the LoggerBufferConfig
constructor parameter. This will ensure that the buffer does not grow indefinitely and consume excessive memory.
Q: What happens if the log buffer reaches its maximum size?
A: Older logs are removed from the buffer to make room for new logs. This means that if the buffer is full, you may lose some logs if they are not flushed before the buffer reaches its maximum size. When this happens, we emit a warning when flushing the buffer to indicate that some logs have been dropped.
Q: What timestamp is used when I flush the logs?
A: The timestamp preserves the original time when the log record was created. If you create a log record at 11:00:10 and flush it at 11:00:25, the log line will retain its original timestamp of 11:00:10.
Q: What happens if I try to add a log line that is bigger than max buffer size?
A: The log will be emitted directly to standard output and not buffered. When this happens, we emit a warning to indicate that the log line was too big to be buffered.
Q: What happens if Lambda times out without flushing the buffer?
A: Logs that are still in the buffer will be lost. If you are using the log buffer to log asynchronously, you should ensure that the buffer is flushed before the Lambda function times out. You can do this by calling the logger.flush_buffer()
method at the end of your Lambda function.
Q: Do child loggers inherit the buffer?
A: No, child loggers do not inherit the buffer from their parent logger but only the buffer configuration. This means that if you create a child logger, it will have its own buffer and will not share the buffer with the parent logger.
Changes
- refactor(tracer): fix capture_lambda_handler return type annotation (#6197) by @tiagohconte
🌟New features and non-breaking changes
- feat(logger): add logger buffer feature (#6060) by @leandrodamascena
- feat(logger): add new logic to sample debug logs (#6142) by @leandrodamascena
📜 Documentation updates
🐛 Bug and hot fixes
- fix(event_handler): revert regression when validating response (#6234) by @leandrodamascena
🔧 Maintenance
- chore(deps-dev): bump boto3-stubs from 1.37.6 to 1.37.7 (#6231) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk from 2.1002.0 to 2.1003.0 (#6232) by @dependabot[bot]
- chore(deps-dev): bump jinja2 from 3.1.5 to 3.1.6 (#6224) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.37.5 to 1.37.6 (#6227) by @dependabot[bot]
- chore(deps-dev): bump cfn-lint from 1.27.0 to 1.28.0 (#6228) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.181.1a0 to 2.182.0a0 (#6226) by @dependabot[bot]
- chore(deps-dev): bump testcontainers from 4.9.1 to 4.9.2 (#6225) by @dependabot[bot]
- chore(deps): bump jinja2 from 3.1.5 to 3.1.6 in /docs (#6223) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-lib from 2.181.1 to 2.182.0 (#6222) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.37.4 to 1.37.5 (#6217) by @dependabot[bot]
- chore(deps): bump datadog-lambda from 6.105.0 to 6.106.0 (#6218) by @dependabot[bot]
- chore(deps-dev): bump pytest from 8.3.4 to 8.3.5 (#6206) by @dependabot[bot]
- chore(deps-dev): bump mkdocs-material from 9.6.5 to 9.6.7 (#6208) by @dependabot[bot]
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.294 to 0.1.295 (#6207) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk from 2.1001.0 to 2.1002.0 (#6209) by @dependabot[bot]
- chore(deps): bump squidfunk/mkdocs-material from
2615302
to047452c
in /docs (#6210) by @dependabot[bot] - chore(deps-dev): bump boto3-stubs from 1.37.3 to 1.37.4 (#6205) by @dependabot[bot]
- chore(deps-dev): bump cfn-lint from 1.26.1 to 1.27.0 (#6192) by @dependabot[bot]
- chore(deps): bump docker/setup-qemu-action from 3.5.0 to 3.6.0 (#6190) by @dependabot[bot]
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.293 to 0.1.294 (#6193) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.181.0a0 to 2.181.1a0 (#6194) by @dependabot[bot]
- chore(deps-dev): bump ruff from 0.9.8 to 0.9.9 (#6195) by @dependabot[bot]
- chore(ci): enable SAR deployment (#6104) by @leandrodamascena
- chore(deps-dev): bump boto3-stubs from 1.37.2 to 1.37.3 (#6181) by @dependabot[bot]
- chore(deps-dev): bump isort from 6.0.0 to 6.0.1 (#6183) by @dependabot[bot]
- chore(deps): bump pydantic-settings from 2.8.0 to 2.8.1 (#6182) by @dependabot[bot]
- chore(deps-dev): bump ruff from 0.9.7 to 0.9.8 (#6184) by @dependabot[bot]
- chore(deps): bump codecov/codecov-action from 5.3.1 to 5.4.0 (#6180) by @dependabot[bot]
- chore(deps): bump docker/setup-buildx-action from 3.9.0 to 3.10.0 (#6175) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.37.0 to 1.37.1 (#6170) by @dependabot[bot]
- chore(deps): bump docker/setup-qemu-action from 3.4.0 to 3.5.0 (#6176) by @dependabot[bot]
- chore(deps): bump actions/download-artifact from 4.1.8 to 4.1.9 (#6174) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk from 2.1000.3 to 2.1001.0 (#6173) by @dependabot[bot]
- chore(deps-dev): bump cfn-lint from 1.26.0 to 1.26.1 (#6169) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.180.0a0 to 2.181.0a0 (#6172) by @dependabot[bot]
- chore(deps-dev): bump cfn-lint from 1.25.1 to 1.26.0 (#6164) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.36.26 to 1.37.0 (#6165) by @dependabot[bot]
- chore(deps-dev): bump mypy-boto3-appconfigdata from 1.36.0 to 1.37.0 in the boto-typing group (#6163) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk from 2.1000.2 to 2.1000.3 (#6162) by @dependabot[bot]
This release was made possible by the following contr...
v3.7.0
Summary
In this release, we are thrilled to announce new features and improvements:
- New Event Source Data Classes and Parser models for IoT Core Registry Events
- Support for OpenAPI examples within parameters fields
We also fixed a bug in the Logger utility's custom handlers and expanded Lambda layer support to Thailand (ap-southeast-7) and Mexico Central (mx-central-1) regions.
⭐ Huge thanks to our new contributors: @basvandriel and @DKurilo
Working with IoT Core Registry Events with Parser
We have improved the Parser utility by adding support for events from IoT Core Registry Events
Here are all the models we have added for IoT Core Registry Events:
- IoTCoreThingEvent - For Things Created/Updated/Deleted events
- IoTCoreThingTypeEvent - For Thing Type Created/Updated/Deprecated/Deleted events
- IoTCoreThingTypeAssociationEvent - For associating or disassociating a thing events
- IoTCoreThingGroupEvent - For Thing Group Created/Updated/Deleted events
- IoTCoreAddOrRemoveFromThingGroupEvent - For adding or removing a thing from a group events
- IoTCoreAddOrDeleteFromThingGroupEvent - For adding or deleting a group within another group events
Adding examples to the OpenAPI schema
You can now include specific examples of parameter values directly in the schema objects. These examples are rendered in API documentation tools like SwaggerUI and provide a better experience when reading the OpenAPI schema.
Using Logger custom handlers
Customers can now rely on a correct logger handler selection in compute environments or custom setups where a standard logging logger shares the same name as a Powertools logger.
Changes
🌟New features and non-breaking changes
- feat(parser): Event source dataclasses for IoT Core Registry Events (#6123) by @basvandriel
- feat(parser): Add IoT registry events models (#5892) by @basvandriel
- feat(event_handler): add support for defining OpenAPI examples in parameters (#6086) by @leandrodamascena
- feat(batch): raise exception for invalid batch event (#6088) by @anafalcao
- feat(layers): add new comercial region ap-southeast-7 and mx-central-1 (#6109) by @leandrodamascena
📜 Documentation updates
- docs(homepage): add sitemap to documentation website (#6103) by @hjgraca
- feat(parser): Add IoT registry events models (#5892) by @basvandriel
- docs(roadmap): update roadmap (#6077) by @leandrodamascena
🐛 Bug and hot fixes
- fix(parser): fix data types for
sourceIPAddress
andsequencer
fields in S3RecordModel Model (#6154) by @DKurilo - fix(parser): fix EventBridgeModel when working with scheduled events (#6134) by @leandrodamascena
- fix(openapi): validate response serialization when falsy (#6119) by @anafalcao
- fix(logger): correctly pick powertools or custom handler in custom environments (#6083) by @leandrodamascena
- fix(security): fix encryption_context handling in data masking operations (#6074) by @leandrodamascena
🔧 Maintenance
- chore(deps): bump slsa-framework/slsa-github-generator from 2.0.0 to 2.1.0 (#6155) by @dependabot[bot]
- chore(deps): bump ossf/scorecard-action from 2.4.0 to 2.4.1 (#6143) by @dependabot[bot]
- chore(deps): bump pydantic-settings from 2.7.1 to 2.8.0 (#6147) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-lib from 2.179.0 to 2.180.0 (#6148) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.36.25 to 1.36.26 (#6146) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.179.0a0 to 2.180.0a0 (#6145) by @dependabot[bot]
- chore(deps): bump actions/upload-artifact from 4.6.0 to 4.6.1 (#6144) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.36.24 to 1.36.25 (#6137) by @dependabot[bot]
- chore(deps-dev): bump mkdocs-material from 9.6.4 to 9.6.5 (#6136) by @dependabot[bot]
- chore(deps-dev): bump ruff from 0.9.6 to 0.9.7 (#6138) by @dependabot[bot]
- chore(deps): bump squidfunk/mkdocs-material from
f5bcec4
to2615302
in /docs (#6135) by @dependabot[bot] - chore(deps-dev): bump aws-cdk-lib from 2.178.2 to 2.179.0 (#6130) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.178.2a0 to 2.179.0a0 (#6127) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk from 2.178.2 to 2.1000.2 (#6126) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.36.22 to 1.36.24 (#6131) by @dependabot[bot]
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.292 to 0.1.293 (#6129) by @dependabot[bot]
- chore(deps-dev): bump mkdocstrings-python from 1.16.0 to 1.16.1 (#6128) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.36.19 to 1.36.22 (#6116) by @dependabot[bot]
- chore(deps-dev): bump cfn-lint from 1.24.0 to 1.25.1 (#6115) by @dependabot[bot]
- chore(deps-dev): bump mkdocstrings-python from 1.15.0 to 1.16.0 (#6118) by @dependabot[bot]
- chore(deps-dev): bump bandit from 1.8.2 to 1.8.3 (#6117) by @dependabot[bot]
- chore(deps-dev): bump sentry-sdk from 2.21.0 to 2.22.0 (#6114) by @dependabot[bot]
- chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions from 3.0.21 to 3.0.22 (#6113) by @dependabot[bot]
- chore(ci): remove python3.8 runtime when bootstrapping a new region (#6101) by @leandrodamascena
- chore(deps-dev): bump sentry-sdk from 2.20.0 to 2.21.0 (#6096) by @dependabot[bot]
- chore(deps-dev): bump mkdocs-material from 9.6.3 to 9.6.4 (#6097) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.178.1a0 to 2.178.2a0 (#6095) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.36.17 to 1.36.19 (#6093) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk from 2.178.1 to 2.178.2 (#6089) by @dependabot[bot]
- chore(deps): bump squidfunk/mkdocs-material from
c62453b
tof5bcec4
in /docs (#6087) by @dependabot[bot] - chore(deps): bump aws-actions/configure-aws-credentials from 4.0.3 to 4.1.0 (#6082) by @dependabot[bot]
- chore(deps-dev): bump coverage from 7.6.11 to 7.6.12 (#6080) by @dependabot[bot]
- chore(deps-dev): bump mkdocstrings-python from 1.14.6 to 1.15.0 (#6079) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.36.16 to 1.36.17 (#6078) by @dependabot[bot]
This release was made possible by the following contributors:
@DKurilo, @anafalcao, @basvandriel, @dependabot[bot], @github-actions[bot], @hjgraca, @leandrodamascena, dependabot[bot] and github-actions[bot]
v3.6.0
Summary
In this release, we are thrilled to announce new features and improvements:
- Customizable masking capabilities with the erase method in Data Masking utility
- Ability to disable metrics flush via environment variables
- New Event Source Data Classes for API Gateway Authorizer Response WebSocket
- New method to the Logger class to clear appended keys at any point during the execution of your Lambda invocation
Special thanks to @philiptzou, for improving type annotations in our OpenAPI utility! ⭐
Custom masking support for Data Masking
You can now configure advanced masking options when using erase
method in the Data Masking utility. This feature provides granular control to protect sensitive information while maintaining data readability and structure.
The new options to use with erase
:
- Dynamic Mask: Preserves text length and structure by replacing characters with
*
- Custom Mask: Apply simple pattern like "XX-XX"
- Regex Mask: Advanced pattern-based masking for complex data formats
- Field-specific Allows different masking rules for different data fields
Disable flushing metrics using environment variables
You can now set the POWERTOOLS_METRICS_DISABLES
environment variable to control the metrics output. This is useful when you want to silent metrics in a non-production environment. When POWERTOOLS_DEV
is enabled, the metrics are also suppressed, but you can always override it by setting POWERTOOLS_METRICS_DISABLED=false
when you want to continue emitting metrics while in dev mode.
Support for API Gateway Authorizer Response WebSocket
You can now use the new APIGatewayAuthorizerResponseWebSocket
class to handle authorization policies for WebSocket APIs.
Clearing all appended keys with clear_state()
method
We have added a new clear_state()
to Logger to easily remove any temporary keys you have added. This is useful when you add multiple custom keys conditionally or when you emit canonical or wide logs.
Changes
- refactor(metrics): Improve type annotations for metrics decorator (#6000) by @leandrodamascena
🌟New features and non-breaking changes
- feat(data-masking): add custom mask functionalities (#5837) by @anafalcao
- feat(metrics): disable metrics flush via environment variables (#6046) by @anafalcao
- feat(event_source): add class APIGatewayAuthorizerResponseWebSocket (#6058) by @leandrodamascena
- feat(openapi): enhance support for tuple return type validation (#5997) by @philiptzou
- feat(logger): add clear_state method (#5956) by @anafalcao
📜 Documentation updates
- docs(api): migrating the event handler utility to mkdocstrings (#6023) by @leandrodamascena
- docs(api): migrating the metrics utility to mkdocstrings (#6022) by @leandrodamascena
- docs(api): migrating the logger utility to mkdocstrings (#6021) by @leandrodamascena
- docs(api): migrating the Middleware Factory utility to mkdocstrings (#6019) by @leandrodamascena
- docs(api): migrating the tracer utility to mkdocstrings (#6017) by @leandrodamascena
- docs(api): migrating the batch utility to mkdocstrings (#6016) by @leandrodamascena
- docs(api): migrating the event source data classes utility to mkdocstrings (#6015) by @leandrodamascena
- docs(api): migrating the data masking utility to mkdocstrings (#6013) by @leandrodamascena
- docs(api): migrating the AppConfig utility to mkdocstrings (#6008) by @leandrodamascena
- docs(api): migrating the idempotency utility to mkdocstrings (#6007) by @leandrodamascena
- docs(api): migrating the jmespath utility to mkdocstrings (#6006) by @leandrodamascena
- docs(api): migrating the parameters utility to mkdocstrings (#6005) by @leandrodamascena
- docs(api): migrating the parser utility to mkdocstrings (#6004) by @leandrodamascena
- docs(api): migrating the streaming utility to mkdocstrings (#6003) by @leandrodamascena
- docs(api): migrating the typing utility to mkdocstrings (#5996) by @leandrodamascena
- docs(api): migrating the validation utility to mkdocstrings (#5972) by @leandrodamascena
- docs(layer): update layer version number - v3.5.0 (#5952) by @leandrodamascena
🐛 Bug and hot fixes
- fix(logger): child logger must respect log level (#5950) by @leandrodamascena
- fix(docs): typo in a service name in Event Handler (#5944) by @anafalcao
🔧 Maintenance
- chore(deps-dev): bump ruff from 0.9.5 to 0.9.6 (#6066) by @dependabot[bot]
- chore(deps-dev): bump coverage from 7.6.10 to 7.6.11 (#6067) by @dependabot[bot]
- chore(deps-dev): bump mkdocs-material from 9.6.2 to 9.6.3 (#6065) by @dependabot[bot]
- chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions from 3.0.20 to 3.0.21 (#6064) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.36.14 to 1.36.16 (#6057) by @dependabot[bot]
- chore(deps): bump squidfunk/mkdocs-material from
7e841df
toc62453b
in /docs (#6052) by @dependabot[bot] - chore(deps-dev): bump mkdocstrings-python from 1.14.5 to 1.14.6 (#6050) by @dependabot[bot]
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.291 to 0.1.292 (#6051) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.36.14 to 1.36.15 (#6049) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.178.0a0 to 2.178.1a0 (#6048) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-lib from 2.178.0 to 2.178.1 (#6047) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk from 2.178.0 to 2.178.1 (#6053) by @dependabot[bot]
- chore(deps): bump docker/setup-qemu-action from 3.3.0 to 3.4.0 (#6043) by @dependabot[bot]
- chore(deps): bump docker/setup-buildx-action from 3.8.0 to 3.9.0 (#6042) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk from 2.177.0 to 2.178.0 (#6040) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.177.0a0 to 2.178.0a0 (#6041) by @dependabot[bot]
- chore(deps-dev): bump ruff from 0.9.4 to 0.9.5 (#6039) by @dependabot[bot]
- chore(deps-dev): bump aws-cdk-lib from 2.177.0 to 2.178.0 (#6038) by @dependabot[bot]
- chore(docs): enable privacy plugin in docs (#6036) by @dreamorosi
- chore(deps-dev): bump mypy from 1.14.1 to 1.15.0 (#6028) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.36.12 to 1.36.14 (#6029) by @dependabot[bot]
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.290 to 0.1.291 (#6031) by @dependabot[bot]
- chore(deps-dev): bump cfn-lint from 1.23.1 to 1.24.0 (#6030) by @dependabot[bot]
- chore(deps-dev): bump mkdocstrings-python from 1.14.4 to 1.14.5 (#6032) by @dependabot[bot]
- chore(ci): add new script to bump Lambda layer version (#6001) by @leandrodamascena
- chore(deps-dev): bump mkdocstrings-python from 1.14.2 to 1.14.4 (#6025) by @dependabot[bot]
- chore(ci): remove pdoc3 library (#6024) by @leandrodamascena
- chore(deps-dev): bump boto3-stubs from 1.36.10 to 1.36.12 (#6014) by @dependabot[bot]
- chore(deps-dev): bump boto3-stubs from 1.36.10 to 1.36.11 (#6010) by @dependabot[bot]
- chore(deps-dev): bump mkdocs-material from 9.6.1 to 9.6.2 (#6009) by @dependabot[bot]
- chore(deps-dev): bump mkdocstrings-python from 1.13.0 to 1.14.2 (#6011) by @dependabot[bot]
- chore(deps): bump squidfunk/mkdocs-material from
471695f
to7e841df
in /docs (#6012) by @dependabot[bot] - chore(deps): bump squidfunk/mkdocs-material from
41942f7
to471695f
in /docs (#5979) by @dependabot[bot] - chore(deps): bump actions/setup-go from 5.2.0 to 5.3.0 (#5978) by @dependabot[bot]
- chore(deps): bump pypa/gh-action-pypi-publish from 1.12.3 to 1.12.4 (#5980) by @dependabot[bot]
- chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions from 3.0.18 to 3.0.20 (#5977) by @dependabot[bot]
- chore(deps): bump release-drafter/release-drafter from 6.0.0 to 6.1.0 (#5976) by @[dependabot[bot]](https://github.com/apps/dependab...
v3.5.0
Summary
We're excited to introduce new features and improvements in this release:
- We have added new Event Source Data Classes for AWS Transfer Family
- Idempotency feature with support for custom key prefixes
- Context manager for logger keys, offering more flexible logging options
We also revamped the Data Source event class documentation and now we have more complete examples.
Thanks to @xdxindustries for helping us resolve a bug with OpenAPI and Pydantic Models' forward references.
⭐ Huge thanks to our new contributors: @kattakaha and @AlphaWong!
Working with AWS Transfer Family events
We've introduced new Event Source Data Classes to simplify custom identity provider authorizations in AWS Transfer Family, streamlining the process of constructing authorization responses for Lambda-based custom authorizers.
TransferFamilyAuthorizer
: Converts incoming events into structured objectsTransferFamilyAuthorizerResponse
: Facilitates building standardized authorization responses
Custom Idempotency Key Prefix Support
The @idempotent_function
and @idempotent
decorators now support an optional key_prefix
parameter, allowing you to define custom prefixes for idempotency keys. With this feature, you can implement cross-function idempotency, group related operations under a common prefix, and ensure your idempotency records remain stable during code refactoring or Lambda function renaming.
It allows you to override the default idempotency key prefix, which is typically a combination of Lambda function, module, and decorated function names. By specifying a custom prefix, you gain more control over the idempotency key structure.
Context Manager for Logger Keys
The Logger utility now includes an append_context_keys
context manager, allowing temporary addition of keys to the logger’s context within a with
statement. This simplifies the process of adding contextual information to logs in specific code blocks.
Changes
🌟New features and non-breaking changes
- feat(event_source): add AWS Transfer Family classes (#5912) by @leandrodamascena
- feat(parser): add AWS Transfer Family model (#5906) by @leandrodamascena
- feat(idempotency): add support for custom Idempotency key prefix (#5898) by @leandrodamascena
- feat(logger): add context manager for logger keys (#5883) by @anafalcao
📜 Documentation updates
- docs(parser): improve documentation with Pydantic best practices (#5925) by @AlphaWong
- docs(data_classes): improve Event Source Data Classes documentation (#5916) by @anafalcao
- docs(event_handler): demonstrate handling optional security routes (#5895) by @leandrodamascena
- docs(layer): update layer version number - v3.4.1 (#5869) by @leandrodamascena
🐛 Bug and hot fixes
- fix(event_handler): fixes typo in variable name
fronzen_openapi_extensions
(#5929) by @kattakaha - fix(event_handler): add tests for PEP 563 compatibility with OpenAPI (#5886) by @leandrodamascena
- fix(event_handler): fix forward references resolution in OpenAPI (#5885) by @xdxindustries
- fix(parser): make identitySource optional for ApiGatewayAuthorizerRequestV2 model (#5880) by @anafalcao
🔧 Maintenance
- chore(ci): adding poetry export plugin to support v2 (#5941) by @leandrodamascena
- chore(ci): adding poetry export plugin to support v2 (#5938) by @leandrodamascena
- chore(ci): update poetry version to v2 (#5936) by @leandrodamascena
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.289 to 0.1.290 (#5917) by @dependabot
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.176.0a0 to 2.177.0a0 (#5933) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.36.6 to 1.36.7 (#5932) by @dependabot
- chore(deps-dev): bump aws-cdk-lib from 2.176.0 to 2.177.0 (#5931) by @dependabot
- chore(deps-dev): bump aws-cdk from 2.176.0 to 2.177.0 (#5930) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.36.4 to 1.36.6 (#5923) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.36.4 to 1.36.5 (#5919) by @dependabot
- chore(deps-dev): bump pytest-asyncio from 0.24.0 to 0.25.2 (#5920) by @dependabot
- chore(deps): bump pydantic from 2.10.5 to 2.10.6 (#5918) by @dependabot
- chore(deps-dev): bump cfn-lint from 1.22.6 to 1.22.7 (#5910) by @dependabot
- chore(deps-dev): bump testcontainers from 3.7.1 to 4.9.1 (#5907) by @dependabot
- chore(deps-dev): bump pytest-benchmark from 4.0.0 to 5.1.0 (#5909) by @dependabot
- chore(deps-dev): bump ruff from 0.9.2 to 0.9.3 (#5911) by @dependabot
- chore(deps-dev): bump pytest-cov from 5.0.0 to 6.0.0 (#5908) by @dependabot
- chore(ci): drop support for Python 3.8 (#5896) by @leandrodamascena
- chore(deps-dev): bump cfn-lint from 1.22.5 to 1.22.6 (#5900) by @dependabot
- chore(ci): make
pyproject.toml
fully compatible with Poetryv2 (#5902) by @leandrodamascena - chore(deps-dev): bump boto3-stubs from 1.36.2 to 1.36.3 (#5894) by @dependabot
- chore(deps): bump squidfunk/mkdocs-material from
ba73db5
to41942f7
in /docs (#5890) by @dependabot - chore(deps-dev): bump mkdocs-material from 9.5.49 to 9.5.50 (#5889) by @dependabot
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.175.1a0 to 2.176.0a0 (#5882) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.36.1 to 1.36.2 (#5881) by @dependabot
- chore(deps-dev): bump aws-cdk from 2.175.1 to 2.176.0 (#5878) by @dependabot
- chore(deps-dev): bump ruff from 0.9.1 to 0.9.2 (#5877) by @dependabot
- chore(deps-dev): bump aws-cdk-lib from 2.175.1 to 2.176.0 (#5876) by @dependabot
- chore(deps-dev): bump mypy-boto3-appconfigdata from 1.35.93 to 1.36.0 in the boto-typing group (#5875) by @dependabot
- chore(deps-dev): bump sentry-sdk from 2.19.2 to 2.20.0 (#5870) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.97 to 1.35.99 (#5874) by @dependabot
- chore(deps-dev): bump cfn-lint from 1.22.4 to 1.22.5 (#5872) by @dependabot
- docs(layer): update layer version number - v3.4.1 (#5869) by @leandrodamascena
- chore(ci): adjust token permission (#5867) by @leandrodamascena
- chore(ci): fix permissions for gh pages (#5866) by @leandrodamascena
This release was made possible by the following contributors:
@AlphaWong, @anafalcao, @dependabot, @dependabot[bot], @github-actions, @github-actions[bot], @kattakaha, @leandrodamascena and @xdxindustries
v3.4.1
Summary
In this release we fixed a bug in the Idempotency utility when using Optional
types in output serialization.
🌟 ⭐ Thanks for @TonySherman for reporting this issue.
Using Optinal types in Idempotency serialization
Customers can now use Optional
type when serializing Idempotency response. Previously, using Optional
types in Idempotency serialization with Pydantic or Dataclasses caused serialization exception.
And last but not least, thanks to @aminalaee for reporting a bug in the resolver field naming in AppSync!
Changes
📜 Documentation updates
- docs(layer): update layer version number - v3.4.1 (#5869) by @leandrodamascena
- docs(community): data masking blog post (#5831) by @anafalcao
- docs(home): fix date typo and shorten message. (#5798) by @heitorlessa
- docs(layer): update layer version number - v3.4.0 (#5785) by @leandrodamascena
🐛 Bug and hot fixes
- fix(appsync): enhance consistency for custom resolver field naming in AppSync (#5801) by @leandrodamascena
- fix(idempotency): fix output serialization when using Optional type (#5590) by @leandrodamascena
🔧 Maintenance
- docs(layer): update layer version number - v3.4.1 (#5869) by @leandrodamascena
- chore(ci): adjust token permission (#5867) by @leandrodamascena
- chore(ci): fix permissions for gh pages (#5866) by @leandrodamascena
- chore(ci): change token permissions (#5865) by @leandrodamascena
- chore(deps-dev): bump ruff from 0.8.6 to 0.9.1 (#5853) by @dependabot
- chore(deps-dev): bump aws-cdk from 2.175.0 to 2.175.1 (#5863) by @dependabot
- chore(ci): change token permissions (#5862) by @leandrodamascena
- chore(ci): change token permissions / update aws-credentials action (#5861) by @leandrodamascena
- chore(ci): fix dependency resolution (#5859) by @leandrodamascena
- chore(ci): fix dependency resolution (#5858) by @leandrodamascena
- chore(deps-dev): bump aws-cdk-lib from 2.174.1 to 2.175.1 (#5856) by @dependabot
- chore(deps-dev): bump aws-cdk from 2.174.1 to 2.175.0 (#5854) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.96 to 1.35.97 (#5852) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.95 to 1.35.96 (#5850) by @dependabot
- chore(deps-dev): bump cfn-lint from 1.22.3 to 1.22.4 (#5849) by @dependabot
- chore(deps): bump pydantic from 2.10.4 to 2.10.5 (#5848) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.94 to 1.35.95 (#5847) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.288 to 0.1.289 (#5843) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.93 to 1.35.94 (#5844) by @dependabot
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.173.4a0 to 2.174.1a0 (#5842) by @dependabot
- chore(deps-dev): bump aws-cdk from 2.174.0 to 2.174.1 (#5841) by @dependabot
- chore(deps-dev): bump mypy-boto3-appconfigdata from 1.35.0 to 1.35.93 in the boto-typing group (#5840) by @dependabot
- chore(deps-dev): bump aws-cdk-lib from 2.173.4 to 2.174.1 (#5838) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.92 to 1.35.93 (#5835) by @dependabot
- chore(deps-dev): bump ruff from 0.8.4 to 0.8.6 (#5833) by @dependabot
- chore(deps-dev): bump aws-cdk from 2.173.4 to 2.174.0 (#5832) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.90 to 1.35.92 (#5827) by @dependabot
- chore(deps): bump pydantic-settings from 2.7.0 to 2.7.1 (#5815) by @dependabot
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.173.2a0 to 2.173.4a0 (#5811) by @dependabot
- chore(deps-dev): bump cfn-lint from 1.22.2 to 1.22.3 (#5810) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.89 to 1.35.90 (#5809) by @dependabot
- chore(deps-dev): bump mypy from 1.14.0 to 1.14.1 (#5812) by @dependabot
- chore(deps-dev): bump aws-cdk-lib from 2.173.2 to 2.173.4 (#5803) by @dependabot
- chore(deps-dev): bump aws-cdk from 2.173.2 to 2.173.4 (#5802) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.87 to 1.35.89 (#5804) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.287 to 0.1.288 (#5793) by @dependabot
- chore(deps-dev): bump jinja2 from 3.1.4 to 3.1.5 (#5788) by @dependabot
- chore(deps): bump jinja2 from 3.1.4 to 3.1.5 in /docs (#5787) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.86 to 1.35.87 (#5786) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.85 to 1.35.86 (#5780) by @dependabot
- chore(deps-dev): bump mypy from 1.13.0 to 1.14.0 (#5779) by @dependabot
This release was made possible by the following contributors:
@anafalcao, @dependabot, @dependabot[bot], @github-actions, @github-actions[bot], @heitorlessa and @leandrodamascena
v3.4.0
Summary
We are thrilled to announce support for querying Powertools Lambda layers ARN using SSM public parameters.
We also added support for API Gateway WebSocket events in the parser utility and added Lambda layer support in the AWS Malaysia region (ap-southeast-5).
Thanks to @tcysin, we have added deprecated
flag support when working with OpenAPI operations in the Event handler.
🌟 ⭐ Congratulations to our new contributors @TurnrDev and @tcysin for getting their first PR merged!
Using Powertools SSM public parameters
Customers can now retrieve the latest Powertools for AWS Lambda (Python) layer ARN for Python versions 3.8 through 3.13 on both x86_64 and arm64 architectures using AWS Systems Manager Parameter Store.
To do this, simply use the AWS CLI command aws ssm get-parameter
with the appropriate parameter name. For example, use /aws/service/powertools/python/<architecture>/<python_version>/latest
, replacing with either "x86_64" or "arm64", and <python_version> with your desired Python version (e.g., "python3.8", "python3.9", etc.).
New parser models
We have improved the Parser utility by adding support for events from API Gateway WebSocket.
Here are all the modules we have added for EventModel:
- APIGatewayWebSocketMessageEventModel - For WebSocket messages events
- APIGatewayWebSocketConnectEventModel - For WebSocket $connect events
- APIGatewayWebSocketDisconnectEventModel - For WebSocket $disconnect events
🚀 Thanks @ran-isenberg for another great contribution!
Using deprecated flag in the OpenAPI schema
You can now use the deprecated
flag in your OpenAPI schema to mark operations that are no longer recommended. This helps customers clarify which parts of your API should be avoided in favor of newer options.
Last but not least, thanks to @junkor-1011 for catching a bug in the Parser utility.
Changes
- refactor(event_handler): add type annotations for router decorators (#5601) by @rafrafek
- refactor(event_handler): add type annotations for
resolve
function (#5602) by @rafrafek
🌟New features and non-breaking changes
- feat(ssm): Parameters for resolving to versioned layers (#5754) by @sthulb
- feat(event_handler): mark API operation as deprecated for OpenAPI documentation (#5732) by @tcysin
- feat(layer): add new ap-southeast-5 region (#5769) by @sthulb
- feat(metrics): warn when overwriting dimension (#5653) by @anafalcao
- feat(parser): add models for API GW Websockets events (#5597) by @ran-isenberg
- feat(event_handler): add exception handling mechanism for AppSyncResolver (#5588) by @leandrodamascena
📜 Documentation updates
- fix(docs): typo in homepage extra dependencies command (#5681) by @TurnrDev
- feat(parser): add models for API GW Websockets events (#5597) by @ran-isenberg
- feat(event_source): Extend CodePipeline Artifact Capabilities (#5448) by @mw-root
- docs(layer): update layer version number - v3.3.0 (#5562) by @leandrodamascena
🐛 Bug and hot fixes
- fix(parser): remove AttributeError validation from event_parser function (#5742) by @anafalcao
- fix(ci): add overwrite to SSM workflow (#5775) by @sthulb
- fix(parser): remove 'aws:' prefix from SelfManagedKafka model (#5584) by @anafalcao
- fix(openapi): Allow values of any type in the examples of the Schema Object. (#5575) by @tonsho
🔧 Maintenance
- chore(ci): adding missing region in matrix (#5777) by @leandrodamascena
- chore(deps-dev): bump ruff from 0.8.3 to 0.8.4 (#5772) by @dependabot
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.173.1a0 to 2.173.2a0 (#5771) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.84 to 1.35.85 (#5770) by @dependabot
- chore(ci): disable dry run in layer balancing workflow (#5768) by @sthulb
- chore(deps-dev): bump aws-cdk-lib from 2.173.1 to 2.173.2 (#5759) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.81 to 1.35.84 (#5765) by @dependabot
- chore(deps): bump codecov/codecov-action from 5.1.1 to 5.1.2 (#5764) by @dependabot
- chore(deps): bump actions/upload-artifact from 4.4.3 to 4.5.0 (#5763) by @dependabot
- chore(deps): bump pydantic from 2.10.3 to 2.10.4 (#5760) by @dependabot
- chore(deps-dev): bump aws-cdk from 2.173.1 to 2.173.2 (#5762) by @dependabot
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.173.0a0 to 2.173.1a0 (#5755) by @dependabot
- chore(ci): add workflow to balance layers per region (#5752) by @sthulb
- chore(deps-dev): bump aws-cdk-lib from 2.173.0 to 2.173.1 (#5747) by @dependabot
- chore(deps-dev): bump mkdocs-material from 9.5.48 to 9.5.49 (#5748) by @dependabot
- chore(deps): bump docker/setup-buildx-action from 3.7.1 to 3.8.0 (#5744) by @dependabot
- chore(deps-dev): bump aws-cdk from 2.173.0 to 2.173.1 (#5745) by @dependabot
- chore(deps): bump squidfunk/mkdocs-material from
d485eb6
toba73db5
in /docs (#5746) by @dependabot - chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions from 3.0.17 to 3.0.18 (#5743) by @dependabot
- chore(deps-dev): bump cfn-lint from 1.22.1 to 1.22.2 (#5749) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.80 to 1.35.81 (#5750) by @dependabot
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.172.0a0 to 2.173.0a0 (#5736) by @dependabot
- chore(deps): bump pydantic-settings from 2.6.1 to 2.7.0 (#5735) by @dependabot
- chore(deps-dev): bump mkdocs-material from 9.5.47 to 9.5.48 (#5717) by @dependabot
- chore(deps-dev): bump aws-cdk-lib from 2.172.0 to 2.173.0 (#5731) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.78 to 1.35.80 (#5730) by @dependabot
- chore(deps-dev): bump cfn-lint from 1.22.0 to 1.22.1 (#5729) by @dependabot
- chore(deps-dev): bump ruff from 0.8.2 to 0.8.3 (#5728) by @dependabot
- chore(deps-dev): bump aws-cdk from 2.172.0 to 2.173.0 (#5727) by @dependabot
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.171.1a0 to 2.172.0a0 (#5724) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.77 to 1.35.78 (#5723) by @dependabot
- chore(deps-dev): bump cfn-lint from 1.21.0 to 1.22.0 (#5718) by @dependabot
- chore(deps-dev): bump aws-cdk-lib from 2.171.1 to 2.172.0 (#5719) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.76 to 1.35.77 (#5716) by @dependabot
- chore(deps-dev): bump cfn-lint from 1.20.2 to 1.21.0 (#5711) by @dependabot
- chore(deps): bump squidfunk/mkdocs-material from
3f571e7
tod485eb6
in /docs (#5710) by @dependabot - chore(deps-dev): bump aws-cdk from 2.171.1 to 2.172.0 (#5712) by @dependabot
- chore(deps): bump pypa/gh-action-pypi-publish from 1.12.2 to 1.12.3 (#5709) by @dependabot
- chore(deps): bump codecov/codecov-action from 5.1.0 to 5.1.1 (#5703) by @dependabot
- chore(deps-dev): bump httpx from 0.28.0 to 0.28.1 (#5702) by @dependabot
- chore(deps): bump redis from 5.2.0 to 5.2.1 (#5701) by @dependabot
- chore(deps-dev): bump types-python-dateutil from 2.9.0.20241003 to 2.9.0.20241206 (#5700) by @dependabot
- chore(deps-dev): bump sentry-sdk from 2.19.1 to 2.19.2 (#5699) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.285 to 0.1.287 (#5685) by @dependabot
- chore(deps-dev): bump sentry-sdk from 2.19.0 to 2.19.1 (#5694) by @dependabot
- chore(deps-dev): bump pytest from 8.3.3 to 8.3.4 (#5695) by @dependabot
- chore(deps): bump codecov/codecov-action from 5.0.7 to 5.1.0 (#5692) by @dependabot
- chore(deps-dev): bump ruff from 0.8.1 to 0.8.2 (#5693) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.71 to 1.35.74 (#5691) by @dependabot
- chore(deps-dev): bump cfn-lint from 1.20.1 to 1.20.2 (#5686) by @dependabot
- chore(deps): bump pydantic from 2.10.2 to 2.10.3 (#5682) by @dependabot
- chore(deps-dev): bump mkdocs-material from 9.5.46 to 9.5.47 (#5677) by @dependabot
- chore(deps-dev): bump ruff from 0.8.0 to 0.8.1 (#5671) by @dependabot
- chore(deps): bump fastjsonschema from 2.20.0 to 2.21.1 (#5676) by @dependabot
- chore(deps-dev): bump httpx from 0.27.2 to 0.28.0 (#5665) by @dependabot
- chore(deps): bump squidfunk/mkdocs-material from
d063d84
to3f571e7
in /docs (#5678) by @dependabot - chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.171.0a0 to 2.171.1a0 (#5666) by @dependabot
- chore(deps-dev): bump aws-cdk from 2.171.0 to 2.171.1 (#5662) by @dependabot
- chore(deps-dev): bump aws-cdk-lib from 2.171.0 to 2.171.1 (#5661) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.69 to 1.35.71 (#5660) by @dependabot
- chore(deps-dev): bump cfn-lint from 1.20.0 to 1.20.1 (#5659) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.284 to 0.1.285 (#5642) by @dependabot
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.170.0a0 to 2.171.0a0 (#5655) by @dependabot
- chore(deps): bump pydantic from 2.10.1 to 2.10.2 (#5654) by @dependabot
- chore(deps): bump squidfunk/mkdocs-material from
ef0b45e
tod063d84
in /docs (#5649) by @dependabot - chore(deps-dev): bump mkdocs-material from 9.5.45 to 9.5.46 (#5645) by @dependabot
- chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions from 3.0.16 to 3.0.17 (#5643) by @dependabot
- chore(deps-dev): bump aws-cdk-lib from 2.170.0 to 2.171.0 (#5647) by @dependabot
- chore(deps-dev): bump aws-cdk from 2.170.0 to 2.171.0 (#5648) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.67 to 1.35.6...
v3.3.0
Summary
In this release we added support for the newly released Python 3.13 AWS Lambda managed runtime 🚀.
We’ve also revamped the Parser documentation, and added MutualTLS scheme support when working with OpenAPI schemas and Event handler.
Oh hey, please welcome Ana as our new full-time maintainer - @anafalcao 🎉
🌟 ⭐ Congrats to our new contributor @Sector95 for getting their first PR merged.
Python 3.13 support
You can now use Powertools for AWS Lambda (Python) with the new Python 3.13 runtime in AWS Lambda.
We’ve partnered with the AWS Lambda team for this launch and have been testing our toolkit for the past few weeks to ensure compatibility with no changes from your side.
To start using Powertools for AWS with the new runtime, you can upgrade to this version via PyPi or use the latest version (v4) of our Lambda layers.
Parser documentation
In this release, we have improved the Parser documentation to include comprehensive examples of using this feature.
Kudos to @anafalcao for this work and for her first merged PR 👏
Using MutualTLS in the OpenAPI schema
Customers now can use MutualTLS security scheme when defining their OpenAPI schema with Event Handler.
Last but not least, thanks to @xkortex for catching a bug in the Parser utility.
Changes
🌟New features and non-breaking changes
- feat(runtime): add Python 3.13 support (#5527) by @leandrodamascena
- feat(layers): introduce new CDK Python constructor for Powertools Lambda Layer (#5320) by @leandrodamascena
- feat(event_handler): mutualTLS Security Scheme for OpenAPI (#5484) by @Sector95
📜 Documentation updates
- docs(layer): update layer version number - v3.3.0 (#5562) by @leandrodamascena
- docs(parser): change parser documentation (#5262) by @anafalcao
- docs(layer): update layer version number - v3.2.0 (#5426) by @leandrodamascena
🐛 Bug and hot fixes
- fix(metrics): add warning for invalid dimension values; prevent their addition to EMF blobs (#5542) by @leandrodamascena
- fix(parser): support TypeAdapter instances as models (#5535) by @leandrodamascena
- fix(parameters): fix force_fetch feature when working with get_parameters (#5515) by @leandrodamascena
- fix(appsync): make contextual data accessible for async functions (#5317) by @leandrodamascena
- fix(ci): Update output to something easily copy/pasteable (#5435) by @sthulb
- fix(ci): remove space (#5433) by @sthulb
🔧 Maintenance
- chore(ci): fix imports to build Lambda layer (#5557) by @leandrodamascena
- chore(ci): Bump CDK version to build layers and fix imports (#5555) by @leandrodamascena
- feat(runtime): add Python 3.13 support (#5527) by @leandrodamascena
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.279 to 0.1.281 (#5548) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.58 to 1.35.59 (#5549) by @dependabot
- chore(deps-dev): bump cfn-lint from 1.18.4 to 1.19.0 (#5544) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.56 to 1.35.58 (#5540) by @dependabot
- chore(deps-dev): bump ruff from 0.7.2 to 0.7.3 (#5532) by @dependabot
- chore(deps): bump actions/setup-python from 5.2.0 to 5.3.0 (#5529) by @dependabot
- chore(deps): bump actions/checkout from 4.2.0 to 4.2.2 (#5531) by @dependabot
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.165.0a0 to 2.166.0a0 (#5533) by @dependabot
- chore(deps): bump docker/setup-buildx-action from 2.4.1 to 3.7.1 (#5530) by @dependabot
- chore(deps): bump docker/setup-qemu-action from 2.1.0 to 3.2.0 (#5528) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.54 to 1.35.56 (#5523) by @dependabot
- chore(deps-dev): bump aws-cdk-lib from 2.165.0 to 2.166.0 (#5522) by @dependabot
- chore(deps-dev): bump aws-cdk from 2.165.0 to 2.166.0 (#5520) by @dependabot
- chore(deps): bump pypa/gh-action-pypi-publish from 1.12.1 to 1.12.2 (#5519) by @dependabot
- chore(deps): bump pypa/gh-action-pypi-publish from 1.11.0 to 1.12.1 (#5514) by @dependabot
- chore(deps): bump datadog-lambda from 6.100.0 to 6.101.0 (#5513) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.278 to 0.1.279 (#5512) by @dependabot
- chore(layers): add pydantic-settings package to v3 Layer (#5516) by @tkasuz
- chore(deps): bump squidfunk/mkdocs-material from
2c2802b
toce587cb
in /docs (#5507) by @dependabot - chore(deps-dev): bump mkdocs-material from 9.5.43 to 9.5.44 (#5506) by @dependabot
- chore(deps-dev): bump cfn-lint from 1.18.3 to 1.18.4 (#5501) by @dependabot
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.164.1a0 to 2.165.0a0 (#5500) by @dependabot
- chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions from 3.0.15 to 3.0.16 (#5499) by @dependabot
- chore(deps-dev): bump sentry-sdk from 2.17.0 to 2.18.0 (#5502) by @dependabot
- chore(deps-dev): bump ruff from 0.7.1 to 0.7.2 (#5492) by @dependabot
- chore(deps): bump datadog-lambda from 6.99.0 to 6.100.0 (#5491) by @dependabot
- chore(deps-dev): bump aws-cdk from 2.164.1 to 2.165.0 (#5494) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.53 to 1.35.54 (#5493) by @dependabot
- chore(deps-dev): bump aws-cdk-lib from 2.164.1 to 2.165.0 (#5490) by @dependabot
- chore(deps): bump squidfunk/mkdocs-material from
31eb7f7
to2c2802b
in /docs (#5487) by @dependabot - chore(deps-dev): bump mkdocs-material from 9.5.42 to 9.5.43 (#5486) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.52 to 1.35.53 (#5485) by @dependabot
- chore(deps-dev): bump cfn-lint from 1.18.2 to 1.18.3 (#5479) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.51 to 1.35.52 (#5478) by @dependabot
- chore(deps): bump pypa/gh-action-pypi-publish from 1.10.3 to 1.11.0 (#5477) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.49 to 1.35.51 (#5472) by @dependabot
- chore(deps): bump actions/dependency-review-action from 4.3.5 to 4.4.0 (#5469) by @dependabot
- chore(deps-dev): bump cfn-lint from 1.18.1 to 1.18.2 (#5468) by @dependabot
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.163.1a0 to 2.164.1a0 (#5467) by @dependabot
- chore(deps-dev): bump aws-cdk from 2.164.0 to 2.164.1 (#5462) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.46 to 1.35.49 (#5460) by @dependabot
- chore(deps-dev): bump aws-cdk-lib from 2.164.0 to 2.164.1 (#5459) by @dependabot
- chore(deps-dev): bump ruff from 0.7.0 to 0.7.1 (#5451) by @dependabot
- chore(deps-dev): bump aws-cdk-lib from 2.163.1 to 2.164.0 (#5453) by @dependabot
- chore(deps-dev): bump aws-cdk from 2.163.1 to 2.164.0 (#5452) by @dependabot
- chore(deps): bump redis from 5.1.1 to 5.2.0 (#5454) by @dependabot
- chore(deps): bump actions/setup-python from 5.2.0 to 5.3.0 (#5449) by @dependabot
- chore(deps): bump actions/setup-node from 4.0.4 to 4.1.0 (#5450) by @dependabot
- chore(ci): bump minimum required pydantic version (#5446) by @leandrodamascena
- chore(deps-dev): bump mypy from 1.11.2 to 1.13.0 (#5440) by @dependabot
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.162.1a0 to 2.163.1a0 (#5441) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.277 to 0.1.278 (#5439) by @dependabot
- chore(deps): bump actions/checkout from 4.2.1 to 4.2.2 (#5438) by @dependabot
- chore(deps-dev): bump aws-cdk-lib from 2.162.1 to 2.163.1 (#5429) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.45 to 1.35.46 (#5430) by @dependabot
- chore(deps-dev): bump aws-cdk from 2.162.1 to 2.163.1 (#5432) by @dependabot
- chore(deps): bump actions/dependency-review-action from 4.3.4 to 4.3.5 (#5431) by @dependabot
- chore(deps-dev): bump xenon from 0.9.1 to 0.9.3 (#5428) by @dependabot
This release was made possible by the following contributors:
@Sector95, @anafalcao, @dependabot, @dependabot[bot], @github-actions, @github-actions[bot], @leandrodamascena, @sthulb and @tkasuz
v3.2.0
Summary
We are thrilled to announce that Powertools for AWS Lambda (Python) now offers AWS Lambda layers in the AWS GovCloud (US) regions.
🌟 ⭐ Thanks to @SimonBFrank's amazing work, our Logger utility is now thread-safe when handling extra keys.
New AWS GovCloud (US) Lambda Layer ARNs
You can now use Powertools for AWS Lambda (Python) Lambda layers in the AWS GovCloud (US) regions, enhancing customer experience by making our pre-packaged Lambda layers available in this AWS partition.
To take advantage of the new layers, you need to update your functions or deployment setup to include one of the new Lambda layer ARN from the table below:
AWS GovCloud (us-gov-east-1)
Architecture | Layer ARN |
---|---|
x86_64 | arn:aws-us-gov:lambda:us-gov-east-1:165087284144:layer:AWSLambdaPowertoolsPythonV3-{python_version}-x86_64:{version} |
ARM | arn:aws-us-gov:lambda:us-gov-east-1:165087284144:layer:AWSLambdaPowertoolsPythonV3-{python_version}-arm64:{version} |
AWS GovCloud (us-gov-west-1)
Architecture | Layer ARN |
---|---|
x86_64 | arn:aws-us-gov:lambda:us-gov-west-1:165093116878:layer:AWSLambdaPowertoolsPythonV3-{python_version}-x86_64:{version} |
ARM | arn:aws-us-gov:lambda:us-gov-west-1:165093116878:layer:AWSLambdaPowertoolsPythonV3-{python_version}-arm64:{version} |
New thread-safe methods when working with extra keys in the Logger utility
Before this release, customers might have encountered issues when using append_keys
between thread executions.
You can now use new thread-safe methods for managing extra keys in the Logger utility, ensuring safe and efficient logging in concurrent environments.
Acknowledgements
Last but not least, we are thrilled to see our customers adopting v3, as it indicates we are moving in the right direction.
Changes
🌟New features and non-breaking changes
- feat(logger): add thread safe logging keys (#5141) by @SimonBFrank
- feat(ci): GovCloud Layer Workflow (#5261) by @sthulb
📜 Documentation updates
- docs(layer): update layer version number - v3.2.0 (#5426) by @leandrodamascena
- docs: Add GovCloud layer info (#5414) by @sthulb
- docs(examples): temporarily fix SAR version to v2.x (#5360) by @dreamorosi
- docs(event_handler): add Terraform payload info for API Gateway HTTP API (#5351) by @leandrodamascena
- docs(upgrade_guide): update Lambda layer name (#5347) by @leandrodamascena
- docs(layer): update layer version number (#5344) by @leandrodamascena
🐛 Bug and hot fixes
- fix(ci): Tables are nicer (#5416) by @sthulb
- fix(ci): GovCloud layer verification (#5382) by @sthulb
- fix: test command in verify step (#5381) by @sthulb
- fix(ci): Update partition name (#5380) by @sthulb
- fix(layer): update partition name in the GovCloud workflow (#5379) by @sthulb
🔧 Maintenance
- chore(deps-dev): bump cfn-lint from 1.17.2 to 1.18.1 (#5423) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.44 to 1.35.45 (#5421) by @dependabot
- chore(deps-dev): bump mkdocs-material from 9.5.41 to 9.5.42 (#5420) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.275 to 0.1.277 (#5419) by @dependabot
- chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions from 3.0.14 to 3.0.15 (#5418) by @dependabot
- chore(deps): bump squidfunk/mkdocs-material from
0d4e687
to31eb7f7
in /docs (#5417) by @dependabot - chore(ci): Add dump of govcloud layer info in verify step (#5415) by @sthulb
- chore(deps-dev): bump cfn-lint from 1.17.1 to 1.17.2 (#5408) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.43 to 1.35.44 (#5407) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.274 to 0.1.275 (#5406) by @dependabot
- chore(deps-dev): bump cfn-lint from 1.16.1 to 1.17.1 (#5404) by @dependabot
- chore(deps-dev): bump sentry-sdk from 2.16.0 to 2.17.0 (#5400) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.42 to 1.35.43 (#5402) by @dependabot
- chore(deps-dev): bump ruff from 0.6.9 to 0.7.0 (#5403) by @dependabot
- chore(deps-dev): bump mkdocs-material from 9.5.40 to 9.5.41 (#5393) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.41 to 1.35.42 (#5397) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.273 to 0.1.274 (#5394) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.39 to 1.35.41 (#5392) by @dependabot
- chore(deps): bump squidfunk/mkdocs-material from
f9cb76d
to0d4e687
in /docs (#5395) by @dependabot - chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.161.1a0 to 2.162.1a0 (#5386) by @dependabot
- chore(docs): remove layer callout from data masking docs (#5377) by @dreamorosi
- chore(deps-dev): bump aws-cdk-lib from 2.161.1 to 2.162.1 (#5371) by @dependabot
- chore(deps): bump actions/upload-artifact from 4.4.0 to 4.4.3 (#5373) by @dependabot
- chore(deps-dev): bump aws-cdk from 2.161.1 to 2.162.1 (#5372) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.38 to 1.35.39 (#5370) by @dependabot
- chore(deps): bump jsonpath-ng from 1.6.1 to 1.7.0 (#5369) by @dependabot
- chore(deps-dev): bump cfn-lint from 1.16.0 to 1.16.1 (#5363) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.37 to 1.35.38 (#5364) by @dependabot
- chore(deps-dev): bump mkdocs-material from 9.5.39 to 9.5.40 (#5365) by @dependabot
- chore(deps): bump squidfunk/mkdocs-material from
8e8b333
tof9cb76d
in /docs (#5366) by @dependabot - chore(deps): bump actions/upload-artifact from 4.4.1 to 4.4.3 (#5357) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.36 to 1.35.37 (#5356) by @dependabot
- chore(deps-dev): bump nox from 2024.4.15 to 2024.10.9 (#5355) by @dependabot
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.161.0a0 to 2.161.1a0 (#5349) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.35 to 1.35.36 (#5350) by @dependabot
- chore(deps-dev): bump sentry-sdk from 2.15.0 to 2.16.0 (#5348) by @dependabot
This release was made possible by the following contributors:
@SimonBFrank, @dependabot, @dependabot[bot], @dreamorosi, @github-actions, @github-actions[bot], @leandrodamascena and @sthulb
v3.1.0
Summary
We are excited to announce the first release following the v3 GA release. In this release we addressed a bug in the Parser utility as well as a regression in the naming of our public Lambda layers.
Thanks to @mw-root we added support for Event Source for CodeDeploy Lifecycle Hook.
🌟 ⭐ A big thank you to our new contributors: @emmanuel-ferdman, @garysassano and @mw-root.
Correct Naming for Powertools Lambda Layer x86_64
In our initial v3 release, we mistakenly named the x86_64
Lambda layer as x86
. We've corrected this issue in the current release, ensuring our Lambda layers now use the correct architecture naming convention.
For those who have already adopted the v3 Layer for this architecture, we recommend updating the ARN to use the new name using the table below as reference. The version of the Layer using the incorrect name will continue to be available but new releases, including this one, will follow the correct and updated naming convention.
Architecture | Python version | Layer ARN |
---|---|---|
x86_64 | 3.8 | arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python38-x86_64:{version} |
x86_64 | 3.9 | arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python39-x86_64:{version} |
x86_64 | 3.10 | arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python310-x86_64:{version} |
x86_64 | 3.11 | arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python311-x86_64:{version} |
x86_64 | 3.12 | arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-x86_64:{version} |
New CodeDeploy Lifecycle Hook Event Source Data Class
You can now use CodeDeployLifecycleHookEvent
for a better experience with type hinting and code completion support when working with AWS Lambda functions that process AWS CodeDeploy events.
Parser utility is now returning ValidationError
Before this release when parsing an event failed, we were catching the ValidationError
raised by Pydantic and re-raising it as an InvalidModelTypeError
.
We now raise the ValidationError
directly, allowing our customers to handle data validation errors more effectively.
Thanks for this important bug report @jhare-rectangle
Acknowledgements
Last but not least, we are thrilled to see our customers adopting v3, as it indicates we are moving in the right direction.
Changes
- refactor(examples): fix issues reported by SonarCloud and Scorecard (#5315) by @leandrodamascena
🌟New features and non-breaking changes
- feat(openapi): enable direct list input in Examples model (#5318) by @leandrodamascena
- feat(event_source): add CodeDeploy Lifecycle Hook event (#5219) by @mw-root
📜 Documentation updates
- docs(layer): update layer version number (#5344) by @leandrodamascena
- docs(upgrade_guide): update upgrade guide with Pydantic information (#5316) by @leandrodamascena
- docs(public_reference): add Flyweight as a public reference (#5322) by @leandrodamascena
- docs(metrics): fix test references (#5265) by @emmanuel-ferdman
- docs(versioning): add v2 maintainance mode banner (#5240) by @leandrodamascena
- docs(idempotency): fix description in
Advanced
table (#5191) by @garysassano - feat(event_source): add CodeDeploy Lifecycle Hook event (#5219) by @mw-root
- docs(v3): fix small things in the documentation (#5224) by @leandrodamascena
🐛 Bug and hot fixes
- fix(layer): reverting SSM parameter name (#5340) by @leandrodamascena
- fix(parser): fallback to
validate_python
when usingtype[Model]
and nested models (#5313) by @leandrodamascena - fix(ci): Layer Rename Fix (#5291) by @sthulb
- fix(ci): layer rename (#5283) by @sthulb
- fix(layers): rename Lambda layer name from x86 to x86_64 (#5226) by @sthulb
- fix(parser): revert a regression in v3 when raising ValidationError (#5259) by @leandrodamascena
- fix(idempotency): fix response hook invocation when function returns None (#5251) by @leandrodamascena
- fix(parser): make size and etag optional for LifecycleExpiration events in S3 (#5250) by @leandrodamascena
🔧 Maintenance
- chore(deps): bump datadog-lambda from 6.98.0 to 6.99.0 (#5333) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.34 to 1.35.35 (#5334) by @dependabot
- chore(deps-dev): bump aws-cdk-lib from 2.161.0 to 2.161.1 (#5335) by @dependabot
- chore(deps): bump actions/upload-artifact from 4.4.0 to 4.4.1 (#5328) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.272 to 0.1.273 (#5336) by @dependabot
- chore(deps): bump redis from 5.1.0 to 5.1.1 (#5331) by @dependabot
- chore(deps-dev): bump aws-cdk from 2.161.0 to 2.161.1 (#5327) by @dependabot
- chore(deps): bump actions/checkout from 4.2.0 to 4.2.1 (#5329) by @dependabot
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.160.0a0 to 2.161.0a0 (#5332) by @dependabot
- chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions from 3.0.13 to 3.0.14 (#5330) by @dependabot
- chore(deps-dev): bump cfn-lint from 1.15.2 to 1.16.0 (#5305) by @dependabot
- chore(deps-dev): bump ruff from 0.6.8 to 0.6.9 (#5308) by @dependabot
- chore(deps-dev): bump aws-cdk from 2.160.0 to 2.161.0 (#5309) by @dependabot
- chore(deps): bump pypa/gh-action-pypi-publish from 1.10.2 to 1.10.3 (#5311) by @dependabot
- chore(deps): bump docker/setup-buildx-action from 3.7.0 to 3.7.1 (#5310) by @dependabot
- chore(deps-dev): bump types-redis from 4.6.0.20240903 to 4.6.0.20241004 (#5307) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.33 to 1.35.34 (#5306) by @dependabot
- chore(deps-dev): bump aws-cdk-lib from 2.160.0 to 2.161.0 (#5304) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.271 to 0.1.272 (#5297) by @dependabot
- chore(deps): bump docker/setup-buildx-action from 3.6.1 to 3.7.0 (#5298) by @dependabot
- chore(deps-dev): bump types-python-dateutil from 2.9.0.20240906 to 2.9.0.20241003 (#5296) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.32 to 1.35.33 (#5295) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.31 to 1.35.32 (#5292) by @dependabot
- chore(deps-dev): bump sentry-sdk from 2.14.0 to 2.15.0 (#5285) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.29 to 1.35.31 (#5286) by @dependabot
- chore(deps): bump codecov/codecov-action from 4.5.0 to 4.6.0 (#5287) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.270 to 0.1.271 (#5284) by @dependabot
- chore(tests): fix e2e tests in Idempotency utility (#5280) by @leandrodamascena
- chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions from 3.0.12 to 3.0.13 (#5276) by @dependabot
- chore(deps-dev): bump cfn-lint from 1.15.1 to 1.15.2 (#5274) by @dependabot
- chore(deps-dev): bump multiprocess from 0.70.16 to 0.70.17 (#5275) by @dependabot
- chore(deps-dev): bump mkdocs-material from 9.5.38 to 9.5.39 (#5273) by @dependabot
- chore(deps): bump squidfunk/mkdocs-material from
7aea359
to8e8b333
in /docs (#5272) by @dependabot - chore(deps): bump redis from 5.0.8 to 5.1.0 (#5264) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.28 to 1.35.29 (#5263) by @dependabot
- chore(deps-dev): bump mkdocs-material from 9.5.37 to 9.5.38 (#5255) by @dependabot
- chore(deps-dev): bump ruff from 0.6.7 to 0.6.8 (#5254) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.27 to 1.35.28 (#5256) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.269 to 0.1.270 (#5257) by @dependabot
- chore(deps): bump squidfunk/mkdocs-material from
08fbf58
to7aea359
in /docs (#5253) by @dependabot - chore(docs): recreate requirements.txt file for mkdocs container (#5246) by @leandrodamascena
- chore(deps): bump actions/checkout from 4.1.7 to 4.2.0 (#5244) by @dependabot
- chore(deps-dev): bump boto3-stubs from 1.35.26 to 1.35.27 (#5242) by @dependabot
- chore(deps-dev): bump mkdocs-material from 9.5.36 to 9.5.37 (#5241) by @dependabot
- chore(deps): bump squidfunk/mkdocs-material from
22a429f
to08fbf58
in /docs (#5243) by @dependabot - chore(deps-dev): bump boto3-stubs from 1.35.25 to 1.35.26 (#5234) by @dependabot
- chore(deps-dev): bump aws-cdk from 2.159.1 to 2.160.0 (#5233) by @dependabot
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.159.1a0 to 2.160.0a0 (#5235) by @dependabot
- chore(deps-dev): bump aws-cdk-lib from 2.159.1 to 2.160.0 (#5230) by @dependabot
- chore(deps-dev): bump cfn-lint from 1.15.0 to 1.15.1 (#5232) by @dependabot
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.158.0a0 to 2.159.1a0 (#5231) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.268 to 0.1.269 (#5229) by @dependabot
- chore(deps): bump actions/setup-node from 4.0.3 to 4.0.4 (#5186) by @dependabot
- chore(deps-dev): bump aws-cdk-lib from 2.158.0 to 2.159.1 (#5208) by @dependabot
- chore(deps-dev): bump ruff from 0.6.4 to 0.6.7 (#5207) by @dependabot
- chore(deps-dev): bump aws-cdk from 2.157.0 to 2.159.1 (#5194) by @dependabot
- chore(deps): bump squidfunk/mkdocs-material from
a2e3a31
to22a429f
in /docs (#5201) by @dependabot - chore(deps): bump actions/download-artifact from 4.1.7 to 4.1.8 (#5203) by @dependabot
- chore(deps): bump docker/setup-qemu...