Automatically stop and start an Amazon RDS DB instance in a CDK app

0

Hi, I just read the document said that we can automatically stop and start an RDS DB instance on a specific schedule. So, I would like to know how to do the same job via CDK? My schedule requirement is like stopping at 0am and starting at 9am each day. Thanks!

1개 답변
0
수락된 답변

Based on that document, the scheduling is done by System Manager Maintenance Window, There is CDK for that service although it is in L1 Construct (ie. uses the basic Cloudformation structure). Here is the CDK reference: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ssm.CfnMaintenanceWindow.html

Alternatively, you can run EventBridge + Lambda to do custom scheduling: https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/RunLambdaSchedule.html.

profile pictureAWS
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