Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c96e80b

Browse files
authoredApr 23, 2024··
Merge branch 'develop' into improv/event-source-return-type
2 parents dc27238 + fe26d1c commit c96e80b

25 files changed

+149
-133
lines changed
 

‎.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828

2929
steps:
3030
- name: Checkout repository
31-
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
31+
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
3232

3333
# Initializes the CodeQL tools for scanning.
3434
- name: Initialize CodeQL

‎.github/workflows/dependency-review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: 'Checkout Repository'
20-
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
20+
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
2121
- name: 'Dependency Review'
2222
uses: actions/dependency-review-action@5bbc3ba658137598168acb2ab73b21c432dd411b # v4.2.5

‎.github/workflows/label_pr_on_title.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
pull-requests: write # label respective PR
5151
steps:
5252
- name: Checkout repository
53-
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
53+
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
5454
- name: "Label PR based on title"
5555
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
5656
env:

‎.github/workflows/on_label_added.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
permissions:
4848
pull-requests: write # comment on PR
4949
steps:
50-
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
50+
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
5151
# Maintenance: Persist state per PR as an artifact to avoid spam on label add
5252
- name: "Suggest split large Pull Request"
5353
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1

‎.github/workflows/on_merged_pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
issues: write # label issue with pending-release
5050
if: needs.get_pr_details.outputs.prIsMerged == 'true'
5151
steps:
52-
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
52+
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
5353
- name: "Label PR related issue for release"
5454
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
5555
env:

‎.github/workflows/on_opened_pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
needs: get_pr_details
4848
runs-on: ubuntu-latest
4949
steps:
50-
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
50+
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
5151
- name: "Ensure related issue is present"
5252
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
5353
env:
@@ -66,7 +66,7 @@ jobs:
6666
permissions:
6767
pull-requests: write # label and comment on PR if missing acknowledge section (requirement)
6868
steps:
69-
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
69+
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
7070
- name: "Ensure acknowledgement section is present"
7171
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
7272
env:

‎.github/workflows/on_schedule_monthly_roadmap_reminder.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,3 @@ jobs:
1616
uses: aws-powertools/actions/.github/workflows/monthly_roadmap_reminder.yml@fd4575466e5c2ac10703ac16f5aa9fb8890f532a
1717
with:
1818
token: ${{ github.token }}
19-
20-

‎.github/workflows/ossf_scorecard.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222

2323
steps:
2424
- name: "Checkout code"
25-
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
25+
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
2626
with:
2727
persist-credentials: false
2828

@@ -35,7 +35,7 @@ jobs:
3535
repo_token: ${{ secrets.SCORECARD_TOKEN }} # read-only fine-grained token to read branch protection settings
3636

3737
- name: "Upload results"
38-
uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4.3.2
38+
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
3939
with:
4040
name: SARIF file
4141
path: results.sarif

‎.github/workflows/publish_v2_layer.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ jobs:
8888
working-directory: ./layer
8989
steps:
9090
- name: checkout
91-
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
91+
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
9292
with:
9393
ref: ${{ env.RELEASE_COMMIT }}
9494

@@ -146,7 +146,7 @@ jobs:
146146
- name: zip output
147147
run: zip -r cdk.out.zip cdk.out
148148
- name: Archive CDK artifacts
149-
uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4.3.2
149+
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
150150
with:
151151
name: cdk-layer-artefact
152152
path: layer/cdk.out.zip
@@ -247,7 +247,7 @@ jobs:
247247
pages: none
248248
steps:
249249
- name: Checkout repository # reusable workflows start clean, so we need to checkout again
250-
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
250+
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
251251
with:
252252
ref: ${{ env.RELEASE_COMMIT }}
253253

@@ -258,7 +258,7 @@ jobs:
258258
artifact_name: ${{ inputs.source_code_artifact_name }}
259259

260260
- name: Download CDK layer artifacts
261-
uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
261+
uses: actions/download-artifact@9c19ed7fe5d278cd354c7dfd5d3b88589c7e2395 # v4.1.6
262262
with:
263263
path: cdk-layer-stack
264264
pattern: cdk-layer-stack-* # merge all Layer artifacts created per region earlier (reusable_deploy_v2_layer_stack.yml; step "Save Layer ARN artifact")

