Releases: aws-powertools/powertools-lambda-python
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...
v3.0.0
Summary
We are super happy to announce our new major version – v3.0.0 🎉🎉!
We have made Pydantic v2 the default for Powertools for AWS Lambda (Python) utilities, this was the most requested feature from you. Pydantic v2 is the most impactful upgrade, offering better performance and greater flexibility compared to Pydantic v1.
The second most requested feature was publishing Powertools Lambda layers for different Python versions and architectures, allowing for easier integration across various Lambda environments. This is crucial for libraries like Pydantic v2 and AWS Encryption SDK, which are used by Powertools and require installation for specific architectures and Python version.
🌟 We couldn’t have done this without you 🌟
Thanks to everyone in the community for their patience and assistance as we've been working on this release. A special thanks to @ericbn for their amazing contributions to this milestone.
We care deeply about minimizing breaking changes
Over the past few months, we carefully selected each breaking change to make, and crafted an extensive upgrade guide to ease your transition to v3. Please let us know whether we can make your upgrade process easier.
Note
The section below is an excerpt of what's available in the Upgrade guide
What’s New in v3
- Drop support for Pydantic v1
- New AWS Lambda Layer ARNs
- New default values for Event Source Data Classes
- Headers are now case-insensitive in Event Handler
- Backwards incompatible changes
Drop support for Pydantic v1
We no longer support Pydantic v1 and have updated our toolkit to support only v2 of the library. We made this change after Pydantic v1 reached End-of-Life on June 2024.
Use the Pydantic v2 Migration Guide to migrate your custom Pydantic models to v2.
New AWS Lambda Layer ARNs
To give you a better experience, we're now building our public Powertools for AWS Lambda (Python)'s Lambda layers for specific Python versions (3.8-3.12) and architectures (x86_64
& arm64
).
With this change we can now include architecture-specific versions of both Pydantic v2 and AWS Encryption SDK and give you a more streamlined setup.
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:
Architecture | Python Version | Layer ARN |
---|---|---|
x86_64 | 3.8 | arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python38-x86:{version} |
x86_64 | 3.9 | arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python39-x86:{version} |
x86_64 | 3.10 | arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python310-x86:{version} |
x86_64 | 3.11 | arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python311-x86:{version} |
x86_64 | 3.12 | arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-x86:{version} |
arm64 | 3.8 | arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python38-arm64:{version} |
arm64 | 3.9 | arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python39-arm64:{version} |
arm64 | 3.10 | arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python310-arm64:{version} |
arm64 | 3.11 | arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python311-arm64:{version} |
arm64 | 3.12 | arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-arm64:{version} |
Event Source Data Classes default values
We have modified the Event Source Data classes so optional dictionaries and lists now return empty dictionaries or lists instead of None
. This improvement simplifies your code by eliminating the need for conditional checks when accessing these fields, while maintaining backward compatibility with previous implementations.
Event Handler: headers are case-insensitive
According to the HTTP RFC, HTTP headers must be case-insensitive. As a result, we have deprecated the get_header_value
function to align with this standard. Instead, we recommend using app.current_event.headers.get
to access header values directly.
Consequently, the case_sensitive
parameter in this function no longer has any effect, as we now ensure consistent casing by normalizing headers for you. This function will be removed in a future release, and we encourage you to adopt the new method to access header values.
Backwards incompatible changes
Area | Change | Code Change Required |
---|---|---|
Pydantic | We have removed support for Pydantic v1 | No |
Parser | We have eplaced DynamoDBStreamModel AttributeValue with native Python types |
Yes |
Lambda Layer | Lambda layers are now compiled according to the specific Python version and architecture | No |
Event Handler | Headers are case-insensitive, and we have deprecated the get_header_value function. |
Yes |
Batch Processor | @batch_processor and @async_batch_processor decorators are now deprecated |
Yes |
Event Source Data Classes | We have updated default values for optional fields. | Yes |
Parameters | The default cache TTL is now set to 5 minutes | No |
Parameters | The config parameter is deprecated in favor of boto_config |
Yes |
JMESPath Functions | The extract_data_from_envelope function is deprecated in favor of query |
Yes |
Types File | We have removed the type imports from the shared/types.py file |
Yes |
This release was made possible by the following contributors:
@ericbn, @github-actions, @github-actions[bot], @sthulb, and @leandrodamascena
v2.43.1
Summary
The regression issue caused by PR #4863 has been resolved in this patch release. The issue occurred when working with zero numbers in the Data Source utility's DynamoDBStreamEvent class.
Changes
🌟New features and non-breaking changes
🐛 Bug and hot fixes
- fix(event_source): fix regression when working with zero numbers in DynamoDBStreamEvent (#4932) by @leandrodamascena
🔧 Maintenance
- chore(deps): bump datadog-lambda from 6.97.0 to 6.98.0 (#4938) by @dependabot
- chore(deps-dev): bump mypy-boto3-s3 from 1.34.138 to 1.34.158 in the boto-typing group (#4936) by @dependabot
- chore(deps-dev): bump cfn-lint from 1.9.6 to 1.9.7 (#4923) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.238 to 0.1.242 (#4922) by @dependabot
- chore(deps-dev): bump mypy-boto3-ssm from 1.34.132 to 1.34.158 in the boto-typing group (#4921) by @dependabot
- chore(deps-dev): bump cfn-lint from 1.9.5 to 1.9.6 (#4916) by @dependabot
- chore(deps-dev): bump ruff from 0.5.6 to 0.5.7 (#4918) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.234 to 0.1.238 (#4917) by @dependabot
This release was made possible by the following contributors:
@dependabot, @dependabot[bot], @github-actions, @github-actions[bot], @leandrodamascena, @sthulb and @tlinhart
v2.43.0
Summary
This release improves the Validation utility, which now returns the validated data, including default values.
We have improved the Metrics utility, which now can emit metrics using the None unit. We have also fixed a bug in Event Source for Amazon DynamoDB Streams when using numbers with more than 38 digits.
🌟 ⭐ A big thank you to our new contributors: @dracozombie19, and @avonengel
Retrieving validated JSON from validate function
The validate function now returns the validated JSON, including any default values.
Last but least, thank to @miikka, @aminalaee and @ethantkoenig for raising issues.
Changes
- refactor(tracer): make capture_lambda_handler type more generic (#4796) by @aminalaee
🌟New features and non-breaking changes
- feat(metrics): add unit None for CloudWatch EMF Metrics (#4904) by @sthulb
- feat(validation): returns output from validate function (#4839) by @dracozombie19
📜 Documentation updates
- docs(public_reference): add CHS Inc. as a public reference (#4885) by @leandrodamascena
- docs(public_reference): add LocalStack as a public reference (#4858) by @leandrodamascena
- docs(event_handler): fix the field type in the comment (#4832) by @avonengel
- docs(public_reference): add Caylent as a public reference (#4822) by @leandrodamascena
🐛 Bug and hot fixes
🔧 Maintenance
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.233 to 0.1.234 (#4909) by @dependabot
- chore(deps): bump actions/upload-artifact from 4.3.5 to 4.3.6 (#4901) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.231 to 0.1.233 (#4900) by @dependabot
- chore(deps-dev): bump types-redis from 4.6.0.20240726 to 4.6.0.20240806 (#4899) by @dependabot
- chore(deps-dev): bump cfn-lint from 1.9.3 to 1.9.5 (#4890) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.230 to 0.1.231 (#4891) by @dependabot
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.150.0a0 to 2.151.0a0 (#4889) by @dependabot
- chore(deps-dev): bump coverage from 7.6.0 to 7.6.1 (#4888) by @dependabot
- chore(deps): bump golang.org/x/sync from 0.7.0 to 0.8.0 in /layer/scripts/layer-balancer in the layer-balancer group (#4892) by @dependabot
- refactor(test): make CORS test consistent with expected behavior (#4882) by @Wurstnase
- chore(deps-dev): bump mypy-boto3-cloudwatch from 1.34.83 to 1.34.153 in the boto-typing group (#4887) by @dependabot
- chore(deps-dev): bump black from 24.4.2 to 24.8.0 (#4873) by @dependabot
- chore(deps-dev): bump aws-cdk from 2.150.0 to 2.151.0 (#4872) by @dependabot
- chore(deps-dev): bump ruff from 0.5.5 to 0.5.6 (#4874) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.228 to 0.1.230 (#4876) by @dependabot
- chore(deps-dev): bump aws-cdk-lib from 2.150.0 to 2.151.0 (#4875) by @dependabot
- chore(deps): bump actions/upload-artifact from 4.3.4 to 4.3.5 (#4871) by @dependabot
- chore(deps-dev): bump mkdocs-material from 9.5.30 to 9.5.31 (#4877) by @dependabot
- chore(deps): bump squidfunk/mkdocs-material from
257eca8
to9919d6e
in /docs (#4878) by @dependabot - chore(deps-dev): bump cfn-lint from 1.9.1 to 1.9.3 (#4866) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.224 to 0.1.228 (#4867) by @dependabot
- chore(deps-dev): bump sentry-sdk from 2.11.0 to 2.12.0 (#4861) by @dependabot
- chore(deps): bump redis from 5.0.7 to 5.0.8 (#4854) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.223 to 0.1.224 (#4855) by @dependabot
- chore(deps-dev): bump mypy-boto3-logs from 1.34.66 to 1.34.151 in the boto-typing group (#4853) by @dependabot
- chore(deps-dev): bump cfn-lint from 1.8.2 to 1.9.1 (#4851) by @dependabot
- chore(deps): bump docker/setup-buildx-action from 3.5.0 to 3.6.1 (#4844) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.222 to 0.1.223 (#4843) by @dependabot
- chore(maintenance): add Banxware customer refernece (#4841) by @dreamorosi
- chore(deps-dev): bump pytest from 8.3.1 to 8.3.2 (#4824) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.219 to 0.1.222 (#4836) by @dependabot
- chore(deps): bump ossf/scorecard-action from 2.3.3 to 2.4.0 (#4829) by @dependabot
- chore(deps-dev): bump types-redis from 4.6.0.20240425 to 4.6.0.20240726 (#4831) by @dependabot
- chore(deps-dev): bump ruff from 0.5.4 to 0.5.5 (#4823) by @dependabot
This release was made possible by the following contributors:
@Wurstnase, @aminalaee, @avonengel, @dependabot, @dependabot[bot], @dracozombie19, @dreamorosi, @github-actions, @github-actions[bot], @leandrodamascena and @sthulb
v2.42.0
Summary
This release adds support for OpenAPI extensions to help you describe functionality beyond the OpenAPI Spec.
We also made tons of improvements in the Idempotency docs based on customers feedback on navigation, examples, and limitations.
🌟 ⭐ Huge thanks to everyone who helped in this release, specially @bertpl for crushing a bug in the Idempotency feature.
Working with OpenAPI extensions
You can now define extensions using the openapi_extensions
parameter. This unblocks a common use case in defining Amazon API Gateway extensions like Authorizers, Integrations, etc.
Idempotency revamped docs
Based on customer feedback at the Serverless Days ANZ, we improved all code snippets, made navigation more granular, and split DynamoDB vs Redis persistence storage (Infra vs Runtime).
We also made it more explicit everywhere that Idempotency is bound to a particular time window (1h by default) that you can adjust.
Changes
🌟New features and non-breaking changes
- feat(event_handler): add OpenAPI extensions (#4703) by @leandrodamascena
📜 Documentation updates
- docs(public_reference): add Caylent as a public reference (#4822) by @leandrodamascena
- docs(idempotency): improve navigation, wording, and new section on guarantees (#4613) by @heitorlessa
🐛 Bug and hot fixes
🔧 Maintenance
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.212 to 0.1.219 (#4817) by @dependabot
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.148.1a0 to 2.150.0a0 (#4813) by @dependabot
- chore(deps-dev): bump mkdocs-material from 9.5.29 to 9.5.30 (#4807) by @dependabot
- chore(deps-dev): bump sentry-sdk from 2.10.0 to 2.11.0 (#4815) by @dependabot
- chore(deps-dev): bump mypy-boto3-dynamodb from 1.34.131 to 1.34.148 in the boto-typing group (#4812) by @dependabot
- chore(deps-dev): bump aws-cdk from 2.149.0 to 2.150.0 (#4805) by @dependabot
- chore(docs): Add lambda layer policy to versioning docs (#4811) by @hjgraca
- chore(deps-dev): bump aws-cdk-lib from 2.148.1 to 2.150.0 (#4806) by @dependabot
- chore(deps-dev): bump pytest from 8.2.2 to 8.3.1 (#4799) by @dependabot
- chore(deps): bump docker/setup-qemu-action from 3.1.0 to 3.2.0 (#4800) by @dependabot
- chore(deps): bump docker/setup-buildx-action from 3.4.0 to 3.5.0 (#4801) by @dependabot
- chore(deps-dev): bump ruff from 0.5.3 to 0.5.4 (#4798) by @dependabot
- chore(logger): use package logger over source logger to reduce noise (#4793) by @heitorlessa
- chore(deps-dev): bump cfn-lint from 1.8.1 to 1.8.2 (#4788) by @dependabot
- chore(deps-dev): bump mypy-boto3-secretsmanager from 1.34.128 to 1.34.145 in the boto-typing group (#4787) by @dependabot
- chore(deps): bump aws-actions/closed-issue-message from 8b6324312193476beecf11f8e8539d73a3553bf4 to 80edfc24bdf1283400eb04d20a8a605ae8bf7d48 (#4786) by @dependabot
- chore(deps-dev): bump ruff from 0.5.2 to 0.5.3 (#4781) by @dependabot
- chore(deps-dev): bump cfn-lint from 1.6.1 to 1.8.1 (#4780) by @dependabot
- chore(deps-dev): bump pytest-asyncio from 0.23.7 to 0.23.8 (#4776) by @dependabot
- chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.27.26 to 1.27.27 in /layer/scripts/layer-balancer in the layer-balancer group (#4779) by @dependabot
- chore(deps): bump datadog-lambda from 6.96.0 to 6.97.0 (#4770) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.211 to 0.1.212 (#4769) by @dependabot
- chore(deps-dev): bump mkdocs-material from 9.5.28 to 9.5.29 (#4764) by @dependabot
- chore(deps-dev): bump aws-cdk from 2.148.0 to 2.149.0 (#4765) by @dependabot
- chore(deps-dev): bump ruff from 0.5.1 to 0.5.2 (#4762) by @dependabot
- chore(deps-dev): bump sentry-sdk from 2.9.0 to 2.10.0 (#4763) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.207 to 0.1.211 (#4760) by @dependabot
- chore(deps): bump actions/dependency-review-action from 4.3.3 to 4.3.4 (#4753) by @dependabot
- chore(deps-dev): bump cfn-lint from 1.6.0 to 1.6.1 (#4751) by @dependabot
- chore(deps-dev): bump cfn-lint from 1.5.3 to 1.6.0 (#4747) by @dependabot
- chore(deps-dev): bump coverage from 7.5.4 to 7.6.0 (#4746) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.206 to 0.1.207 (#4748) by @dependabot
- chore(deps): bump the layer-balancer group in /layer/scripts/layer-balancer with 3 updates (#4745) by @dependabot
This release was made possible by the following contributors:
@dependabot, @dependabot[bot], @github-actions, @github-actions[bot], @heitorlessa, @hjgraca, @leandrodamascena and @sthulb
v2.41.0
Summary
This release enhances the Batch Processing feature, which you can now customize to not throw an error when the entire batch of items fails to process.
We have also added three new Pydantic models to our Parser feature to work with authorizers in Amazon API Gateway.
Thanks to @adriantomas, customers can bring their own boto3 client when using Feature Flags feature.
🌟 ⭐ A big thank you to everyone who helped make this release.
Working with full batch failures
You can now set the raise_on_entire_batch_failure
option to False
to prevent the Batch Processing utility from throwing a BatchProcessingError
, when all records in a batch fail to process. This is useful when working with functions that handle batches with a small number of records, or when you use errors as a flow control mechanism.
New Parser models
You can now use the new Pydantic models to validate payloads originating from authorization events in REST and HTTP APIs.
Here are all the modules we've added:
- ApiGatewayAuthorizerToken - For REST API Authorizer events using Token
- ApiGatewayAuthorizerRequest - For REST API Authorizer events using Request
- ApiGatewayAuthorizerRequestV2 - For HTTP API Authorizer events using Request
Customizing boto3 client configuration for Feature Flags
You can now bring your own boto3 client instance when using Feature Flags. This is ideal when you want to reuse or customize the appconfigdata
client.
Last but not least, thanks to @Wurstnase for helping us to fix a bug when using CORS in the Event Handler feature.
Changes
🌟New features and non-breaking changes
- feat(feature_flags): allow customers to bring their own boto3 client and session (#4717) by @adriantomas
- feat(batch): add option to not raise
BatchProcessingError
exception when the entire batch fails (#4719) by @leandrodamascena - feat(parser): add support for API Gateway Lambda authorizer events (#4718) by @leandrodamascena
📜 Documentation updates
- docs(public_reference): add BusPatrol as a public reference (#4713) by @leandrodamascena
- docs(i-made-this): Bedrock agents with Powertools for AWS Lambda (#4705) by @ran-isenberg
🐛 Bug and hot fixes
- fix(event_handler): make the max_age attribute comply with RFC specification (#4731) by @leandrodamascena
- fix(event_handler): disable allow-credentials header when origin allow_origin is * (#4638) by @sthulb
- fix(event_handler): convert null body to empty string in ALBResolver to avoid HTTP 502 (#4683) by @heitorlessa
- fix(event_handler): custom serializer recursive values when using data validation (#4664) by @heitorlessa
- fix(event_handler): current_event regression AppSyncResolver Router (#4652) by @leandrodamascena
🔧 Maintenance
- chore(layers): downgrade aws cdk to 2.145.0 (#4739) by @leandrodamascena
- chore(deps-dev): bump sentry-sdk from 2.8.0 to 2.9.0 (#4735) by @dependabot
- chore(deps-dev): bump cfn-lint from 1.5.2 to 1.5.3 (#4734) by @dependabot
- chore(deps): bump actions/setup-python from 5.1.0 to 5.1.1 (#4732) by @dependabot
- chore(deps): bump the layer-balancer group in /layer/scripts/layer-balancer with 3 updates (#4733) by @dependabot
- chore(deps-dev): bump cfn-lint from 1.5.1 to 1.5.2 (#4724) by @dependabot
- chore(deps): bump actions/setup-node from 4.0.2 to 4.0.3 (#4725) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.202 to 0.1.205 (#4723) by @dependabot
- chore(deps-dev): bump zipp from 3.17.0 to 3.19.1 in /layer (#4721) by @dependabot
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.147.3a0 to 2.148.0a0 (#4722) by @dependabot
- chore(deps): bump zipp from 3.17.0 to 3.19.1 in /docs (#4720) by @dependabot
- chore(deps-dev): bump aws-cdk-lib from 2.147.3 to 2.148.0 (#4710) by @dependabot
- chore(deps-dev): bump aws-cdk from 2.147.3 to 2.148.0 (#4708) by @dependabot
- chore(deps-dev): bump cfn-lint from 1.5.0 to 1.5.1 (#4711) by @dependabot
- chore(deps-dev): bump sentry-sdk from 2.7.1 to 2.8.0 (#4712) by @dependabot
- chore(deps): bump certifi from 2024.6.2 to 2024.7.4 (#4700) by @dependabot
- chore(deps-dev): bump ruff from 0.5.0 to 0.5.1 (#4697) by @dependabot
- chore(deps): bump actions/upload-artifact from 4.3.3 to 4.3.4 (#4698) by @dependabot
- chore(deps): bump actions/download-artifact from 4.1.7 to 4.1.8 (#4699) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.201 to 0.1.202 (#4696) by @dependabot
- chore(deps): bump docker/setup-buildx-action from 3.3.0 to 3.4.0 (#4693) by @dependabot
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.147.2a0 to 2.147.3a0 (#4686) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.200 to 0.1.201 (#4687) by @dependabot
- chore(deps): bump docker/setup-qemu-action from 3.0.0 to 3.1.0 (#4685) by @dependabot
- chore(deps-dev): bump cfn-lint from 1.4.2 to 1.5.0 (#4675) by @dependabot
- chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.27.23 to 1.27.24 in /layer/scripts/layer-balancer in the layer-balancer group (#4684) by @dependabot
- chore: Add token to codecov action (#4682) by @hjgraca
- chore(deps-dev): bump aws-cdk-lib from 2.147.2 to 2.147.3 (#4674) by @dependabot
- chore(deps-dev): bump mkdocs-material from 9.5.27 to 9.5.28 (#4676) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.199 to 0.1.200 (#4677) by @dependabot
- chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions from 3.0.9 to 3.0.10 (#4678) by @dependabot
- chore(deps-dev): bump aws-cdk from 2.147.2 to 2.147.3 (#4672) by @dependabot
- chore(deps-dev): bump mypy-boto3-s3 from 1.34.120 to 1.34.138 in the boto-typing group (#4673) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.198 to 0.1.199 (#4668) by @dependabot
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.147.1a0 to 2.147.2a0 (#4667) by @dependabot
- chore(deps-dev): bump cfn-lint from 1.4.1 to 1.4.2 (#4660) by @dependabot
- chore(deps-dev): bump aws-cdk-lib from 2.147.1 to 2.147.2 (#4661) by @dependabot
- chore(deps): bump the layer-balancer group in /layer/scripts/layer-balancer with 3 updates (#4659) by @dependabot
- chore(deps-dev): bump aws-cdk from 2.147.1 to 2.147.2 (#4657) by @dependabot
- chore(deps-dev): bump ruff from 0.4.10 to 0.5.0 (#4644) by @dependabot
- chore(deps-dev): bump cfn-lint from 1.3.7 to 1.4.1 (#4646) by @dependabot
- chore(deps-dev): bump sentry-sdk from 2.7.0 to 2.7.1 (#4645) by @dependabot
This release was made possible by the following contributors:
@adriantomas, @dependabot, @dependabot[bot], @github-actions, @github-actions[bot], @heitorlessa, @hjgraca, @leandrodamascena, @ran-isenberg and @sthulb
v2.40.0
Summary
We're excited to announce Batch resolvers in GraphQL Event Handler to tackle the infamous N+1 problem in GraphQL 💪, making it easier to work with batching in AWS AppSync.
Thanks to @danieljnchen, the validation utility now supports referencing internal schemas within your JSON files. 🌟
🌟 ⭐ A big thank you to our new contributors: @scampbell5, @matteofigus, and @danieljnchen.
Batch resolvers in Event Handler GraphQL
You can now use a batch resolver to handle batch requests coming from AWS AppSync. This is useful when AWS AppSync has batching enabled for Lambda Resolvers as it allows the aggregation of as many requests as possible before invoking your AWS Lambda function, effectively solving the N+1 problem in GraphQL.
Validation feature now supports custom handlers
You can now control JSON schema references with custom handlers. This is useful when you might want to optimize caching, reducing HTTP calls, or fetching them from non-HTTP endpoints.
Last but not least, @scampbell5 helps us fix the types for partition
and offset
in the KafkaEventRecord
Event Source Data Class.
Changes
🌟New features and non-breaking changes
- feat(event-handler): add appsync batch resolvers (#1998) by @mploski
- feat(validation): support JSON Schema referencing in validation utils (#4508) by @danieljnchen
📜 Documentation updates
- feat(event-handler): add appsync batch resolvers (#1998) by @mploski
- docs(public reference): add Brsk as a public reference (#4597) by @leandrodamascena
- docs(homepage): Fix homepage link (#4587) by @matteofigus
- docs(i-made-this): add new article about best practices for accelerating serverless development (#4518) by @ran-isenberg
🐛 Bug and hot fixes
- fix(event_sources): change partition and offset field types in KafkaEventRecord (#4515) by @scampbell5
🔧 Maintenance
- chore(layers): downgrade aws cdk to 2.145.0 (#4640) by @leandrodamascena
- chore(deps-dev): bump cfn-lint from 1.3.5 to 1.3.7 (#4634) by @dependabot
- chore(deps): bump the layer-balancer group in /layer/scripts/layer-balancer with 2 updates (#4635) by @dependabot
- feat(event-handler): add appsync batch resolvers (#1998) by @mploski
- chore(deps-dev): bump mypy-boto3-ssm from 1.34.91 to 1.34.132 in the boto-typing group (#4623) by @dependabot
- chore(deps-dev): bump cfn-lint from 1.3.3 to 1.3.5 (#4628) by @dependabot
- chore(deps-dev): bump filelock from 3.15.3 to 3.15.4 (#4626) by @dependabot
- chore(deps-dev): bump mypy from 1.10.0 to 1.10.1 (#4624) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.194 to 0.1.198 (#4627) by @dependabot
- chore(deps-dev): bump mike from 2.1.1 to 2.1.2 (#4616) by @dependabot
- chore(deps-dev): bump pdoc3 from 0.10.0 to 0.11.0 (#4618) by @dependabot
- chore(deps-dev): bump aws-cdk-lib from 2.147.0 to 2.147.1 (#4615) by @dependabot
- chore(deps-dev): bump coverage from 7.5.3 to 7.5.4 (#4617) by @dependabot
- chore(deps-dev): bump aws-cdk from 2.147.0 to 2.147.1 (#4614) by @dependabot
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.146.0a0 to 2.147.0a0 (#4619) by @dependabot
- chore(deps-dev): bump cfn-lint from 1.3.0 to 1.3.3 (#4602) by @dependabot
- chore(deps-dev): bump aws-cdk-lib from 2.146.0 to 2.147.0 (#4603) by @dependabot
- chore(deps-dev): bump aws-cdk from 2.146.0 to 2.147.0 (#4604) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.193 to 0.1.194 (#4601) by @dependabot
- chore(deps-dev): bump ruff from 0.4.9 to 0.4.10 (#4594) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.192 to 0.1.193 (#4596) by @dependabot
- chore(deps): bump pydantic from 1.10.16 to 1.10.17 (#4595) by @dependabot
- chore(deps): bump pypa/gh-action-pypi-publish from 1.8.14 to 1.9.0 (#4592) by @dependabot
- chore(deps-dev): bump mypy-boto3-dynamodb from 1.34.114 to 1.34.131 in the boto-typing group (#4593) by @dependabot
- chore(ci): introduce daily pre-releases (#4535) by @heitorlessa
- chore(ci): add the Batch Processor feature to nox tests (#4586) by @leandrodamascena
- chore(ci): add the Idempotency feature to nox tests (#4585) by @leandrodamascena
- chore(ci): add the Parser feature to nox tests (#4584) by @leandrodamascena
- chore(ci): add the Data Class feature to nox tests (#4583) by @leandrodamascena
- chore(ci): add the Event Handler feature to nox tests (#4581) by @leandrodamascena
- chore(ci): add the Streaming feature to nox tests (#4575) by @leandrodamascena
- chore(deps): bump the layer-balancer group in /layer/scripts/layer-balancer with 3 updates (#4580) by @dependabot
- chore(deps-dev): bump filelock from 3.15.1 to 3.15.3 (#4576) by @dependabot
- chore(deps-dev): bump cfn-lint from 0.87.7 to 1.3.0 (#4577) by @dependabot
- chore(deps-dev): bump sentry-sdk from 2.5.1 to 2.6.0 (#4579) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.189 to 0.1.192 (#4578) by @dependabot
- chore(ci): add the Data Masking feature to nox tests (#4574) by @leandrodamascena
- chore(ci): add the Typing feature to nox tests (#4572) by @leandrodamascena
- chore(ci): add the Validation feature to nox tests (#4571) by @leandrodamascena
- chore(ci): add the Feature Flags feature to nox tests (#4570) by @leandrodamascena
- chore(ci): add the Parameters feature to nox tests (#4569) by @leandrodamascena
- chore(ci): add the Middleware Factory feature to nox tests (#4568) by @leandrodamascena
- chore(ci): add the Tracer feature to nox tests (#4567) by @leandrodamascena
- chore(ci): add the Metrics feature to nox tests (#4552) by @leandrodamascena
- chore(deps-dev): bump hvac from 2.2.0 to 2.3.0 (#4563) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.188 to 0.1.189 (#4564) by @dependabot
- chore(deps): bump the layer-balancer group in /layer/scripts/layer-balancer with 3 updates (#4565) by @dependabot
- chore(ci): introduce tests with Nox (#4537) by @leandrodamascena
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.184 to 0.1.188 (#4550) by @dependabot
- chore(deps-dev): bump mkdocs-material from 9.5.26 to 9.5.27 (#4544) by @dependabot
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.145.0a0 to 2.146.0a0 (#4542) by @dependabot
- chore(deps-dev): bump urllib3 from 1.26.18 to 1.26.19 in /layer (#4547) by @dependabot
- chore(deps): bump fastjsonschema from 2.19.1 to 2.20.0 (#4543) by @dependabot
- chore(deps): bump squidfunk/mkdocs-material from
96abcbb
to257eca8
in /docs (#4540) by @dependabot - chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions from 3.0.7 to 3.0.9 (#4539) by @dependabot
- chore(deps): bump pypa/gh-action-pypi-publish from 1.8.14 to 1.9.0 (#4538) by @dependabot
- chore(deps-dev): bump mypy-boto3-secretsmanager from 1.34.125 to 1.34.128 in the boto-typing group (#4541) by @dependabot
- chore(deps): bump the layer-balancer group in /layer/scripts/layer-balancer with 3 updates (#4546) by @dependabot
- chore(governance): fix errors when creating Gitpod environment (#4532) by @leandrodamascena
- chore(deps-dev): bump ruff from 0.4.8 to 0.4.9 (#4528) by @dependabot
- chore(deps-dev): bump aws-cdk-lib from 2.145.0 to 2.146.0 (#4526) by @dependabot
- chore(deps): bump redis from 5.0.5 to 5.0.6 (#4527) by @dependabot
- chore(deps-dev): bump aws-cdk from 2.145.0 to 2.146.0 (#4525) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.182 to 0.1.184 (#4529) by @dependabot
- chore(deps-dev): bump bandit from 1.7.8 to 1.7.9 (#4511) by @dependabot
- chore(deps-dev): bump cfn-lint from 0.87.6 to 0.87.7 (#4513) by @dependabot
- chore(deps-dev): bump filelock from 3.14.0 to 3.15.1 (#4512) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.179 to 0.1.182 (#4510) by @dependabot
- chore(deps): bump codecov/codecov-action from 4.4.1 to 4.5.0 (#4514) by @dependabot
- chore(deps-dev): bump mypy-boto3-secretsmanager from 1.34.109 to 1.34.125 in the boto-typing group (#4509) by @dependabot
This release was made possible by the following contributors:
@danieljnchen, @dependabot, @dependabot[bot], @github-actions, @github-actions[bot], @heitorlessa, @leandrodamascena, @matteofigus, @mploski, @ran-isenberg and @scampbell5
v2.39.1
Summary
The regression issue caused by PR #4421 is resolved in this patch release. The issue occurred due to static typing importing Pydantic, as it went undetected in our pipeline and code review.
To prevent from happening again, we will introduce dynamic tests for all optional dependencies. We will pause new releases until that is implemented and verified. For further improvement, we will look into making daily pre-releases to help create more complex canary tests.
Changes
🐛 Bug and hot fixes
- fix(event_handler): regression making pydantic required (it should not) (#4500) by @leandrodamascena
This release was made possible by the following contributors:
@github-actions, @github-actions[bot] and @leandrodamascena
v2.39.0
Summary
This release improves Event Handler with (a) better serialization error for unsupported data types, and (b) middlewares are now triggered when a route is not found (404). We also crushed OpenAPI bugs for a smoother experience 🪲.
Thanks to @knightmre, Event Source Data Classes now features (a) updates Cognito User Pool User Migration event with verification link, and (b) new Pre-token generation and custom sender events.
🌟 ⭐ A big thank you to our new contributors: @knightmre, @phipag, @keithrozario, and @stevenhoelscher.
Event Handler middlewares are now triggered even when a route is not found (404)
You can now run middlewares even when a route is not found. Before, Event Handler immediately returned a HTTP 404 (Not Found). However, we learned from customers that key middleware logic should always run regardless, hence the fix.
This allows you to consistently perform cross-cutting concerns like logging, header injection, authorization, etc. even for invalid routes.
New CloudFormation Custom Resource Event Source Data Class
You can now use CloudFormationCustomResourceEvent
for a better experience with type hinting and code completion support.
NOTE. We recommend customers to use CloudFormation Custom Resource Helper library to author custom resources.
Better error message for unsupported data types in Event Handler
We now raise a SerializationError
when trying to serialize unsupported data types. Before, Event Handler did not distinguish between unsupported type or object altogether, like SQLAlchemy models.
You can bring your own custom serializer for additional data type support.
Last but not least, we fixed an issue that occurred when disabling Idempotency using an environment variable. Thanks to @stevenhoelscher for this great catch.
Changes
🌟New features and non-breaking changes
- feat(events): Update and Add Cognito User Pool Events (#4423) by @knightmre
- feat(event_source): add CloudFormationCustomResourceEvent data class. (#4342) by @phipag
📜 Documentation updates
- docs(public reference): add Recast as a public reference (#4491) by @leandrodamascena
- feat(events): Update and Add Cognito User Pool Events (#4423) by @knightmre
- feat(event_source): add CloudFormationCustomResourceEvent data class. (#4342) by @phipag
- docs(homepage): Change installation to CDK v2 (#4351) by @keithrozario
🐛 Bug and hot fixes
- fix(event_handler): do not skip middleware and exception handlers on 404 error (#4492) by @heitorlessa
- fix(event_handler): raise more specific SerializationError exception for unsupported types in data validation (#4415) by @leandrodamascena
- fix(event_handler): security scheme unhashable list when working with router (#4421) by @leandrodamascena
- fix(idempotency): POWERTOOLS_IDEMPOTENCY_DISABLED should respect truthy values (#4391) by @stevenhoelscher
- fix(event_handler): CORS Origin for ALBResolver multi-headers (#4385) by @leandrodamascena
🔧 Maintenance
- chore(deps): bump actions/checkout from 4.1.6 to 4.1.7 (#4493) by @dependabot
- chore(deps-dev): bump cfn-lint from 0.87.5 to 0.87.6 (#4486) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.176 to 0.1.179 (#4488) by @dependabot
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.144.0a0 to 2.145.0a0 (#4487) by @dependabot
- chore(deps): bump datadog-lambda from 6.95.0 to 6.96.0 (#4489) by @dependabot
- chore(deps): bump pydantic from 1.10.15 to 1.10.16 (#4485) by @dependabot
- chore(deps-dev): bump aws-cdk-lib from 2.144.0 to 2.145.0 (#4481) by @dependabot
- chore(deps-dev): bump aws-cdk from 2.144.0 to 2.145.0 (#4482) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.175 to 0.1.176 (#4480) by @dependabot
- chore(deps-dev): bump cfn-lint from 0.87.4 to 0.87.5 (#4479) by @dependabot
- chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions from 3.0.6 to 3.0.7 (#4478) by @dependabot
- chore(deps-dev): bump sentry-sdk from 2.5.0 to 2.5.1 (#4469) by @dependabot
- chore(deps): bump typing-extensions from 4.12.1 to 4.12.2 (#4470) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.174 to 0.1.175 (#4472) by @dependabot
- chore(deps): bump datadog-lambda from 5.94.0 to 6.95.0 (#4471) by @dependabot
- chore(deps): bump the layer-balancer group in /layer/scripts/layer-balancer with 3 updates (#4468) by @dependabot
- chore(deps-dev): bump ijson from 3.2.3 to 3.3.0 (#4465) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.173 to 0.1.174 (#4466) by @dependabot
- chore(deps): bump redis from 5.0.4 to 5.0.5 (#4464) by @dependabot
- chore(deps-dev): bump mkdocs-material from 9.5.25 to 9.5.26 (#4463) by @dependabot
- chore(deps-dev): bump sentry-sdk from 2.4.0 to 2.5.0 (#4462) by @dependabot
- chore(deps): bump squidfunk/mkdocs-material from
8a87f05
to96abcbb
in /docs (#4461) by @dependabot - chore(deps-dev): bump ruff from 0.4.7 to 0.4.8 (#4455) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.169 to 0.1.173 (#4459) by @dependabot
- chore(deps): bump actions/dependency-review-action from 4.3.2 to 4.3.3 (#4456) by @dependabot
- chore(deps): bump aws-xray-sdk from 2.13.1 to 2.14.0 (#4453) by @dependabot
- chore(deps-dev): bump mypy-boto3-s3 from 1.34.105 to 1.34.120 in the boto-typing group (#4452) by @dependabot
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.143.1a0 to 2.144.0a0 (#4448) by @dependabot
- chore(deps-dev): bump sentry-sdk from 2.3.1 to 2.4.0 (#4449) by @dependabot
- chore(deps-dev): bump pytest from 8.2.1 to 8.2.2 (#4450) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.164 to 0.1.169 (#4442) by @dependabot
- chore(deps-dev): bump aws-cdk-lib from 2.143.1 to 2.144.0 (#4441) by @dependabot
- chore(deps-dev): bump aws-cdk from 2.143.1 to 2.144.0 (#4443) by @dependabot
- chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions from 3.0.5 to 3.0.6 (#4445) by @dependabot
- chore(deps): bump the layer-balancer group in /layer/scripts/layer-balancer with 3 updates (#4444) by @dependabot
- chore(deps): bump typing-extensions from 4.12.0 to 4.12.1 (#4440) by @dependabot
- chore(deps-dev): bump ruff from 0.4.6 to 0.4.7 (#4435) by @dependabot
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.143.0a0 to 2.143.1a0 (#4433) by @dependabot
- chore(deps-dev): bump aws-cdk-lib from 2.143.0 to 2.143.1 (#4429) by @dependabot
- chore(deps-dev): bump aws-cdk from 2.143.0 to 2.143.1 (#4430) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.163 to 0.1.164 (#4428) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.161 to 0.1.163 (#4425) by @dependabot
- chore(libraries): add jmespath as a required dependency (#4422) by @leandrodamascena
- chore(deps-dev): bump ruff from 0.4.5 to 0.4.6 (#4417) by @dependabot
- chore(deps-dev): bump cfn-lint from 0.87.3 to 0.87.4 (#4419) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.159 to 0.1.161 (#4420) by @dependabot
- chore(deps-dev): bump coverage from 7.5.2 to 7.5.3 (#4418) by @dependabot
- chore(deps-dev): bump mypy-boto3-dynamodb from 1.34.113 to 1.34.114 in the boto-typing group (#4416) by @dependabot
- chore(deps-dev): bump mkdocs-material from 9.5.24 to 9.5.25 (#4411) by @dependabot
- chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.142.1a0 to 2.143.0a0 (#4410) by @dependabot
- chore(deps-dev): bump mypy-boto3-dynamodb from 1.34.97 to 1.34.113 in the boto-typing group (#4409) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.158 to 0.1.159 (#4412) by @dependabot
- chore(deps-dev): bump coverage from 7.5.1 to 7.5.2 (#4413) by @dependabot
- chore(deps): bump squidfunk/mkdocs-material from
5358893
to8a87f05
in /docs (#4408) by @dependabot - chore(deps): bump typing-extensions from 4.11.0 to 4.12.0 (#4404) by @dependabot
- chore(deps-dev): bump aws-cdk-lib from 2.142.1 to 2.143.0 (#4403) by @dependabot
- chore(deps-dev): bump aws-cdk from 2.142.1 to 2.143.0 (#4402) by @dependabot
- chore(deps-dev): bump ruff from 0.4.4 to 0.4.5 (#4399) by @dependabot
- chore(deps-dev): bump sentry-sdk from 2.2.1 to 2.3.1 (#4398) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.157 to 0.1.158 (#4397) by @dependabot
- chore(deps): bump the layer-balancer group in /layer/scripts/layer-balancer with 2 updates (#4396) by @dependabot
- chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.155 to 0.1.157 (#4394) by @dependabot
- chore(deps): bump aws-encryption-sdk from 3.2.0 to 3.3.0 (#4393) by @dependabot
- chore...