We run an app on elastic beanstalk, and EB is set up to manage an RDS Postgres instance. Is it possible to break this relationship, so that we start managing the RDS instance manually through the RDS console?
Our motivation for this is that we want to upgrade our Docker environment to a version that supports the new Health dashboard. We would need to do this without downtime. We cannot currently do a CNAME Swap, because EB manages our RDS instance. The reason is described here:
Although using Elastic Beanstalk to attach an Amazon RDS database to your environment can help you avoid downtime in accessing your application, you might lose data during the CNAME swap process. This can happen as the application continues to generate data between the time the original database is deleted and a new database becomes available for the new environment. Taking a snapshot of the original database (as recommended in the instructions that follow) only saves some data because the snapshot will not contain any newly generated data.
To avoid that, manage your Amazon RDS database from the Amazon RDS console, CLI, or API instead of Elastic Beanstalk. That way, the database is unaffected by what you do to your Elastic Beanstalk environments. If you manage the database using Amazon RDS instead of managing it using Elastic Beanstalk, during a CNAME swap from one environment to another, the original environment continues to read from and write to the existing database until you delete the environment. When traffic stops flowing to the database after the CNAME swap, you can delete the original environment without losing data.
We haven’t found a simple way to break the EB+RDS connection. Is there one (this suggests not), or do we have to do this elaborate dance:
At a minimum, that will make our app read-only after step 4, until step 6 is completed. We may be able to accept that, but I’d really love to know if there’s an easier way.