‎.github/workflows/quality_check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
permissions:
5151
contents: read # checkout code only
5252
steps:
53-
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
53+
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
5454
- name: Install poetry
5555
run: pipx install poetry
5656
- name: Set up Python ${{ matrix.python-version }}

‎.github/workflows/quality_check_pydanticv2.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
permissions:
5050
contents: read # checkout code only
5151
steps:
52-
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
52+
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
5353
- name: Install poetry
5454
run: pipx install poetry
5555
- name: Set up Python ${{ matrix.python-version }}

‎.github/workflows/record_pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ jobs:
4646
permissions:
4747
contents: read # NOTE: treat as untrusted location
4848
steps:
49-
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
49+
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
5050
- name: "Extract PR details"
5151
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
5252
with:
5353
script: |
5454
const script = require('.github/scripts/save_pr_details.js')
5555
await script({github, context, core})
56-
- uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4.3.2
56+
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
5757
with:
5858
name: pr
5959
path: pr.txt

‎.github/workflows/release.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
RELEASE_VERSION="${RELEASE_TAG_VERSION:1}"
8181
echo "RELEASE_VERSION=${RELEASE_VERSION}" >> "$GITHUB_OUTPUT"
8282
83-
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
83+
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
8484
with:
8585
ref: ${{ env.RELEASE_COMMIT }}
8686

@@ -115,7 +115,7 @@ jobs:
115115
contents: read
116116
steps:
117117
# NOTE: we need actions/checkout to configure git first (pre-commit hooks in make dev)
118-
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
118+
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
119119
with:
120120
ref: ${{ env.RELEASE_COMMIT }}
121121

@@ -156,7 +156,7 @@ jobs:
156156
attestation_hashes: ${{ steps.encoded_hash.outputs.attestation_hashes }}
157157
steps:
158158
# NOTE: we need actions/checkout to configure git first (pre-commit hooks in make dev)
159-
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
159+
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
160160
with:
161161
ref: ${{ env.RELEASE_COMMIT }}
162162

@@ -225,7 +225,7 @@ jobs:
225225
RELEASE_VERSION: ${{ needs.seal.outputs.RELEASE_VERSION }}
226226
steps:
227227
# NOTE: we need actions/checkout in order to use our local actions (e.g., ./.github/actions)
228-
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
228+
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
229229
with:
230230
ref: ${{ env.RELEASE_COMMIT }}
231231

@@ -259,7 +259,7 @@ jobs:
259259
contents: write
260260
steps:
261261
# NOTE: we need actions/checkout to authenticate and configure git first
262-
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
262+
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
263263
with:
264264
ref: ${{ env.RELEASE_COMMIT }}
265265

@@ -303,7 +303,7 @@ jobs:
303303
runs-on: ubuntu-latest
304304
steps:
305305
# NOTE: we need actions/checkout to authenticate and configure git first
306-
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
306+
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
307307
with:
308308
ref: ${{ env.RELEASE_COMMIT }}
309309

@@ -357,7 +357,7 @@ jobs:
357357
env:
358358
RELEASE_VERSION: ${{ needs.seal.outputs.RELEASE_VERSION }}
359359
steps:
360-
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
360+
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
361361
with:
362362
ref: ${{ env.RELEASE_COMMIT }}
363363

‎.github/workflows/reusable_deploy_v2_layer_stack.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ jobs:
140140
has_arm64_support: "true"
141141
steps:
142142
- name: checkout
143-
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
143+
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
144144
with:
145145
ref: ${{ env.RELEASE_COMMIT }}
146146

