Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set the PreferredBackupWindow parameter in RDS CloudFormation template?

I want to launch an RDS instance from CloudFormation.

I am constructing the JSON template based on the AWS documentation .

I want to set the PreferredBackupWindow parameter, but there is no example how to enter it's value.

I want to set it to create a snapshot every day at 6 in the morning.

How should I write it?? ["PreferredBackupWindow" : String,]

Something like "PreferredBackupWindow" : "6:00UTC", ??

like image 353
Kostas Demiris Avatar asked Mar 12 '23 11:03

Kostas Demiris


1 Answers

The preferred backup and maintenance can be set as the following string inputs:

MySQLDatabase:
  Type: 'AWS::RDS::DBInstance'
  Properties:
    ...
    PreferredBackupWindow: "22:30-23:30"
    PreferredMaintenanceWindow: "mon:23:30-tue:00:30"
    ...

Please note that the time is set according to the UTC timezone.

like image 113
captainblack Avatar answered Apr 27 '23 20:04

captainblack