Skip to content

Commit 07cb567

Browse files
committed
setting a log retention policy
1 parent 924cfe6 commit 07cb567

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

aws_setup/workbench_compute/workbench_compute/workbench_compute_stack.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
aws_sqs as sqs,
1010
aws_lambda as lambda_,
1111
aws_lambda_event_sources as lambda_events,
12+
aws_logs as logs,
1213
Duration,
1314
Size,
1415
)
@@ -193,6 +194,7 @@ def create_batch_trigger_lambda(self) -> lambda_.Function:
193194
handler="index.lambda_handler",
194195
code=lambda_.Code.from_inline(self._get_lambda_code()),
195196
timeout=Duration.minutes(5),
197+
log_retention=logs.RetentionDays.ONE_WEEK,
196198
environment={
197199
"WORKBENCH_BUCKET": self.workbench_bucket,
198200
"JOB_QUEUE": self.batch_job_queue.job_queue_name,

0 commit comments

Comments
 (0)