Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS: Invalid storage size for engine name postgres

I have a RDS instance in amazon I want to modify the allocated storage for, it's currently at 500GB but I want it at 50GB. However when I try changing this in the console I receive the following error: Invalid storage size for engine name postgres and storage type standard: 60

I have a Elasticbeanstalk application that had no RDS instance associated with it, after reading around I've read that some people needed to have an instance with the same specs as the RDS you're trying to modify, however that didn't work either.

Any help here?

like image 760
Amon Avatar asked Oct 19 '20 00:10

Amon


2 Answers

You can't decrease allocate storage for your RDS. It can only be increased. From docs:

You can only increase the allocated storage. You can't reduce the allocated storage.

You would have to migrate your database to new RDS instance with smaller storage.

like image 82
Marcin Avatar answered Oct 21 '22 23:10

Marcin


I've run into a curious version of the You can't reduce the allocated storage issue.

DBInstance definition in cloudformation included AllocatedStorage: nn and MaxAllocatedStorage: nnnn. Then I wanted to redeploy changing the DBInstanceClass and got this error.

The problem was that the DB grew above the allocated storage, so seems that by deploying a new instance with the original allocated storage I was trying to reduce it below the actual currently allocated storage.

Solution was to check the size of the latest DB snapshot and update the Cloudformation AllocatedStorage property with it.

like image 21
Federico Avatar answered Oct 21 '22 23:10

Federico