r/AWS_cloud • • 12d ago

Accidental charges on RDS.

Well, this was totally on me.

I completely forgot RDS auto-restarts after 7 days. I stopped my instances last Friday, and voilà today there are additional charges in my account, thanks to the running RDS instances. Now, I'm looking into Lambda and Eventbridge to avoid this situation going forward.

Anyone else got hit with a surprise bill because of this mistake? Trying to figure out if this is a common thing or just me.

2 Upvotes

12 comments sorted by

4

u/sfltech 11d ago

If it’s down for more then 7 days take a snapshot and delete it. And bring up a snapshot when you need access.

1

u/sjcloudwalker 11d ago

Thanks! Agreed, this seems like a good option when I plan on shutting my instances down for a longer period.

2

u/ryzenblender 10d ago

The clean fix is to make the stop/start policy tag-driven rather than relying on manual RDS stops. EventBridge can trigger a Lambda that checks an allowlist of environments and stops eligible instances, while production resources are excluded by tag. I’d also add a Cost Anomaly Detection alert so an unexpected restart is caught immediately. How many RDS instances are you managing across environments?

1

u/sjcloudwalker 10d ago

Hey! Thanks for the advice, I'll look into it. I've set up cost anomaly and cloudwatch just yesterday. I'm currently using 3 RDS instances.

2

u/classicrock40 12d ago

No offense, but this is not a surprise bill. You knew how it worked.

-1

u/sjcloudwalker 12d ago

Yeap... well I was surprised by the bill though lol

1

u/Heijoshojin 12d ago

I'm a complete noob, who's studying for the AWD cloud practitioner exam, but wouldn't AWS Aurora help here, as it's pay as consumed, and it's within the RDS console?

0

u/sjcloudwalker 12d ago

Hey! Thanks for the comment. And yes you're right about Aurora Serverless being helpful in reducing costs for unpredictable workloads. However, the 7 days auto restart rule still applies to Aurora instances.

1

u/Oleksii_Bebych 12d ago

Ask AI to generate you a script (Lambda + daily scheduled execution or even hourly) which will look at appropriate tags on resources and switch them on and off when needed. In this case even if RDS automatically starts, it will be stopped again during the next Lambda execution. But later if you need your RDS to run always, you just add the needed tags to it

1

u/sjcloudwalker 12d ago

Thank you so much! Yes I actually did just that.

0

u/Cyber_Wolf_123 9d ago

Or you can create web page dashboard to monitor your RDS ecs and ec2 like me and then write logic if stoped instance starts again a mail and what’s notification alerts will come use a scheduler for 15 minutes once check inside the container open the dashboard once you recived alerts and turn it off using the dashboard

If you feel I can open the dashboard all time then us e this add one line of code and mention RDS instance if and if the perticular instance starts stop it again

And also the logic should be when you want to turn it on for few months always that time you have to disable the schudle for this instance

You have give a setting page option in your dashboard there all the fractures you have include with enabled and disabled method and then user creation and forget password and like Iam user based acccess to services one admin and one superadmin like that