-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.py
37 lines (31 loc) · 871 Bytes
/
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env python3
import os
import aws_cdk as cdk
import cdk_nag
from code.code_stack import CodeStack
from cdk_nag import NagSuppressions
from aws_cdk import Aspects
app = cdk.App()
appStack = CodeStack(
app,
"genai-knowledge-capture-stack",
env=cdk.Environment(
account=os.getenv("CDK_DEFAULT_ACCOUNT"), region=os.getenv("CDK_DEFAULT_REGION")
),
)
Aspects.of(appStack).add(cdk_nag.AwsSolutionsChecks())
NagSuppressions.add_stack_suppressions(
appStack,
suppressions=[
{"id": "AwsSolutions-IAM5", "reason": "Dynamic resource creation"},
{
"id": "AwsSolutions-IAM4",
"reason": "Managed policies are used for log stream access",
},
{
"id": "AwsSolutions-L1",
"reason": "Lambda auto-created by CDK library construct",
},
],
)
app.synth()