I have to completely decommission an AWS RDS instance and all its associated resources while ensuring that it can be restored (<1% chance) in the future if needed.
I am creating a snapshot for the DB instance and exporting it to S3. Just wanted to know what is the cleanest way of backing up the associated option and parameter group, so that a future restore could be easy. Couldn't find anything obvious in the AWS documentation.
There is not an actual backup mechanism, but you can output the groups to json files from the CLI, something like this:
aws rds describe-db-parameters --db-parameter-group-name exampleparametergroup --output json > exampleparametergroupfile.json
Then you can import them back with a create command:
aws rds create-db-parameter-group \
--db-parameter-group-name <group-name> \
--db-parameter-group-family <group-family> \
--description <group-description> \
--cli-input-json file://<path-to-file>
The CLI commands are available in the documentation for RDS, you will want the Describe commands for your groups.