Skip to content

Releases: aws-powertools/powertools-lambda-python

v3.11.0

25 Apr 15:27
Compare
Choose a tag to compare

Summary

We are excited to announce a new integration for Event Handler to work with AWS AppSync Events APIs. This utility provides a structured way to handle AppSync real-time events through dedicated handler methods, automatic routing, and flexible configuration options.

Our Event Handler REST API now supports customizable HTTP error codes per route. Thanks for this contribution @amin-farjadi.

Additionally, our Data masking utility now supports a broader range of types including Pydantic models, dataclasses, and standard Python classes - an outstanding contribution from @VatsalGoel3.

⭐ Huge thanks to @GuidoNebiolo, @kazu728, @victorperezpiqueras, and @konokenj for their contributions in this release.

New Event Handler for AppSync Events feature

Docs

The new AppSyncEventsResolver is designed to streamline working with AWS AppSync real-time APIs by:

  • Handling publish and subscribe events with dedicated handler methods
  • Routing events automatically based on namespace and channel patterns
  • Supporting wildcard patterns for catch-all handlers
  • Processing events in parallel (async) or sequentially
  • Controlling event aggregation for batch processing
  • Implementing graceful error handling

Working with publish events

You can register handlers for publish events using @app.on_publish() to process and validate messages before they're broadcasted to subscribers. This is useful to modify payload content, apply business logic, and reject messages when needed.

publish

Working with subscribe events

You can use @app.on_subscribe() to handle subscription requests before allowing clients to listen to specific channels. This enables authorization checks and subscription filtering based on client context or payload attributes, s well as subscription tracking, for example.

subscribe

Working with aggregated processing

You can use the parameter aggregate=True to process multiple events together as a batch. This is useful when you need to optimize database operations, or want to have full control over how the messages are processed, for example.

aggregate

AppSync Events FAQs

Q: Can I handle different types of events from the same channel?
A: Yes, you can register different handlers for publish and subscribe events on the same channel.

