Postgres Database Update
Add Newer Postgres versions
I'd like copilot CLI to support adding different Postgres versions.
Use case
I have been using Copilot since mid last year. I created a database with the Postgres storage helper. It created a Postgres 10.12 Aurora database. I recently attempted to add a procedure to my Postgres database. This was added at version 11, so I've currently been struggling to create a new database in copilot with the new version.
Hello @theswerd. Thank you for your support for Copilot! For Aurora database, Copilot only helps you to create the addons template when you run copilot storage init. And then you should be able to freely adjust any configuration on your own. For example, in order to upgrade the db to at least version 11, you can modify one of the field in your addons file like this
EngineVersion: '11.9'
for the AWS::RDS::DBCluster resource.
P.S. It is also recommended to do a quick db snapshot before upgrading your db version.
Turns out this is more of an aurora + cloud formation issue, AWS Aurora Serverless v1 only supports up to 10.18, and while Aurora Serverless v2 supports newer versions, Cloudformation doesn't support Aurora Serverless V2. if you have any ideas how I can keep the same type of configuration while moving my Postgres to preferably 13+, I'd love to hear them.
Oh I am so sorry about that! But we can't do much unless CFN supports Aurora Serverless V2. I'll keep you posted when it is about to get supported or if we find out a way to get around with this dependency.
Aurora Serverless v2 by default is now released in v1.23.0: https://github.com/aws/copilot-cli/releases/tag/v1.23.0! 🎉
I know this thread is already closed but I think my question relates to this. Also, please forgive me if this is a stupid question as I'm still finding my way.
I need to upgrade the database instance in an environment that is already deployed from Aurora PostgreSQL version 10.x to Amazon Aurora PostgreSQL 11 or higher.
It seems from the above that all I need to do is change the EngineVersion in the addons file and then redeploy the environment. Is this correct?
Once again, apologies for what is most likely a newbie question.
@petewnr Sorry for getting back to you so late 🙏🏼 !
It seems from the above that all I need to do is change the EngineVersion in the addons file and then redeploy the environment. Is this correct?
This is mostly correct! Just make sure your addon is Aurora Serverless v2. If this is the case, you just need to change EngineVersion and run copilot svc deploy to deploy the service and the addons (instead of redeploying environment)
If you created the addon using copilot storage init before v1.23.0 (released Nov 3, 2022), then it's an v1. In this case, you might need to create a new addon using copilot storage init to get a v2, and migrate the data from the old addon to the new one.