Skip to content

Commit 58c803c

Browse files
committed
Merge branch 'feat/idempotency-output-serializer' of github.com:aradyaron/powertools-lambda-python into feat/idempotency-output-serializer
2 parents baf49bc + d8361af commit 58c803c

33 files changed

+470
-177
lines changed

.github/workflows/codeql-analysis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828

2929
steps:
3030
- name: Checkout repository
31-
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
31+
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
3232

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

.github/workflows/dependency-review.yml

+1-1
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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
20+
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
2121
- name: 'Dependency Review'
2222
uses: actions/dependency-review-action@f6fff72a3217f580d5afd49a46826795305b63c7 # v3.0.8

.github/workflows/dispatch_analytics.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
statuses: read
4444
steps:
4545
- name: Configure AWS credentials
46-
uses: aws-actions/configure-aws-credentials@5fd3084fc36e372ff1fff382a39b10d03659f355 # v2.2.0
46+
uses: aws-actions/configure-aws-credentials@ef93a73b1313f148011965ef7361f667f371f58b # v3.0.0
4747
with:
4848
aws-region: eu-central-1
4949
role-to-assume: ${{ secrets.AWS_ANALYTICS_ROLE_ARN }}

.github/workflows/label_pr_on_title.yml

+1-1
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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
53+
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
5454
- name: "Label PR based on title"
5555
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1
5656
env:

.github/workflows/on_label_added.yml

+1-1
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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
50+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
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@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1

.github/workflows/on_merged_pr.yml

+1-1
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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
52+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
5353
- name: "Label PR related issue for release"
5454
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1
5555
env:

.github/workflows/on_opened_pr.yml

+2-2
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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
50+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
5151
- name: "Ensure related issue is present"
5252
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
69+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
7070
- name: "Ensure acknowledgement section is present"
7171
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1
7272
env:

.github/workflows/ossf_scorecard.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222

2323
steps:
2424
- name: "Checkout code"
25-
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
25+
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
2626
with:
2727
persist-credentials: false
2828

.github/workflows/publish_v2_layer.yml

+2-2
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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
91+
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
9292
with:
9393
ref: ${{ env.RELEASE_COMMIT }}
9494

@@ -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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
250+
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
251251
with:
252252
ref: ${{ env.RELEASE_COMMIT }}
253253

.github/workflows/quality_check.yml

+1-1
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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
53+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
5454
- name: Install poetry
5555
run: pipx install poetry
5656
- name: Set up Python ${{ matrix.python-version }}

.github/workflows/quality_check_pydanticv2.yml

+1-1
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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
53+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
5454
- name: Install poetry
5555
run: pipx install poetry
5656
- name: Set up Python ${{ matrix.python-version }}

.github/workflows/record_pr.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
permissions:
4747
contents: read # NOTE: treat as untrusted location
4848
steps:
49-
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
49+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
5050
- name: "Extract PR details"
5151
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1
5252
with:

.github/workflows/release.yml

+8-8
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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
83+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
118+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
159+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
160160
with:
161161
ref: ${{ env.RELEASE_COMMIT }}
162162

@@ -206,7 +206,7 @@ jobs:
206206
# NOTE: provenance fails if we use action pinning... it's a Github limitation
207207
# because SLSA needs to trace & attest it came from a given branch; pinning doesn't expose that information
208208
# https://github.com/slsa-framework/slsa-github-generator/blob/main/internal/builders/generic/README.md#referencing-the-slsa-generator
209-
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.8.0
209+
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.9.0
210210
with:
211211
base64-subjects: ${{ needs.build.outputs.attestation_hashes }}
212212
upload-assets: false # we upload its attestation in create_tag job, otherwise it creates a new release
@@ -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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
228+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
262+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
306+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
360+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
361361
with:
362362
ref: ${{ env.RELEASE_COMMIT }}
363363

.github/workflows/reusable_deploy_v2_layer_stack.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ jobs:
138138
has_arm64_support: "true"
139139
steps:
140140
- name: checkout
141-
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
141+
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
142142
with:
143143
ref: ${{ env.RELEASE_COMMIT }}
144144

@@ -151,7 +151,7 @@ jobs:
151151
- name: Install poetry
152152
run: pipx install git+https://github.com/python-poetry/poetry@68b88e5390720a3dd84f02940ec5200bfce39ac6 # v1.5.0
153153
- name: aws credentials
154-
uses: aws-actions/configure-aws-credentials@5fd3084fc36e372ff1fff382a39b10d03659f355 # v2.2.0
154+
uses: aws-actions/configure-aws-credentials@ef93a73b1313f148011965ef7361f667f371f58b # v3.0.0
155155
with:
156156
aws-region: ${{ matrix.region }}
157157
role-to-assume: ${{ secrets.AWS_LAYERS_ROLE_ARN }}

.github/workflows/reusable_deploy_v2_sar.yml

