Recommended ways and risks for scaling RDS instance vertically

0

Recently I have been working on optimising costs and scale down resources when they are not in use for non prod environments.

I am currently looking at scaling vertically RDS instance. I would like to change the RDS instance class to something smaller than what it needs during non business hours. This is because Devs and automated tests do not work and run all day long hence outside business hours I would like to change the instance class to something cheaper to run. By what I could find on the web people recommend to set up cloud watch alarms on certain RDS metrics such as CPU usage etc. And then once alarm is triggered, use event bridge to trigger a lambda which would change the RDS instance class to what it needs to be.

Since we know what our business hours are, generally we would like to scale up/down at certain time of the day. Given this I was thinking to use event bridge scheduler that will invoke a lambda on a schedule which will change the RDS instance class.

Even though I know this is doable, because I've done it with other resources, I would like to know if this approach is unusual or wrong for RDS? If so, why?

Also can I scale down/up RDS instance using different family types?

Is there any other better approach to achieve what I want? Lastly, if relevant to non prod envs what are the risks of scaling up/down RDS instance?

asked 9 months ago398 views
1 Answer
0

I myself actually stop the RDS out of hours using Eventbridge, step functions and a Lambda function. I stop and start out of hours than changing the instance type.

Changing the instance type can work but in practice, this can take longer than starting and stopping an instance.

Yes you can change instance types. I have seen this fail when carrying out manually also on occasion due to lack of resources

Either way, there will be downtime when any of this ocurrs. Id preffer to use a schedule than CPU because you may have your RDS scaling all day long and interrupting your devs

profile picture
EXPERT
answered 9 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions