If you do this for fully automatic disaster recovery purposes, it might be worthwhile, but otherwise you have to think about if you actually save anything by investing the significant amount of time you need to reliably (!) automate what should be a very rare one-off operation (if you have to do this all the time, something's very wrong in your environment)....
Your screenshot of the security group shows you have not permitted public access. You've only allowed traffic from security group sg-a5d469ca. That rule doesn't cover your IP at all; you're not in a security group. Add a new rule, for port 5432, and pick "my IP" in the "source" dropdown.
Using Configuration Management (CM) tooling such as Puppet, Ansible, Chef or Salt needs a fundamental change in the way you think about configuration.
If you think about configuration as a one-time event, you will never see (or realise) any benefit from using CM.
The main power of CM is the ability to express your desired configuration as code. Once you ...
Someone suggested me, on mariadb's jira to force the setting alter_algorithm to COPY.
So far the problem hasn't reappeared.
I had the same error on databases that uses the broker that where moved to another server so I'm writing my answer in case it can help someone.
When you move a database that uses the broker with an encryption key, it seems you need to recreate the master key for the broker to be able to use it.
First, open the master key, then recreate it.
OPEN MASTER KEY ...