How to set up Automatically stop and start an Amazon RDS DB instance using AWS Systems Manager Maintenance Windowsa

Automatically stop and start an Amazon RDS DB instance using AWS Systems Manager Maintenance Windows using terraform code.

Referring the below link to set up further by using terraform.
Automatically stop and start an Amazon RDS DB instance using AWS Systems Manager Maintenance Windows - AWS Prescriptive Guidance

Note: service role method would like to be use as below,

Thanks for sharing this resource! Automating the start and stop of RDS instances using AWS Systems Manager Maintenance Windows can greatly optimize resource utilization and whatsapp apk download cost management. Leveraging Terraform for infrastructure as code adds another layer of efficiency to the process. Using IAM roles for Systems Manager Automation ensures secure and controlled access.