From af923efd01e80bb720ad10c802f786d7393f3ef0 Mon Sep 17 00:00:00 2001 From: "Shin, Jungseob" Date: Wed, 2 Oct 2024 14:51:15 +0900 Subject: [PATCH] Add dynamodb removal policy --- cdk/examples/other_stack/bedrock_agent_stack.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cdk/examples/other_stack/bedrock_agent_stack.py b/cdk/examples/other_stack/bedrock_agent_stack.py index 52c01b1a..7a734590 100644 --- a/cdk/examples/other_stack/bedrock_agent_stack.py +++ b/cdk/examples/other_stack/bedrock_agent_stack.py @@ -1,4 +1,4 @@ -from aws_cdk import Duration, Stack +from aws_cdk import Duration, Stack, RemovalPolicy from aws_cdk.aws_iam import ( ManagedPolicy, Role, @@ -36,6 +36,7 @@ def __init__( partition_key=dynamodb.Attribute(name="sessionCode", type=dynamodb.AttributeType.STRING), billing_mode=dynamodb.BillingMode.PAY_PER_REQUEST, + removal_policy=RemovalPolicy.DESTROY, ) # create S3 bucket