Q: How does handler precedence work with wildcard patterns?
A: More specific patterns take precedence over wildcards. For example, /default/channel1 will be chosen over /default/*, which will be chosen over /*.

Q: What happens when an exception occurs in my handler?
A: With individual processing (aggregate=False), the utility catches exceptions and includes them in the response for the specific event while still processing other events. You can also explicitly raise an UnauthorizedException exception to reject the entire request.

Q: Can I process events asynchronously?
A: Yes, use the @app.async_on_publish() decorator for asynchronous processing of events.

Q: Does the order of async event processing matter?
A: No, AppSync Events doesn't guarantee delivery order. As long as each response includes the original event ID, AppSync processes them correctly regardless of order.

Q: Can I process multiple events as a batch?
A: Yes, set aggregate=True to receive all matching events as a batch in your handler.

Changes

🌟New features and non-breaking changes

📜 Documentation updates

🐛 Bug and hot fixes

  • fix(parser): make key attribute optional in Kafka model (#6523) by @Weugene
  • fix(logger): warn customers when the ALC log level is less verbose than log buffer (#6509) by @anafalcao

🔧 Maintenance

Read more

v3.10.0

08 Apr 14:41
Compare
Choose a tag to compare

Summary

This release introduces a new built-in model AppSyncResolverEventModel for the Parser utility, enabling structured parsing and validation of AWS AppSync Resolver events using Pydantic.

It also improves the developer experience when logging with exc_info=True by updating the logic to check if an actual exception exists before adding exception-related keys to the log.

Fixes missing properties for query string parameters in APIGatewayWebSocketEvent class, and the return type of a parameter in TransferFamilyAuthorizerResponse.

⭐ Huge thanks to @VatsalGoel3, @dave-dotnet-overall and @fabien-github!

Built-in model AppSync Resolver for Parser

Docs

Enables structured parsing and validation of AWS AppSync Resolver events using Pydantic. The schema supports fields such as arguments, identity, source, request, info, prev, and stash, covering all standard AppSync resolver context attributes.

image

Changes

🌟New features and non-breaking changes

📜 Documentation updates

🐛 Bug and hot fixes

🔧 Maintenance

This release was made possible by the following contributors:

@VatsalGoel3, @dave-dotnet-overall, @dependabot[bot], @fabien-github, @github-actions[bot], @leandrodamascena, dependabot[bot] and github-actions[bot]

v3.9.0

25 Mar 13:44
Compare
Choose a tag to compare

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

Docs

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.

validation

Working with API Gateway WebSocket events

Docs

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.

data_apigw

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

📜 Documentation updates

🐛 Bug and hot fixes

🔧 Maintenance

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

07 Mar 13:32
Compare
Choose a tag to compare

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

Docs

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, and DEBUG levels
  • Automatically flush logs on error or manually as needed
  • Reduce CloudWatch costs by decreasing the number of emitted log messages

buffer1

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.

buffer3

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

📜 Documentation updates

  • docs(layer): Fix SSM parameter name for looking up layer ARN (#6221) by @speshak

🐛 Bug and hot fixes

🔧 Maintenance

This release was made possible by the following contr...

Read more

v3.7.0

25 Feb 12:57
Compare
Choose a tag to compare

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

Docs

We have improved the Parser utility by adding support for events from IoT Core Registry Events

parser (1)

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

Docs

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.

openapi

Using Logger custom handlers

Docs

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.

logger

Changes

🌟New features and non-breaking changes

📜 Documentation updates

🐛 Bug and hot fixes

  • fix(parser): fix data types for sourceIPAddress and sequencer 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

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

11 Feb 13:50
Compare
Choose a tag to compare

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

Docs

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

data_masking_new

Disable flushing metrics using environment variables

Docs

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.

image

Support for API Gateway Authorizer Response WebSocket

Docs

You can now use the new APIGatewayAuthorizerResponseWebSocket class to handle authorization policies for WebSocket APIs.

image

Clearing all appended keys with clear_state() method

Docs

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.

image

Changes

🌟New features and non-breaking changes

📜 Documentation updates

🐛 Bug and hot fixes

🔧 Maintenance

Read more

v3.5.0

28 Jan 17:21
Compare
Choose a tag to compare

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

Docs

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 objects
  • TransferFamilyAuthorizerResponse: Facilitates building standardized authorization responses

image

Custom Idempotency Key Prefix Support

Docs

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.

image

Context Manager for Logger Keys

Docs

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.

image

Changes

🌟New features and non-breaking changes

📜 Documentation updates

🐛 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

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

14 Jan 21:59
Compare
Choose a tag to compare

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

Docs

Customers can now use Optional type when serializing Idempotency response. Previously, using Optional types in Idempotency serialization with Pydantic or Dataclasses caused serialization exception.

image

And last but not least, thanks to @aminalaee for reporting a bug in the resolver field naming in AppSync!

Changes

📜 Documentation updates

🐛 Bug and hot fixes

🔧 Maintenance

This release was made possible by the following contributors:

@anafalcao, @dependabot, @dependabot[bot], @github-actions, @github-actions[bot], @heitorlessa and @leandrodamascena

v3.4.0

20 Dec 19:11
Compare
Choose a tag to compare

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

Docs

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

Docs

We have improved the Parser utility by adding support for events from API Gateway WebSocket.

image

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

Docs

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.

image

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

🐛 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 to ba73db5 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 to d485eb6 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 to 3f571e7 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 to d063d84 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...
Read more

v3.3.0

14 Nov 19:42
Compare
Choose a tag to compare

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

Docs

In this release, we have improved the Parser documentation to include comprehensive examples of using this feature.

image

Kudos to @anafalcao for this work and for her first merged PR 👏

Using MutualTLS in the OpenAPI schema

Docs

Customers now can use MutualTLS security scheme when defining their OpenAPI schema with Event Handler.

mutual

Last but not least, thanks to @xkortex for catching a bug in the Parser utility.

Changes

🌟New features and non-breaking changes

📜 Documentation updates

🐛 Bug and hot fixes

🔧 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 to ce587cb 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 to 2c2802b 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