Question

I have to scale down a RDS database on Elastic Beanstalk. Right now it has 1024GB and I need just 30GB.

I read that I have to create a new instance and restore a dump.

The problem is that I don't know how to "attach" the new RDS instance to my existing Beanstalk environment.

Any help?

Was it helpful?

Solution

The first thing you need to do is create a snapshot of your current database then disassociate the database from the Elastic Beanstalk environment. Once you do that, you should be able to go to the Data Layer page and reference the instructions provided by Amazon here making sure to set your DB size to just the 30GB you need:

To create an Amazon RDS database and associate it with your existing environment

  1. Select if you want to create a blank Amazon RDS DB or create one from a snapshot. If you choose to create a database from a snapshot, then select a snapshot from the Snapshot list.

  2. For DB Engine, select a database engine.

  3. For Instance Class, select a database instance class. For information about the DB instance classes, go to http://aws.amazon.com/rds/.

  4. For Allocated Storage, type the desired amount space (in GB). In some cases, allocating a higher amount of storage for your DB instance than the size of your database can improve IO performance. For information about storage allocation, go to Features.

  5. For Master Username, use alphanumeric characters to type a name that you will use to log on to your DB instance with all database privileges.

  6. For Master Password, type 8 to 16 printable ASCII characters (excluding /, \, and @) for your master user password.

  7. For Deletion Policy, select whether to create a snapshot of your database or delete it if you terminate your AWS Elastic Beanstalk environment. The default is Delete, which deletes your database and discards your data if you terminate your environment.

  8. Select whether to configure your database across multiple Availability Zones or just one. Running your database instance in multiple Availability Zones safeguards your data in the unlikely event of a database instance component failure or service health disruption in one Availability Zone.

  9. Click Save.

AWS Elastic Beanstalk updates the environment and creates the Amazon RDS database. After the update is complete, you can view the databases by going to the Configuration page.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top