I just launched V2 of my project 'Who's That Pokémon?'
2 min readI just launched V2 of my project 'Who's That Pokémon?'.
Apr 16, 2024
In our development environment, we use an RDS - Aurora PostgreSQL database hosted on AWS to manage our data efficiently. However, we recently noticed that keeping RDS running around the clock was significantly increasing our monthly cloud bill. To tackle this, we implemented a simple solution: schedule RDS to shut down after 6 PM and start again at 9 AM the next day. This basic measure saved me $40 a month.
a. Go to IAM

b. In the sub menu, open Policies
c. Click Create Policy:

d. In the Policy editor, paste the following and click Next:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"rds:Describe*",
"rds:Start*",
"rds:Stop*",
"rds:Reboot*"
],
"Resource": "*"
}
]
} e. Click Create policy

f. With the policy created, open Roles in the sub menu
g. Click Create Role

h. Choose the Custom trust policy option and click next

i. Select the permission created earlier and click next.

j. Confirm the details and click Create role

k. Go to Systems Manager

a. In the submenu, open State Manager and click Create association:

b. The first field is the name you want to give the association. E.g.: StopRds c. In the Document section, search for AWS-StartStopAuroraCluster

d. In the Input parameters section, fill in the name of the RDS cluster you want to start, and the role we created in the previous step

e. In the Specify schedule section, set the time the action should run, keeping in mind that it uses UTC.

f. Finally, click Create Association
With these settings in place, your RDS will be shut down automatically at 6 PM and restarted at 9 AM every day, saving resources and reducing your AWS costs.
If you need to run the action immediately, you can do so from the list of Associations.
I hope this guide helps you optimize your AWS costs while keeping operations efficient. If you have any questions or want to share your experience with this tip, feel free to leave a comment below. I’m here to help!
Thanks for reading.
I just launched V2 of my project 'Who's That Pokémon?'.
Websites, newsletters and podcasts every dev should know.
A powerful platform for app development.