+3-3
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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
82+
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
8383
with:
8484
ref: ${{ env.RELEASE_COMMIT }}
8585

@@ -91,7 +91,7 @@ jobs:
9191

9292

9393
- name: AWS credentials
94-
uses: aws-actions/configure-aws-credentials@5fd3084fc36e372ff1fff382a39b10d03659f355 # v2.2.0
94+
uses: aws-actions/configure-aws-credentials@ef93a73b1313f148011965ef7361f667f371f58b # v3.0.0
9595
with:
9696
aws-region: ${{ env.AWS_REGION }}
9797
role-to-assume: ${{ secrets.AWS_LAYERS_ROLE_ARN }}
@@ -101,7 +101,7 @@ jobs:
101101
# we then jump to our specific SAR Account with the correctly scoped IAM Role
102102
# this allows us to have a single trail when a release occurs for a given layer (beta+prod+SAR beta+SAR prod)
103103
- name: AWS credentials SAR role
104-
uses: aws-actions/configure-aws-credentials@5fd3084fc36e372ff1fff382a39b10d03659f355 # v2.2.0
104+
uses: aws-actions/configure-aws-credentials@ef93a73b1313f148011965ef7361f667f371f58b # v3.0.0
105105
id: aws-credentials-sar-role
106106
with:
107107
aws-access-key-id: ${{ env.AWS_ACCESS_KEY_ID }}

.github/workflows/reusable_export_pr_details.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
prIsMerged: ${{ steps.prIsMerged.outputs.prIsMerged }}
7373
steps:
7474
- name: Checkout repository # in case caller workflow doesn't checkout thus failing with file not found
75-
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
75+
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
7676
- name: "Download previously saved PR"
7777
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1
7878
env:

.github/workflows/reusable_publish_changelog.yml

+1-1
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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
29+
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
3030
with:
3131
fetch-depth: 0
3232
- name: "Generate latest changelog"

.github/workflows/reusable_publish_docs.yml

+2-2
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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
47+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
4848
with:
4949
fetch-depth: 0
5050
ref: ${{ inputs.git_ref }}
@@ -79,7 +79,7 @@ jobs:
7979
poetry run mike set-default --push latest
8080
8181
- name: Configure AWS credentials
82-
uses: aws-actions/configure-aws-credentials@5fd3084fc36e372ff1fff382a39b10d03659f355
82+
uses: aws-actions/configure-aws-credentials@ef93a73b1313f148011965ef7361f667f371f58b
8383
with:
8484
aws-region: us-east-1
8585
role-to-assume: ${{ secrets.AWS_DOCS_ROLE_ARN }}

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

+2-2
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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
54+
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
5555
- name: Install poetry
5656
run: pipx install poetry
5757
- name: "Use Python"
@@ -71,7 +71,7 @@ jobs:
7171
- name: Install dependencies
7272
run: make dev
7373
- name: Configure AWS credentials
74-
uses: aws-actions/configure-aws-credentials@5fd3084fc36e372ff1fff382a39b10d03659f355 # v2.2.0
74+
uses: aws-actions/configure-aws-credentials@ef93a73b1313f148011965ef7361f667f371f58b # v3.0.0
7575
with:
7676
role-to-assume: ${{ secrets.AWS_TEST_ROLE_ARN }}
7777
aws-region: ${{ env.AWS_DEFAULT_REGION }}

.github/workflows/secure_workflows.yml

+1-1
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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
33+
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
3434
- name: Ensure 3rd party workflows have SHA pinned
3535
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@f32435541e24cd6a4700a7f52bb2ec59e80603b1 # v2.1.4
3636
with:

CHANGELOG.md

+13
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,22 @@
44
<a name="unreleased"></a>
55
# Unreleased
66