@@ -180,7 +180,7 @@ jobs:
180180
- name: install deps
181181
run: poetry install
182182
- name: Download artifact
183-
uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
183+
uses: actions/download-artifact@9c19ed7fe5d278cd354c7dfd5d3b88589c7e2395 # v4.1.6
184184
with:
185185
name: ${{ inputs.artefact-name }}
186186
path: layer
@@ -197,7 +197,7 @@ jobs:
197197
cat cdk-layer-stack/${{ matrix.region }}-layer-version.txt
198198
- name: Save Layer ARN artifact
199199
if: ${{ inputs.stage == 'PROD' }}
200-
uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4.3.2
200+
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
201201
with:
202202
name: cdk-layer-stack-${{ matrix.region }}
203203
path: ./layer/cdk-layer-stack/* # NOTE: upload-artifact does not inherit working-directory setting.

‎.github/workflows/reusable_deploy_v2_sar.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
architecture: ["x86_64", "arm64"]
8080
steps:
8181
- name: checkout
82-
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
82+
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
8383
with:
8484
ref: ${{ env.RELEASE_COMMIT }}
8585

@@ -115,7 +115,7 @@ jobs:
115115
with:
116116
node-version: ${{ env.NODE_VERSION }}
117117
- name: Download artifact
118-
uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
118+
uses: actions/download-artifact@9c19ed7fe5d278cd354c7dfd5d3b88589c7e2395 # v4.1.6
119119
with:
120120
name: ${{ inputs.artefact-name }}
121121
- name: Unzip artefact

‎.github/workflows/reusable_export_pr_details.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
prLabels: ${{ steps.prLabels.outputs.prLabels }}
7777
steps:
7878
- name: Checkout repository # in case caller workflow doesn't checkout thus failing with file not found
79-
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
79+
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
8080
- name: "Download previously saved PR"
8181
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
8282
env:

‎.github/workflows/reusable_publish_changelog.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
pull-requests: write # create PR
2727
steps:
2828
- name: Checkout repository # reusable workflows start clean, so we need to checkout again
29-
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
29+
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
3030
with:
3131
fetch-depth: 0
3232
- name: "Generate latest changelog"

‎.github/workflows/reusable_publish_docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
id-token: write # trade JWT token for AWS credentials in AWS Docs account
4545
pages: write # uncomment if mike fails as we migrated to S3 hosting
4646
steps:
47-
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
47+
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
4848
with:
4949
fetch-depth: 0
5050
ref: ${{ inputs.git_ref }}

‎.github/workflows/run-e2e-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
if: ${{ github.actor != 'dependabot[bot]' && github.repository == 'aws-powertools/powertools-lambda-python' }}
5252
steps:
5353
- name: "Checkout"
54-
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
54+
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
5555
- name: Install poetry
5656
run: pipx install poetry
5757
- name: "Use Python"

‎.github/workflows/secure_workflows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
contents: read # checkout code and subsequently GitHub action workflows
3131
steps:
3232
- name: Checkout code
33-
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
33+
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
3434
- name: Ensure 3rd party workflows have SHA pinned
3535
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@19ebcb0babbd282ae1822a0b9c28f3f1f25cea45 # v3.0.4
3636
with:

‎CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@
1010

1111
## Maintenance
1212

13+
* **deps:** bump actions/upload-artifact from 4.3.1 to 4.3.2 ([#4162](https://github.com/aws-powertools/powertools-lambda-python/issues/4162))
14+
* **deps:** bump actions/checkout from 4.1.2 to 4.1.3 ([#4168](https://github.com/aws-powertools/powertools-lambda-python/issues/4168))
15+
* **deps:** bump actions/download-artifact from 4.1.4 to 4.1.5 ([#4161](https://github.com/aws-powertools/powertools-lambda-python/issues/4161))
16+
* **deps-dev:** bump ruff from 0.3.7 to 0.4.1 ([#4166](https://github.com/aws-powertools/powertools-lambda-python/issues/4166))
17+
* **deps-dev:** bump aws-cdk from 2.137.0 to 2.138.0 ([#4157](https://github.com/aws-powertools/powertools-lambda-python/issues/4157))
18+
* **deps-dev:** bump aws-cdk-lib from 2.137.0 to 2.138.0 ([#4160](https://github.com/aws-powertools/powertools-lambda-python/issues/4160))
19+
* **deps-dev:** bump cdklabs-generative-ai-cdk-constructs from 0.1.119 to 0.1.121 ([#4167](https://github.com/aws-powertools/powertools-lambda-python/issues/4167))
20+
* **deps-dev:** bump aws-cdk-aws-lambda-python-alpha from 2.137.0a0 to 2.138.0a0 ([#4169](https://github.com/aws-powertools/powertools-lambda-python/issues/4169))
21+
* **deps-dev:** bump cdklabs-generative-ai-cdk-constructs from 0.1.121 to 0.1.123 ([#4176](https://github.com/aws-powertools/powertools-lambda-python/issues/4176))
1322

1423

1524
<a name="v2.37.0"></a>

‎aws_lambda_powertools/utilities/parser/parser.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,17 @@ def handler(event: Order, context: LambdaContext):
8383
When envelope given does not implement BaseEnvelope
8484
"""
8585

86-
# The first parameter of a Lambda function is always the event
87-
# This line get the model informed in the event_parser function
88-
# or the first parameter of the function by using typing.get_type_hints
89-
type_hints = typing.get_type_hints(handler)
90-
model = model or (list(type_hints.values())[0] if type_hints else None)
9186
if model is None:
92-
raise InvalidModelTypeError(
93-
"The model must be provided either as the `model` argument to `event_parser`"
94-
"or as the type hint of `event` in the handler that it wraps",
95-
)
87+
# The first parameter of a Lambda function is always the event.
88+
# Get the first parameter's type by using typing.get_type_hints.
89+
type_hints = typing.get_type_hints(handler)
90+
if type_hints:
91+
model = list(type_hints.values())[0]
92+
if model is None:
93+
raise InvalidModelTypeError(
94+
"The model must be provided either as the `model` argument to `event_parser`"
95+
"or as the type hint of `event` in the handler that it wraps",
96+
)
9697

9798
if envelope:
9899
parsed_event = parse(event=event, model=model, envelope=envelope)

‎docs/roadmap.md

Lines changed: 77 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
<!-- markdownlint-disable MD043 -->
2-
3-
## Overview
1+
<!-- markdownlint-disable MD043 MD041 -->
2+
# Overview
43

54
Our public roadmap outlines the high level direction we are working towards. We update this document when our priorities change: security and stability are our top priority.
65

@@ -10,42 +9,60 @@ Our public roadmap outlines the high level direction we are working towards. We
109

1110
Security and operational excellence take precedence above all else. This means bug fixing, stability, customer's support, and internal compliance may delay one or more key areas below.
1211

13-
### Amazon Bedrock Agent Event Handler
12+
**Missing something or want us to prioritize an existing area?**
1413

15-
Based on [customers](https://github.com/aws-powertools/powertools-lambda-python#connect){target="_blank"} at re:Invent 2023, we will add a new Event Handler resolver to improve authoring and maintenance of Amazon Bedrock Agents.
14+
You can help us prioritize by [upvoting existing feature requests](https://github.com/aws-powertools/powertools-lambda-python/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Afeature-request), leaving a comment on what use cases it could unblock for you, and by joining our discussions on Discord.
15+
16+
### Observability providers
17+
18+
We want to extend Tracer, Metrics, and Logger to support any [AWS Lambda certified observability partner](https://go.aws/3HtU6CZ){target="_blank"}, along with OpenTelemetry.
19+
20+
At launch, we will support Datadog since it's [most requested observability provider](https://github.com/aws-powertools/powertools-lambda-python/issues/1433). OpenTelemetry will be a fast follow-up as we need to decide on a stable solution to cold start penalty.
21+
22+
!!! tip "Help us identify which observability providers we should integrate next. Open [feature request](https://github.com/aws-powertools/powertools-lambda-python/issues/new?assignees=&labels=feature-request%2Ctriage&projects=&template=feature_request.yml&title=Feature+request%3A+TITLE){target="_blank"} or by voting `+1` in existing issues"
1623

1724
**Major updates**
1825

19-
* [x] [Event Source Data Classes support](https://github.com/aws-powertools/powertools-lambda-python/pull/3262)
20-
* [x] [Pydantic model _(Parser)_ support](https://github.com/aws-powertools/powertools-lambda-python/pull/3286)
21-
* [x] [MVP Event Handler](https://github.com/aws-powertools/powertools-lambda-python/pull/3285)
22-
* [ ] [New feature documentation](https://github.com/aws-powertools/powertools-lambda-python/pull/3602)
23-
* [ ] Video to walkthrough use cases for anyone new to LLM Agents
24-
* [ ] Launch amplifier (_e.g., What's New, Blog post_)
26+
* [x] [Document how customers can use any provider with Logger](https://docs.powertools.aws.dev/lambda/python/latest/core/logger/#observability-providers)
27+
* [x] [Extend Metrics to add support for any Provider](https://github.com/aws-powertools/powertools-lambda-python/pull/2194)
28+
* [ ] [Extend Tracer to add support for any Provider](https://github.com/aws-powertools/powertools-lambda-python/pull/2342#issuecomment-2061734362)
29+
* [ ] Investigate alternative solution to OpenTelemetry cold start performance
2530

26-
### Setting Parameters and Secrets
31+
### Lambda Layer in GovCloud
2732

28-
As of today, the [Parameters](./utilities/parameters.md){target="_blank"} feature is used to retrieve data, not to create or update existing parameters. Based on community feedback, we plan to enhance Parameters to allow set operations.
33+
We want to investigate security and scaling requirements for these special regions, so they're in sync for every release.
34+
35+
!!! note "Help us prioritize it by reaching out to your AWS representatives or [via email](mailto:aws-powertools-maintainers@amazon.com)."
2936

3037
**Major updates**
3138

32-
* [x] [RFC](https://github.com/aws-powertools/powertools-lambda-python/issues/3040)
33-
* [ ] [MVP](https://github.com/aws-powertools/powertools-lambda-python/pull/2858)
39+
* [x] Gather agencies and customers name to prioritize it
40+
* [x] Investigate security requirements for special regions
41+
* [x] Create additional infrastructure for special regions
42+
* [x] AppSec review
43+
* [x] Update CDK Layer construct to include regions
44+
* [x] Distribution sign-off
45+
* [ ] Distribute latest version
46+
* [ ] Update Layer section with new AWS Accounts
3447

35-
### Observability providers
48+
### V3
3649

37-
We want to extend Tracer, Metrics, and Logger to support any [AWS Lambda certified observability partner](https://go.aws/3HtU6CZ){target="_blank"}, along with OpenTelemetry.
50+
We are in the process of planning the roadmap for v3. As always, [our approach](./versioning.md){target="_blank"} includes providing sufficient advance notice, a comprehensive upgrade guide, and minimizing breaking changes to facilitate a smooth transition (e.g., it took ~7 months from v2 to surpass v1 downloads).
3851

39-
At launch, we will support Datadog since it's [most requested observability provider](https://github.com/aws-powertools/powertools-lambda-python/issues/1433). OpenTelemetry will be a fast follow-up as we need to decide on a stable solution to cold start penalty.
52+
For example, these are on our mind but not settled yet until we have a public tracker to discuss what these means in detail.
4053

41-
!!! tip "Help us identify which observability providers we should integrate next. Open [feature request](https://github.com/aws-powertools/powertools-lambda-python/issues/new?assignees=&labels=feature-request%2Ctriage&projects=&template=feature_request.yml&title=Feature+request%3A+TITLE){target="_blank"} or by voting `+1` in existing issues"
54+
* **Parser**: Drop Pydantic v1
55+
* **Parser**: Deserialize Amazon DynamoDB data types automatically (like Event Source Data Classes)
56+
* **Parameters**: Increase default `max_age` for `get_secret`
57+
* **Event Source Data Classes**: Return sane defaults for any property that has `Optional[<type>]` returns
58+
* **Batch**: Stop at first error for Amazon DynamoDB Streams and Amazon Kinesis Data Streams (e.g., `stop_on_failure=True`)
4259

4360
**Major updates**
4461

45-
* [x] [Document how customers can use any provider with Logger](https://docs.powertools.aws.dev/lambda/python/latest/core/logger/#observability-providers)
46-
* [x] [Extend Metrics to add support for any Provider](https://github.com/aws-powertools/powertools-lambda-python/pull/2194)
47-
* [ ] [Extend Tracer to add support for any Provider](https://github.com/aws-powertools/powertools-lambda-python/issues/2030)
48-
* [ ] Investigate alternative solution to OpenTelemetry cold start performance
62+
* [ ] Create an issue to track breaking changes we consider making
63+
* [ ] Create a v3 branch to allow early experimentation
64+
* [ ] Create workflows to allow pre-releases
65+
* [ ] Create a mechanism to keep ideas for breaking change somewhere regardless of v3
4966

5067
### Revamp Event Handler
5168

@@ -63,6 +80,17 @@ Based on customers feedback, we want to provide [middleware authoring support](h
6380
* [x] [MVP for OpenAPI and SwaggerUI](https://github.com/aws-powertools/powertools-lambda-python/pull/3109)
6481
* [ ] [MVP for AppSync Batch invoke and partial failure support](https://github.com/aws-powertools/powertools-lambda-python/pull/1998)
6582

83+
### Authentication (SigV4)
84+
85+
[During customers interview](https://github.com/aws-powertools/powertools-lambda-python#connect){target="_blank"}, we hear that signing requests using [AWS SigV4](https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html){target="_blank"} could be easier.
86+
87+
Since JWT is a close second, this new utility would cover higher level functions to sign and verify requests more easily.
88+
89+
**Major updates**
90+
91+
* [x] [Issue to outline challenges](https://github.com/aws-powertools/powertools-lambda-python/issues/2493), alternative solutions and desired experience
92+
* [ ] [MVP for AWS SigV4](https://github.com/aws-powertools/powertools-lambda-python/pull/2435)
93+
6694
### Office hours
6795

6896
We heard from [customers](https://github.com/aws-powertools/powertools-lambda-python#connect){target="_blank"} that Powertools for AWS Lambda and its community can move faster than they are able to catch up. While documentation and release notes take these into account, they notice they don't always know advanced tricks, or what other customers tend to do in similar situations.
@@ -79,17 +107,6 @@ Timezones being tricky, we plan to experiment with an afternoon slot in Central
79107
* [ ] Invite Discord community
80108
* [ ] Update roadmap page with Discord event
81109

82-
### Authentication (SigV4)
83-
84-
[During customers interview](https://github.com/aws-powertools/powertools-lambda-python#connect){target="_blank"}, we hear that signing requests using [AWS SigV4](https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html){target="_blank"} could be easier.
85-
86-
Since JWT is a close second, this new utility would cover higher level functions to sign and verify requests more easily.
87-
88-
**Major updates**
89-
90-
* [ ] RFC to outline challenges, alternative solutions and desired experience
91-
* [ ] [MVP for AWS SigV4](https://github.com/aws-powertools/powertools-lambda-python/pull/2435)
92-
93110
### Enhanced operational metrics
94111

95112
[Through customers interview](https://github.com/aws-powertools/powertools-lambda-python#connect){target="_blank"}, [Discord](https://discord.gg/B8zZKbbyET){target="_blank" rel="nofollow"}, and [1:1 customer enablement](https://github.com/aws-powertools/powertools-lambda-python#connect){target="_blank"}, we noticed customers often create the same set of custom operational metrics.
@@ -105,41 +122,6 @@ We want to make this easier by extending certain utilities to accept a `metrics`
105122
* [ ] RFC to outline metrics for Event Handler (_e.g., validation errors_ )
106123
* [ ] RFC to outline metrics for Idempotency (_e.g., cache hit_)
107124

108-
### Lambda Layer in GovCloud and China region
109-
110-
We want to investigate security and scaling requirements for these special regions, so they're in sync for every release.
111-
112-
!!! note "Help us prioritize it by reaching out to your AWS representatives or [via email](mailto:aws-powertools-maintainers@amazon.com)."
113-
114-
**Major updates**
115-
116-
* [x] Gather agencies and customers name to prioritize it
117-
* [x] Investigate security requirements for special regions
118-
* [x] Create additional infrastructure for special regions
119-
* [ ] AppSec review
120-
* [ ] Distribution sign-off
121-
* [ ] Update CDK Layer construct to include regions
122-
123-
### V3
124-
125-
We are in the process of planning the roadmap for v3. As always, [our approach](./versioning.md){target="_blank"} includes providing sufficient advance notice, a comprehensive upgrade guide, and minimizing breaking changes to facilitate a smooth transition (e.g., it took ~7 months from v2 to surpass v1 downloads).
126-
127-
For example, these are on our mind but not settled yet until we have a public tracker to discuss what these means in detail.
128-
129-
* **Parser**: Drop Pydantic v1
130-
* **Parser**: Deserialize Amazon DynamoDB data types automatically (like Event Source Data Classes)
131-
* **Parameters**: Increase default `max_age` for `get_secret`
132-
* **Event Source Data Classes**: Return sane defaults for any property that has `Optional[<type>]` returns
133-
* **Upgrade tool**: Consider building a CST (Concrete Syntax Tree) tool to ease certain upgrade actions like `pyupgrade` and `django-upgrade`
134-
* **Batch**: Stop at first error for Amazon DynamoDB Streams and Amazon Kinesis Data Streams (e.g., `stop_on_failure=True`)
135-
136-
**Major updates**
137-
138-
* [ ] Create an issue to track breaking changes we consider making
139-
* [ ] Create a v3 branch to allow early experimentation
140-
* [ ] Create workflows to allow pre-releases
141-
* [ ] Create a mechanism to keep ideas for breaking change somewhere regardless of v3
142-
143125
## Roadmap status definition
144126

145127
<center>
@@ -209,6 +191,32 @@ A: For existing features, you can directly comment on issues. For anything else,
209191

210192
## Launched
211193

194+
### Setting Parameters and Secrets
195+
196+
> [Docs](./utilities/parameters.md#setting-parameters)
197+
198+
As of today, the [Parameters](./utilities/parameters.md){target="_blank"} feature is used to retrieve data, not to create or update existing parameters. Based on community feedback, we plan to enhance Parameters to allow set operations.
199+
200+
**Major updates**
201+
202+
* [x] [RFC](https://github.com/aws-powertools/powertools-lambda-python/issues/3040)
203+
* [x] [MVP](https://github.com/aws-powertools/powertools-lambda-python/pull/2858)
204+
205+
### Amazon Bedrock Agent Event Handler
206+
207+
> [Docs](./core/event_handler/bedrock_agents.md)
208+
209+
Based on [customers](https://github.com/aws-powertools/powertools-lambda-python#connect){target="_blank"} at re:Invent 2023, we will add a new Event Handler resolver to improve authoring and maintenance of Amazon Bedrock Agents.
210+
211+
**Major updates**
212+
213+
* [x] [Event Source Data Classes support](https://github.com/aws-powertools/powertools-lambda-python/pull/3262)
214+
* [x] [Pydantic model _(Parser)_ support](https://github.com/aws-powertools/powertools-lambda-python/pull/3286)
215+
* [x] [MVP Event Handler](https://github.com/aws-powertools/powertools-lambda-python/pull/3285)
216+
* [x] [New feature documentation](https://github.com/aws-powertools/powertools-lambda-python/pull/3602)
217+
* [x] [Video to walkthrough](https://docs.powertools.aws.dev/lambda/python/latest/core/event_handler/bedrock_agents/#video-walkthrough) use cases for anyone new to LLM Agents
218+
* [ ] Launch amplifier (_e.g., What's New, Blog post_)
219+
212220
### Sensitive Data Masking
213221

214222
> [Docs](./utilities/data_masking.md)

‎poetry.lock

Lines changed: 16 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ aws-cdk-lib = "^2.138.0"
6969
"aws-cdk.aws-apigatewayv2-alpha" = "^2.38.1-alpha.0"
7070
"aws-cdk.aws-apigatewayv2-integrations-alpha" = "^2.38.1-alpha.0"
7171
"aws-cdk.aws-apigatewayv2-authorizers-alpha" = "^2.38.1-alpha.0"
72-
"aws-cdk.aws-lambda-python-alpha" = "^2.137.0a0"
73-
"cdklabs.generative-ai-cdk-constructs" = "^0.1.121"
72+
"aws-cdk.aws-lambda-python-alpha" = "^2.138.0a0"
73+
"cdklabs.generative-ai-cdk-constructs" = "^0.1.123"
7474
pytest-benchmark = "^4.0.0"
7575
mypy-boto3-appconfig = "^1.34.58"
7676
mypy-boto3-cloudformation = "^1.34.84"
@@ -110,7 +110,7 @@ datadog = ["datadog-lambda"]
110110
datamasking = ["aws-encryption-sdk", "jsonpath-ng"]
111111

112112
[tool.poetry.group.dev.dependencies]
113-
cfn-lint = "0.86.3"
113+
cfn-lint = "0.86.4"
114114
mypy = "^1.1.1"
115115
types-python-dateutil = "^2.8.19.6"
116116
httpx = ">=0.23.3,<0.28.0"

0 commit comments

Comments
 (0)
Please sign in to comment.