Skip to content

Commit 015720f

Browse files
committed
chore: Use cdk-nag for time CDK stack
1 parent bb6a16c commit 015720f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

examples/servers/time/cdk_stack.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from aws_cdk import (
22
App,
3+
Aspects,
34
DockerVolume,
45
Environment,
56
RemovalPolicy,
@@ -9,6 +10,7 @@
910
aws_lambda_python_alpha as lambda_python,
1011
aws_logs as logs,
1112
)
13+
from cdk_nag import AwsSolutionsChecks
1214
from constructs import Construct
1315
import jsii
1416
import os
@@ -87,11 +89,12 @@ def __init__(
8789
stack_name_suffix = (
8890
f'-{os.environ["INTEG_TEST_ID"]}' if "INTEG_TEST_ID" in os.environ else ""
8991
)
90-
LambdaTimeMcpServer(
92+
stack = LambdaTimeMcpServer(
9193
app,
9294
"LambdaMcpServer-Time",
9395
stack_name_suffix,
9496
stack_name="LambdaMcpServer-Time" + stack_name_suffix,
9597
env=env,
9698
)
99+
Aspects.of(stack).add(AwsSolutionsChecks(verbose=True))
97100
app.synth()
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
aws-cdk-lib==2.187.0
22
aws-cdk.aws-lambda-python-alpha==2.187.0a0
33
constructs>=10.0.0,<11.0.0
4+
cdk-nag==2.35.76

0 commit comments

Comments
 (0)