Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(event_handler): Add new EventHandler for Async Lambda #5799

Draft
wants to merge 141 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
141 commits
Select commit Hold shift + click to select a range
3859bc7
impl
sinofseven Dec 27, 2024
c579416
fix mypy, and test aws_config_rule.py
sinofseven Jan 5, 2025
d476008
fix SonarCloud Code Analysis on sns.py
sinofseven Jan 5, 2025
996babd
fix import order
sinofseven Jan 6, 2025
202146c
add test for cloud_watch_alarm.py
sinofseven Jan 6, 2025
898d849
add test for cloud watch logs
sinofseven Jan 6, 2025
afb585b
add test for code_deploy_lifecycle_hook.py
sinofseven Jan 7, 2025
fbf1c6b
add test for event_bridge.py
sinofseven Jan 8, 2025
5d6222f
fix S3Route
sinofseven Jan 9, 2025
fbb521f
fix unit test for aws_config_fule.py
sinofseven Jan 14, 2025
e94d3eb
fix implement for cloud_watch_alarm.py
sinofseven Jan 14, 2025
5077704
fix implement for cloud_watch_logs.py
sinofseven Jan 14, 2025
0e567cc
fix implement for event_bridge.py
sinofseven Jan 14, 2025
8589ff0
fix implement for ses.py
sinofseven Jan 14, 2025
3ebac85
fix test for cloud_watch_alarm.py
sinofseven Jan 14, 2025
2154812
fix test for aws_config_rule.py
sinofseven Jan 14, 2025
e7a91b0
fix implement for sns.py
sinofseven Jan 16, 2025
5424c78
add test for cloud_watch_alarm.py
sinofseven Jan 16, 2025
fe8b0cf
add test for other event file
sinofseven Jan 24, 2025
2563d7e
fix test for cloud_watch_alarm.py
sinofseven Jan 24, 2025
9357d69
fix test for cloud_watch_logs
sinofseven Jan 24, 2025
2fdeba6
fix test for code_deploy_lifecycle_hook.py
sinofseven Jan 24, 2025
112df0e
Merge branch 'develop' into impl-prototype-async-execution-resolver
leandrodamascena Jan 28, 2025
d1e7cb8
fix test for event_bridge.py
sinofseven Jan 24, 2025
31b9daf
add test for s3.py
sinofseven Feb 13, 2025
0a59646
chore(ci): adding poetry export plugin to support v2 (#5941)
leandrodamascena Jan 28, 2025
67616a8
chore(ci): bump version to 3.5.0 (#5942)
github-actions[bot] Jan 28, 2025
bcd5108
fix(docs): typo in a service name in Event Handler (#5944)
anafalcao Jan 28, 2025
fd5c548
chore(ci): new pre-release 3.5.1a0 (#5945)
github-actions[bot] Jan 29, 2025
9b9acb2
chore(ci): changelog rebuild (#5946)
github-actions[bot] Jan 29, 2025
6539bd0
fix(logger): child logger must respect log level (#5950)
leandrodamascena Jan 29, 2025
77fcd8e
docs(layer): update layer version number - v3.5.0 (#5952)
leandrodamascena Jan 29, 2025
446c2ab
chore(ci): new pre-release 3.5.1a1 (#5954)
github-actions[bot] Jan 30, 2025
79d35f3
chore(ci): changelog rebuild (#5955)
github-actions[bot] Jan 30, 2025
d9b802d
chore(deps): bump actions/setup-python from 5.3.0 to 5.4.0 (#5960)
dependabot[bot] Jan 30, 2025
e05ac9b
chore(ci): install & configure mkdocstrings plugin (#5959)
leandrodamascena Jan 30, 2025
0080d20
chore(deps): bump docker/setup-qemu-action from 3.2.0 to 3.3.0 (#5961)
dependabot[bot] Jan 30, 2025
0d064a9
chore(deps): bump codecov/codecov-action from 5.1.2 to 5.3.1 (#5964)
dependabot[bot] Jan 31, 2025
8b7b5ad
chore(deps-dev): bump mkdocs-material from 9.5.50 to 9.6.1 (#5966)
dependabot[bot] Jan 31, 2025
9d903a8
chore(deps): bump actions/setup-node from 4.1.0 to 4.2.0 (#5963)
dependabot[bot] Jan 31, 2025
34f8fe9
chore(deps): bump actions/upload-artifact from 4.5.0 to 4.6.0 (#5962)
dependabot[bot] Jan 31, 2025
c8c9659
chore(deps-dev): bump isort from 5.13.2 to 6.0.0 (#5965)
dependabot[bot] Jan 31, 2025
9241d15
chore(ci): new pre-release 3.5.1a2 (#5970)
github-actions[bot] Jan 31, 2025
cf8c37d
chore(deps-dev): bump cfn-lint from 1.22.7 to 1.23.1 (#5967)
dependabot[bot] Jan 31, 2025
23052b6
chore(ci): changelog rebuild (#5971)
github-actions[bot] Jan 31, 2025
61226c3
chore(deps-dev): bump ruff from 0.9.3 to 0.9.4 (#5969)
dependabot[bot] Jan 31, 2025
5e72d58
chore(deps-dev): bump black from 24.10.0 to 25.1.0 (#5968)
dependabot[bot] Jan 31, 2025
bc89c72
docs(api): migrating the validation utility to mkdocstrings (#5972)
leandrodamascena Jan 31, 2025
18dbb1d
feat(logger): add clear_state method (#5956)
anafalcao Jan 31, 2025
1cbf760
chore(deps): bump aws-actions/configure-aws-credentials from 4.0.2 to…
dependabot[bot] Jan 31, 2025
e151756
chore(deps): bump release-drafter/release-drafter from 6.0.0 to 6.1.0…
dependabot[bot] Feb 1, 2025
03fa7b3
chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions …
dependabot[bot] Feb 1, 2025
dada25c
chore(deps): bump pypa/gh-action-pypi-publish from 1.12.3 to 1.12.4 (…
dependabot[bot] Feb 1, 2025
6593e40
chore(deps): bump actions/setup-go from 5.2.0 to 5.3.0 (#5978)
dependabot[bot] Feb 1, 2025
827d055
chore(deps): bump squidfunk/mkdocs-material from `41942f7` to `471695…
dependabot[bot] Feb 1, 2025
88613e3
chore(ci): changelog rebuild (#5981)
github-actions[bot] Feb 1, 2025
544ebb1
chore(ci): changelog rebuild (#5982)
github-actions[bot] Feb 2, 2025
6c11d3a
chore(ci): new pre-release 3.5.1a3 (#5998)
github-actions[bot] Feb 3, 2025
38084d9
chore(ci): changelog rebuild (#5999)
github-actions[bot] Feb 3, 2025
f83e284
docs(api): migrating the typing utility to mkdocstrings (#5996)
leandrodamascena Feb 3, 2025
4ecde43
refactor(metrics): Improve type annotations for metrics decorator (#6…
leandrodamascena Feb 3, 2025
bf4c978
docs(api): migrating the streaming utility to mkdocstrings (#6003)
leandrodamascena Feb 3, 2025
f855a4f
docs(api): migrating the parser utility to mkdocstrings (#6004)
leandrodamascena Feb 3, 2025
d6eccc7
docs(api): migrating the parameters utility to mkdocstrings (#6005)
leandrodamascena Feb 3, 2025
afaf573
docs(api): migrating the jmespath utility to mkdocstrings (#6006)
leandrodamascena Feb 3, 2025
32d93bc
docs(api): migrating the idempotency utility to mkdocstrings (#6007)
leandrodamascena Feb 3, 2025
a11dbc1
docs(api): migrating the AppConfig utility to mkdocstrings (#6008)
leandrodamascena Feb 3, 2025
fa20223
chore(deps): bump squidfunk/mkdocs-material from `471695f` to `7e841d…
dependabot[bot] Feb 3, 2025
682319e
chore(deps-dev): bump mkdocstrings-python from 1.13.0 to 1.14.2 (#6011)
dependabot[bot] Feb 3, 2025
6fcb307
chore(deps-dev): bump mkdocs-material from 9.6.1 to 9.6.2 (#6009)
dependabot[bot] Feb 3, 2025
fbeae55
chore(deps-dev): bump boto3-stubs from 1.36.10 to 1.36.11 (#6010)
dependabot[bot] Feb 3, 2025
111c3e4
docs(api): migrating the data masking utility to mkdocstrings (#6013)
leandrodamascena Feb 3, 2025
90302ef
chore(deps-dev): bump boto3-stubs from 1.36.10 to 1.36.12 (#6014)
dependabot[bot] Feb 3, 2025
e93b244
docs(api): migrating the event source data classes utility to mkdocst…
leandrodamascena Feb 3, 2025
d8263ad
feat(openapi): enhance support for tuple return type validation (#5997)
philiptzou Feb 3, 2025
b037568
docs(api): migrating the batch utility to mkdocstrings (#6016)
leandrodamascena Feb 3, 2025
8967681
chore(ci): new pre-release 3.5.1a4 (#6018)
github-actions[bot] Feb 4, 2025
6a3327f
docs(api): migrating the tracer utility to mkdocstrings (#6017)
leandrodamascena Feb 4, 2025
6bcea44
chore(ci): changelog rebuild (#6020)
github-actions[bot] Feb 4, 2025
d0f850b
docs(api): migrating the Middleware Factory utility to mkdocstrings (…
leandrodamascena Feb 4, 2025
c4c00e8
docs(api): migrating the logger utility to mkdocstrings (#6021)
leandrodamascena Feb 4, 2025
a95c8c7
docs(api): migrating the metrics utility to mkdocstrings (#6022)
leandrodamascena Feb 4, 2025
f88ca79
docs(api): migrating the event handler utility to mkdocstrings (#6023)
leandrodamascena Feb 4, 2025
ed57561
chore(ci): remove pdoc3 library (#6024)
leandrodamascena Feb 4, 2025
61271a1
chore(deps-dev): bump mkdocstrings-python from 1.14.2 to 1.14.4 (#6025)
dependabot[bot] Feb 4, 2025
b938745
chore(ci): new pre-release 3.5.1a5 (#6026)
github-actions[bot] Feb 5, 2025
72e0e63
chore(ci): add new script to bump Lambda layer version (#6001)
leandrodamascena Feb 5, 2025
bbd4dd5
chore(ci): changelog rebuild (#6027)
github-actions[bot] Feb 5, 2025
9bf48a9
chore(ci): new pre-release 3.5.1a6 (#6033)
github-actions[bot] Feb 6, 2025
3e67944
chore(deps-dev): bump mkdocstrings-python from 1.14.4 to 1.14.5 (#6032)
dependabot[bot] Feb 6, 2025
b41d8ba
chore(deps-dev): bump cfn-lint from 1.23.1 to 1.24.0 (#6030)
dependabot[bot] Feb 6, 2025
1e1c23f
chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.2…
dependabot[bot] Feb 6, 2025
9931c82
chore(deps-dev): bump boto3-stubs from 1.36.12 to 1.36.14 (#6029)
dependabot[bot] Feb 6, 2025
0945234
chore(deps-dev): bump mypy from 1.14.1 to 1.15.0 (#6028)
dependabot[bot] Feb 6, 2025
b4860d0
chore(ci): changelog rebuild (#6034)
github-actions[bot] Feb 6, 2025
0174a9b
chore(docs): enable privacy plugin in docs (#6036)
dreamorosi Feb 6, 2025
dab67b9
chore(deps-dev): bump aws-cdk-lib from 2.177.0 to 2.178.0 (#6038)
dependabot[bot] Feb 6, 2025
c480276
chore(deps-dev): bump ruff from 0.9.4 to 0.9.5 (#6039)
dependabot[bot] Feb 6, 2025
da5ae91
chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.177.0a0 …
dependabot[bot] Feb 6, 2025
82de6be
chore(deps-dev): bump aws-cdk from 2.177.0 to 2.178.0 (#6040)
dependabot[bot] Feb 6, 2025
badec0d
chore(deps): bump docker/setup-buildx-action from 3.8.0 to 3.9.0 (#6042)
dependabot[bot] Feb 6, 2025
01cf1c8
chore(deps): bump docker/setup-qemu-action from 3.3.0 to 3.4.0 (#6043)
dependabot[bot] Feb 6, 2025
8a491e0
chore(ci): new pre-release 3.5.1a7 (#6044)
github-actions[bot] Feb 7, 2025
e6bdfe1
chore(ci): changelog rebuild (#6045)
github-actions[bot] Feb 7, 2025
605365d
chore(deps-dev): bump aws-cdk from 2.178.0 to 2.178.1 (#6053)
dependabot[bot] Feb 8, 2025
803a24b
chore(deps-dev): bump aws-cdk-lib from 2.178.0 to 2.178.1 (#6047)
dependabot[bot] Feb 8, 2025
3de824a
chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.178.0a0 …
dependabot[bot] Feb 8, 2025
e8ef606
chore(deps-dev): bump boto3-stubs from 1.36.14 to 1.36.15 (#6049)
dependabot[bot] Feb 8, 2025
149d324
chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.2…
dependabot[bot] Feb 8, 2025
723d181
chore(deps-dev): bump mkdocstrings-python from 1.14.5 to 1.14.6 (#6050)
dependabot[bot] Feb 8, 2025
ca1bbcf
chore(deps): bump squidfunk/mkdocs-material from `7e841df` to `c62453…
dependabot[bot] Feb 8, 2025
63a39c2
chore(ci): changelog rebuild (#6055)
github-actions[bot] Feb 8, 2025
62cc329
chore(deps-dev): bump boto3-stubs from 1.36.14 to 1.36.16 (#6057)
dependabot[bot] Feb 8, 2025
5d96915
chore(ci): changelog rebuild (#6059)
github-actions[bot] Feb 9, 2025
ace4e89
chore(ci): new pre-release 3.5.1a8 (#6061)
github-actions[bot] Feb 10, 2025
e70ecab
chore(ci): changelog rebuild (#6062)
github-actions[bot] Feb 10, 2025
e534433
feat(event_source): add class APIGatewayAuthorizerResponseWebSocket (…
leandrodamascena Feb 10, 2025
37d3490
chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions …
dependabot[bot] Feb 10, 2025
b7d1654
chore(deps-dev): bump mkdocs-material from 9.6.2 to 9.6.3 (#6065)
dependabot[bot] Feb 10, 2025
914de85
chore(deps-dev): bump coverage from 7.6.10 to 7.6.11 (#6067)
dependabot[bot] Feb 10, 2025
0cd5bbe
chore(deps-dev): bump ruff from 0.9.5 to 0.9.6 (#6066)
dependabot[bot] Feb 10, 2025
6751805
feat(metrics): disable metrics flush via environment variables (#6046)
anafalcao Feb 11, 2025
1e1429f
chore(ci): new pre-release 3.5.1a9 (#6069)
github-actions[bot] Feb 11, 2025
df7230f
feat(data-masking): add custom mask functionalities (#5837)
anafalcao Feb 11, 2025
46cdaa7
chore(ci): changelog rebuild (#6070)
github-actions[bot] Feb 11, 2025
24aadb3
chore(ci): bump version to 3.6.0 (#6071)
github-actions[bot] Feb 11, 2025
d0024d2
chore(ci): layer docs update (#6072)
github-actions[bot] Feb 11, 2025
df0d1e2
fix(security): fix encryption_context handling in data masking operat…
leandrodamascena Feb 11, 2025
a20240c
chore(deps-dev): bump boto3-stubs from 1.36.16 to 1.36.17 (#6078)
dependabot[bot] Feb 11, 2025
f704595
chore(deps-dev): bump mkdocstrings-python from 1.14.6 to 1.15.0 (#6079)
dependabot[bot] Feb 11, 2025
808b262
chore(deps-dev): bump coverage from 7.6.11 to 7.6.12 (#6080)
dependabot[bot] Feb 11, 2025
903b7ce
chore(deps): bump aws-actions/configure-aws-credentials from 4.0.3 to…
dependabot[bot] Feb 11, 2025
86dcb1b
chore(ci): new pre-release 3.6.1a0 (#6084)
github-actions[bot] Feb 12, 2025
4298754
chore(ci): changelog rebuild (#6085)
github-actions[bot] Feb 12, 2025
dcfcd09
docs(roadmap): update roadmap (#6077)
leandrodamascena Feb 12, 2025
f73668b
chore(deps): bump squidfunk/mkdocs-material from `c62453b` to `f5bcec…
dependabot[bot] Feb 13, 2025
a403dc8
chore(deps-dev): bump aws-cdk from 2.178.1 to 2.178.2 (#6089)
dependabot[bot] Feb 13, 2025
eb53fe0
chore(ci): new pre-release 3.6.1a1 (#6090)
github-actions[bot] Feb 13, 2025
ac1e0f1
chore(ci): changelog rebuild (#6091)
github-actions[bot] Feb 13, 2025
c4f31cc
add test for secrets_manager.py
sinofseven Feb 15, 2025
789194b
Merge branch 'develop' into impl-prototype-async-execution-resolver
sinofseven Feb 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
122 changes: 122 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,128 @@
* **docs:** enable privacy plugin in docs ([#6036](https://github.com/aws-powertools/powertools-lambda-python/issues/6036))


<a name="v3.5.0"></a>
## [v3.5.0] - 2025-01-28
## Bug Fixes

* **security:** fix encryption_context handling in data masking operations ([#6074](https://github.com/aws-powertools/powertools-lambda-python/issues/6074))

## Documentation

* **roadmap:** update roadmap ([#6077](https://github.com/aws-powertools/powertools-lambda-python/issues/6077))

## Maintenance

* **ci:** new pre-release 3.6.1a0 ([#6084](https://github.com/aws-powertools/powertools-lambda-python/issues/6084))
* **deps:** bump aws-actions/configure-aws-credentials from 4.0.3 to 4.1.0 ([#6082](https://github.com/aws-powertools/powertools-lambda-python/issues/6082))
* **deps-dev:** bump coverage from 7.6.11 to 7.6.12 ([#6080](https://github.com/aws-powertools/powertools-lambda-python/issues/6080))
* **deps-dev:** bump mkdocstrings-python from 1.14.6 to 1.15.0 ([#6079](https://github.com/aws-powertools/powertools-lambda-python/issues/6079))
* **deps-dev:** bump boto3-stubs from 1.36.16 to 1.36.17 ([#6078](https://github.com/aws-powertools/powertools-lambda-python/issues/6078))


<a name="v3.6.0"></a>
## [v3.6.0] - 2025-02-11
## Bug Fixes

* **docs:** typo in a service name in Event Handler ([#5944](https://github.com/aws-powertools/powertools-lambda-python/issues/5944))
* **logger:** child logger must respect log level ([#5950](https://github.com/aws-powertools/powertools-lambda-python/issues/5950))

## Code Refactoring

* **metrics:** Improve type annotations for metrics decorator ([#6000](https://github.com/aws-powertools/powertools-lambda-python/issues/6000))

## Documentation

* **api:** migrating the event handler utility to mkdocstrings ([#6023](https://github.com/aws-powertools/powertools-lambda-python/issues/6023))
* **api:** migrating the metrics utility to mkdocstrings ([#6022](https://github.com/aws-powertools/powertools-lambda-python/issues/6022))
* **api:** migrating the logger utility to mkdocstrings ([#6021](https://github.com/aws-powertools/powertools-lambda-python/issues/6021))
* **api:** migrating the Middleware Factory utility to mkdocstrings ([#6019](https://github.com/aws-powertools/powertools-lambda-python/issues/6019))
* **api:** migrating the tracer utility to mkdocstrings ([#6017](https://github.com/aws-powertools/powertools-lambda-python/issues/6017))
* **api:** migrating the batch utility to mkdocstrings ([#6016](https://github.com/aws-powertools/powertools-lambda-python/issues/6016))
* **api:** migrating the event source data classes utility to mkdocstrings ([#6015](https://github.com/aws-powertools/powertools-lambda-python/issues/6015))
* **api:** migrating the data masking utility to mkdocstrings ([#6013](https://github.com/aws-powertools/powertools-lambda-python/issues/6013))
* **api:** migrating the AppConfig utility to mkdocstrings ([#6008](https://github.com/aws-powertools/powertools-lambda-python/issues/6008))
* **api:** migrating the idempotency utility to mkdocstrings ([#6007](https://github.com/aws-powertools/powertools-lambda-python/issues/6007))
* **api:** migrating the jmespath utility to mkdocstrings ([#6006](https://github.com/aws-powertools/powertools-lambda-python/issues/6006))
* **api:** migrating the parameters utility to mkdocstrings ([#6005](https://github.com/aws-powertools/powertools-lambda-python/issues/6005))
* **api:** migrating the parser utility to mkdocstrings ([#6004](https://github.com/aws-powertools/powertools-lambda-python/issues/6004))
* **api:** migrating the streaming utility to mkdocstrings ([#6003](https://github.com/aws-powertools/powertools-lambda-python/issues/6003))
* **api:** migrating the typing utility to mkdocstrings ([#5996](https://github.com/aws-powertools/powertools-lambda-python/issues/5996))
* **api:** migrating the validation utility to mkdocstrings ([#5972](https://github.com/aws-powertools/powertools-lambda-python/issues/5972))
* **layer:** update layer version number - v3.5.0 ([#5952](https://github.com/aws-powertools/powertools-lambda-python/issues/5952))

## Features

* **data-masking:** add custom mask functionalities ([#5837](https://github.com/aws-powertools/powertools-lambda-python/issues/5837))
* **event_source:** add class APIGatewayAuthorizerResponseWebSocket ([#6058](https://github.com/aws-powertools/powertools-lambda-python/issues/6058))
* **logger:** add clear_state method ([#5956](https://github.com/aws-powertools/powertools-lambda-python/issues/5956))
* **metrics:** disable metrics flush via environment variables ([#6046](https://github.com/aws-powertools/powertools-lambda-python/issues/6046))
* **openapi:** enhance support for tuple return type validation ([#5997](https://github.com/aws-powertools/powertools-lambda-python/issues/5997))

## Maintenance

* version bump
* **ci:** new pre-release 3.5.1a9 ([#6069](https://github.com/aws-powertools/powertools-lambda-python/issues/6069))
* **ci:** new pre-release 3.5.1a0 ([#5945](https://github.com/aws-powertools/powertools-lambda-python/issues/5945))
* **ci:** new pre-release 3.5.1a1 ([#5954](https://github.com/aws-powertools/powertools-lambda-python/issues/5954))
* **ci:** new pre-release 3.5.1a8 ([#6061](https://github.com/aws-powertools/powertools-lambda-python/issues/6061))
* **ci:** install & configure mkdocstrings plugin ([#5959](https://github.com/aws-powertools/powertools-lambda-python/issues/5959))
* **ci:** new pre-release 3.5.1a2 ([#5970](https://github.com/aws-powertools/powertools-lambda-python/issues/5970))
* **ci:** new pre-release 3.5.1a3 ([#5998](https://github.com/aws-powertools/powertools-lambda-python/issues/5998))
* **ci:** new pre-release 3.5.1a7 ([#6044](https://github.com/aws-powertools/powertools-lambda-python/issues/6044))
* **ci:** new pre-release 3.5.1a4 ([#6018](https://github.com/aws-powertools/powertools-lambda-python/issues/6018))
* **ci:** remove pdoc3 library ([#6024](https://github.com/aws-powertools/powertools-lambda-python/issues/6024))
* **ci:** new pre-release 3.5.1a5 ([#6026](https://github.com/aws-powertools/powertools-lambda-python/issues/6026))
* **ci:** add new script to bump Lambda layer version ([#6001](https://github.com/aws-powertools/powertools-lambda-python/issues/6001))
* **ci:** new pre-release 3.5.1a6 ([#6033](https://github.com/aws-powertools/powertools-lambda-python/issues/6033))
* **deps:** bump squidfunk/mkdocs-material from `471695f` to `7e841df` in /docs ([#6012](https://github.com/aws-powertools/powertools-lambda-python/issues/6012))
* **deps:** bump zgosalvez/github-actions-ensure-sha-pinned-actions from 3.0.20 to 3.0.21 ([#6064](https://github.com/aws-powertools/powertools-lambda-python/issues/6064))
* **deps:** bump actions/setup-python from 5.3.0 to 5.4.0 ([#5960](https://github.com/aws-powertools/powertools-lambda-python/issues/5960))
* **deps:** bump docker/setup-qemu-action from 3.2.0 to 3.3.0 ([#5961](https://github.com/aws-powertools/powertools-lambda-python/issues/5961))
* **deps:** bump codecov/codecov-action from 5.1.2 to 5.3.1 ([#5964](https://github.com/aws-powertools/powertools-lambda-python/issues/5964))
* **deps:** bump squidfunk/mkdocs-material from `7e841df` to `c62453b` in /docs ([#6052](https://github.com/aws-powertools/powertools-lambda-python/issues/6052))
* **deps:** bump actions/setup-node from 4.1.0 to 4.2.0 ([#5963](https://github.com/aws-powertools/powertools-lambda-python/issues/5963))
* **deps:** bump actions/upload-artifact from 4.5.0 to 4.6.0 ([#5962](https://github.com/aws-powertools/powertools-lambda-python/issues/5962))
* **deps:** bump release-drafter/release-drafter from 6.0.0 to 6.1.0 ([#5976](https://github.com/aws-powertools/powertools-lambda-python/issues/5976))
* **deps:** bump zgosalvez/github-actions-ensure-sha-pinned-actions from 3.0.18 to 3.0.20 ([#5977](https://github.com/aws-powertools/powertools-lambda-python/issues/5977))
* **deps:** bump pypa/gh-action-pypi-publish from 1.12.3 to 1.12.4 ([#5980](https://github.com/aws-powertools/powertools-lambda-python/issues/5980))
* **deps:** bump docker/setup-buildx-action from 3.8.0 to 3.9.0 ([#6042](https://github.com/aws-powertools/powertools-lambda-python/issues/6042))
* **deps:** bump docker/setup-qemu-action from 3.3.0 to 3.4.0 ([#6043](https://github.com/aws-powertools/powertools-lambda-python/issues/6043))
* **deps:** bump aws-actions/configure-aws-credentials from 4.0.2 to 4.0.3 ([#5975](https://github.com/aws-powertools/powertools-lambda-python/issues/5975))
* **deps:** bump squidfunk/mkdocs-material from `41942f7` to `471695f` in /docs ([#5979](https://github.com/aws-powertools/powertools-lambda-python/issues/5979))
* **deps:** bump actions/setup-go from 5.2.0 to 5.3.0 ([#5978](https://github.com/aws-powertools/powertools-lambda-python/issues/5978))
* **deps-dev:** bump aws-cdk from 2.178.0 to 2.178.1 ([#6053](https://github.com/aws-powertools/powertools-lambda-python/issues/6053))
* **deps-dev:** bump mkdocstrings-python from 1.13.0 to 1.14.2 ([#6011](https://github.com/aws-powertools/powertools-lambda-python/issues/6011))
* **deps-dev:** bump mkdocs-material from 9.6.1 to 9.6.2 ([#6009](https://github.com/aws-powertools/powertools-lambda-python/issues/6009))
* **deps-dev:** bump aws-cdk-lib from 2.178.0 to 2.178.1 ([#6047](https://github.com/aws-powertools/powertools-lambda-python/issues/6047))
* **deps-dev:** bump aws-cdk-aws-lambda-python-alpha from 2.178.0a0 to 2.178.1a0 ([#6048](https://github.com/aws-powertools/powertools-lambda-python/issues/6048))
* **deps-dev:** bump boto3-stubs from 1.36.14 to 1.36.15 ([#6049](https://github.com/aws-powertools/powertools-lambda-python/issues/6049))
* **deps-dev:** bump boto3-stubs from 1.36.10 to 1.36.11 ([#6010](https://github.com/aws-powertools/powertools-lambda-python/issues/6010))
* **deps-dev:** bump boto3-stubs from 1.36.10 to 1.36.12 ([#6014](https://github.com/aws-powertools/powertools-lambda-python/issues/6014))
* **deps-dev:** bump ruff from 0.9.5 to 0.9.6 ([#6066](https://github.com/aws-powertools/powertools-lambda-python/issues/6066))
* **deps-dev:** bump mkdocstrings-python from 1.14.2 to 1.14.4 ([#6025](https://github.com/aws-powertools/powertools-lambda-python/issues/6025))
* **deps-dev:** bump aws-cdk-aws-lambda-python-alpha from 2.177.0a0 to 2.178.0a0 ([#6041](https://github.com/aws-powertools/powertools-lambda-python/issues/6041))
* **deps-dev:** bump mkdocs-material from 9.5.50 to 9.6.1 ([#5966](https://github.com/aws-powertools/powertools-lambda-python/issues/5966))
* **deps-dev:** bump black from 24.10.0 to 25.1.0 ([#5968](https://github.com/aws-powertools/powertools-lambda-python/issues/5968))
* **deps-dev:** bump ruff from 0.9.3 to 0.9.4 ([#5969](https://github.com/aws-powertools/powertools-lambda-python/issues/5969))
* **deps-dev:** bump cdklabs-generative-ai-cdk-constructs from 0.1.291 to 0.1.292 ([#6051](https://github.com/aws-powertools/powertools-lambda-python/issues/6051))
* **deps-dev:** bump cfn-lint from 1.22.7 to 1.23.1 ([#5967](https://github.com/aws-powertools/powertools-lambda-python/issues/5967))
* **deps-dev:** bump mkdocstrings-python from 1.14.5 to 1.14.6 ([#6050](https://github.com/aws-powertools/powertools-lambda-python/issues/6050))
* **deps-dev:** bump isort from 5.13.2 to 6.0.0 ([#5965](https://github.com/aws-powertools/powertools-lambda-python/issues/5965))
* **deps-dev:** bump ruff from 0.9.4 to 0.9.5 ([#6039](https://github.com/aws-powertools/powertools-lambda-python/issues/6039))
* **deps-dev:** bump aws-cdk-lib from 2.177.0 to 2.178.0 ([#6038](https://github.com/aws-powertools/powertools-lambda-python/issues/6038))
* **deps-dev:** bump mypy from 1.14.1 to 1.15.0 ([#6028](https://github.com/aws-powertools/powertools-lambda-python/issues/6028))
* **deps-dev:** bump mkdocstrings-python from 1.14.4 to 1.14.5 ([#6032](https://github.com/aws-powertools/powertools-lambda-python/issues/6032))
* **deps-dev:** bump cfn-lint from 1.23.1 to 1.24.0 ([#6030](https://github.com/aws-powertools/powertools-lambda-python/issues/6030))
* **deps-dev:** bump boto3-stubs from 1.36.14 to 1.36.16 ([#6057](https://github.com/aws-powertools/powertools-lambda-python/issues/6057))
* **deps-dev:** bump cdklabs-generative-ai-cdk-constructs from 0.1.290 to 0.1.291 ([#6031](https://github.com/aws-powertools/powertools-lambda-python/issues/6031))
* **deps-dev:** bump boto3-stubs from 1.36.12 to 1.36.14 ([#6029](https://github.com/aws-powertools/powertools-lambda-python/issues/6029))
* **deps-dev:** bump mkdocs-material from 9.6.2 to 9.6.3 ([#6065](https://github.com/aws-powertools/powertools-lambda-python/issues/6065))
* **deps-dev:** bump coverage from 7.6.10 to 7.6.11 ([#6067](https://github.com/aws-powertools/powertools-lambda-python/issues/6067))
* **deps-dev:** bump aws-cdk from 2.177.0 to 2.178.0 ([#6040](https://github.com/aws-powertools/powertools-lambda-python/issues/6040))
* **docs:** enable privacy plugin in docs ([#6036](https://github.com/aws-powertools/powertools-lambda-python/issues/6036))


<a name="v3.5.0"></a>
## [v3.5.0] - 2025-01-28
## Bug Fixes
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class RouteNotFoundError(Exception):
pass
169 changes: 169 additions & 0 deletions aws_lambda_powertools/event_handler/async_execution/router.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
from __future__ import annotations

from typing import TYPE_CHECKING, Any, Callable

from .routes.aws_config_rule import AwsConfigRuleRoute
from .routes.cloud_watch_alarm import CloudWatchAlarmRoute
from .routes.cloud_watch_logs import CloudWatchLogsRoute
from .routes.code_deploy_lifecycle_hook import CodeDeployLifecycleHookRoute
from .routes.event_bridge import EventBridgeRoute
from .routes.s3 import S3Route
from .routes.secrets_manager import SecretsManagerRoute
from .routes.ses import SESRoute
from .routes.sns import SNSRoute

if TYPE_CHECKING:
from .routes.base import BaseRoute


class Router:
_routes: list[BaseRoute]

def __init__(self):
self._routes = []

def aws_config_rule(
self,
arn: str | None = None,
rule_name: str | None = None,
rule_name_prefix: str | None = None,
rule_id: str | None = None,
) -> Callable:
def wrapper_aws_config_rule(func: Callable):
self._routes.append(
AwsConfigRuleRoute(
func=func,
arn=arn,
rule_name=rule_name,
rule_name_prefix=rule_name_prefix,
rule_id=rule_id,
),
)

return wrapper_aws_config_rule

def cloud_watch_alarm(
self,
arn: str | None = None,
alarm_name: str | None = None,
alarm_name_prefix: str | None = None,
) -> Callable:
def wrapper_cloud_watch_alarm(func: Callable):
self._routes.append(
CloudWatchAlarmRoute(func=func, arn=arn, alarm_name=alarm_name, alarm_name_prefix=alarm_name_prefix),
)

return wrapper_cloud_watch_alarm

def cloud_watch_logs(
self,
log_group: str | None = None,
log_group_prefix: str | None = None,
log_stream: str | None = None,
log_stream_prefix: str | None = None,
subscription_filters: str | list[str] | None = None,
) -> Callable:
def wrapper_cloud_watch_logs(func: Callable):
self._routes.append(
CloudWatchLogsRoute(
func=func,
log_group=log_group,
log_group_prefix=log_group_prefix,
log_stream=log_stream,
log_stream_prefix=log_stream_prefix,
subscription_filters=subscription_filters,
),
)

return wrapper_cloud_watch_logs

def code_deploy_lifecycle_hook(self) -> Callable:
def wrapper_code_deploy_lifecycle_hook(func: Callable):
self._routes.append(CodeDeployLifecycleHookRoute(func=func))

return wrapper_code_deploy_lifecycle_hook

def event_bridge(
self,
detail_type: str | None = None,
source: str | None = None,
resources: str | list[str] | None = None,
) -> Callable:
def wrap_event_bridge(func: Callable):
self._routes.append(
EventBridgeRoute(func=func, detail_type=detail_type, source=source, resources=resources),
)

return wrap_event_bridge

def s3(
self,
bucket: str | None = None,
bucket_prefix: str | None = None,
key: str | None = None,
key_prefix: str | None = None,
key_suffix: str | None = None,
event_name: str | None = None,
) -> Callable:
def wrap_s3(func: Callable):
self._routes.append(
S3Route(
func=func,
bucket=bucket,
bucket_prefix=bucket_prefix,
key=key,
key_prefix=key_prefix,
key_suffix=key_suffix,
event_name=event_name,
),
)

return wrap_s3

def secrets_manager(self, secret_id: str | None = None, secret_name_prefix: str | None = None):
def wrap_secrets_manager(func: Callable):
self._routes.append(
SecretsManagerRoute(func=func, secret_id=secret_id, secret_name_prefix=secret_name_prefix),
)

return wrap_secrets_manager

def ses(
self,
mail_to: str | list[str] | None = None,
mail_from: str | list[str] | None = None,
mail_subject: str | None = None,
) -> Callable:
def wrap_ses(func: Callable):
self._routes.append(SESRoute(func=func, mail_to=mail_to, mail_from=mail_from, mail_subject=mail_subject))

return wrap_ses

def sns(
self,
arn: str | None = None,
name: str | None = None,
name_prefix: str | None = None,
subject: str | None = None,
subject_prefix: str | None = None,
) -> Callable:
def wrap_sns(func: Callable):
self._routes.append(
SNSRoute(
func=func,
arn=arn,
name=name,
name_prefix=name_prefix,
subject=subject,
subject_prefix=subject_prefix,
),
)

return wrap_sns

def resolve_route(self, event: dict[str, Any]) -> tuple[Callable, Any] | None:
for route in self._routes:
data = route.match(event=event)
if data is not None:
return data
return None
Empty file.
Loading