Skip to content

Commit 8810c03

Browse files
ran-isenbergRan Isenberg
and
Ran Isenberg
authored
feature: add lambda logging JSON support and minor updates (ran-isenberg#772)
Co-authored-by: Ran Isenberg <[email protected]>
1 parent 93d3291 commit 8810c03

8 files changed

+187
-184
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -250,3 +250,4 @@ dev_requirements.txt
250250
lambda_requirements.txt
251251
.dccache
252252
node_modules/
253+
.ruff_cache

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ dev:
77
pre-commit install
88
# ensures poetry creates a local virtualenv (.venv)
99
poetry config --local virtualenvs.in-project true
10-
poetry install
10+
poetry install --no-root
1111
npm ci
1212

1313
format:

Makefile_windows

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ dev:
44
pip install --upgrade pip pre-commit poetry
55
pre-commit install
66
poetry config --local virtualenvs.in-project true
7-
poetry install
7+
poetry install --no-root
88
npm ci
99

1010
format:

cdk/service/api_construct.py

+2
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ def _add_post_lambda_integration(
119119
layers=[self.common_layer],
120120
role=role,
121121
log_retention=RetentionDays.ONE_DAY,
122+
log_format=_lambda.LogFormat.JSON.value,
123+
system_log_level=_lambda.SystemLogLevel.INFO.value,
122124
)
123125

124126
# POST /api/orders/

cdk/service/service_stack.py

+1
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,6 @@ def _add_security_tests(self) -> None:
5252
{'id': 'AwsSolutions-APIG6', 'reason': 'not mandatory in a sample template'},
5353
{'id': 'AwsSolutions-APIG4', 'reason': 'authorization not mandatory in a sample template'},
5454
{'id': 'AwsSolutions-COG4', 'reason': 'not using cognito'},
55+
{'id': 'AwsSolutions-L1', 'reason': 'Python 3.12 not out yet'},
5556
],
5657
)

package-lock.json

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"dependencies": {
3-
"aws-cdk": "2.106.1"
3+
"aws-cdk": "2.110.0"
44
}
55
}

0 commit comments

Comments
 (0)