7+
## Bug Fixes
8+
9+
* **event_handler:** make invalid chars a raw str to fix DeprecationWarning ([#2982](https://github.com/aws-powertools/powertools-lambda-python/issues/2982))
10+
* **metrics:** preserve default_tags when metric-specific tag is set in Datadog provider ([#2997](https://github.com/aws-powertools/powertools-lambda-python/issues/2997))
11+
712
## Maintenance
813

14+
* **deps:** bump slsa-framework/slsa-github-generator from 1.8.0 to 1.9.0 ([#2992](https://github.com/aws-powertools/powertools-lambda-python/issues/2992))
15+
* **deps:** bump squidfunk/mkdocs-material from `cd3a522` to `97da15b` in /docs ([#2987](https://github.com/aws-powertools/powertools-lambda-python/issues/2987))
916
* **deps:** bump the layer-balancer group in /layer/scripts/layer-balancer with 3 updates ([#2978](https://github.com/aws-powertools/powertools-lambda-python/issues/2978))
17+
* **deps:** bump the layer-balancer group in /layer/scripts/layer-balancer with 3 updates ([#2983](https://github.com/aws-powertools/powertools-lambda-python/issues/2983))
18+
* **deps:** bump actions/checkout from 3.5.3 to 3.6.0 ([#2999](https://github.com/aws-powertools/powertools-lambda-python/issues/2999))
19+
* **deps-dev:** bump ruff from 0.0.284 to 0.0.285 ([#2977](https://github.com/aws-powertools/powertools-lambda-python/issues/2977))
20+
* **deps-dev:** bump mkdocs-material from 9.1.21 to 9.2.0 ([#2984](https://github.com/aws-powertools/powertools-lambda-python/issues/2984))
21+
* **deps-dev:** bump mkdocs-material from 9.2.0 to 9.2.3 ([#2988](https://github.com/aws-powertools/powertools-lambda-python/issues/2988))
22+
* **deps-dev:** bump aws-cdk from 2.92.0 to 2.93.0 ([#2993](https://github.com/aws-powertools/powertools-lambda-python/issues/2993))
1023

1124

1225
<a name="v2.23.0"></a>

aws_lambda_powertools/event_handler/api_gateway.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
_DYNAMIC_ROUTE_PATTERN = r"(<\w+>)"
4444
_SAFE_URI = "-._~()'!*:@,;=" # https://www.ietf.org/rfc/rfc3986.txt
4545
# API GW/ALB decode non-safe URI chars; we must support them too
46-
_UNSAFE_URI = "%<> \[\]{}|^" # noqa: W605
46+
_UNSAFE_URI = r"%<> \[\]{}|^"
4747
_NAMED_GROUP_BOUNDARY_PATTERN = rf"(?P\1[{_SAFE_URI}{_UNSAFE_URI}\\w]+)"
4848
_ROUTE_REGEX = "^{}$"
4949

aws_lambda_powertools/metrics/provider/datadog/datadog.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,11 @@ def _serialize_datadog_tags(metric_tags: Dict[str, Any], default_tags: Dict[str,
327327
>>> serialize_datadog_tags(metric_tags, None)
328328
['environment:production', 'service:web']
329329
"""
330-
tags = metric_tags or default_tags
330+
331+
# We need to create a new dictionary by combining default_tags first,
332+
# and then metric_tags on top of it. This ensures that the keys from metric_tags take precedence
333+
# and replace corresponding keys in default_tags.
334+
tags = {**default_tags, **metric_tags}
331335

332336
return [f"{tag_key}:{tag_value}" for tag_key, tag_value in tags.items()]
333337

docs/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# v9.1.18
2-
FROM squidfunk/mkdocs-material@sha256:cd3a522b3282071586552499611f71206db0aec145d4d53822bc6fde76792cf8
2+
FROM squidfunk/mkdocs-material@sha256:97da15bac17e76561c88c87d5734583fd2d638a51c9f28a1a7ba8e8aa34c0fc9
33
# pip-compile --generate-hashes --output-file=requirements.txt requirements.in
44
COPY requirements.txt /tmp/
55
RUN pip install --require-hashes -r /tmp/requirements.txt

layer/scripts/layer-balancer/go.mod

+12-12
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,24 @@ module layerbalancer
33
go 1.18
44

55
require (
6-
github.com/aws/aws-sdk-go-v2 v1.20.3
7-
github.com/aws/aws-sdk-go-v2/config v1.18.35
8-
github.com/aws/aws-sdk-go-v2/service/lambda v1.39.4
6+
github.com/aws/aws-sdk-go-v2 v1.21.0
7+
github.com/aws/aws-sdk-go-v2/config v1.18.36
8+
github.com/aws/aws-sdk-go-v2/service/lambda v1.39.5
99
golang.org/x/exp v0.0.0-20230321023759-10a507213a29
1010
golang.org/x/sync v0.3.0
1111
)
1212

1313
require (
1414
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.13 // indirect
15-
github.com/aws/aws-sdk-go-v2/credentials v1.13.34 // indirect
16-
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.10 // indirect
17-
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.40 // indirect
18-
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.34 // indirect
19-
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.41 // indirect
20-
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.34 // indirect
21-
github.com/aws/aws-sdk-go-v2/service/sso v1.13.4 // indirect
22-
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.4 // indirect
23-
github.com/aws/aws-sdk-go-v2/service/sts v1.21.4 // indirect
15+
github.com/aws/aws-sdk-go-v2/credentials v1.13.35 // indirect
16+
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 // indirect
17+
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 // indirect
18+
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 // indirect
19+
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.42 // indirect
20+
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect
21+
github.com/aws/aws-sdk-go-v2/service/sso v1.13.5 // indirect
22+
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.5 // indirect
23+
github.com/aws/aws-sdk-go-v2/service/sts v1.21.5 // indirect
2424
github.com/aws/smithy-go v1.14.2 // indirect
2525
github.com/jmespath/go-jmespath v0.4.0 // indirect
2626
)

0 commit comments

Comments
 (0)