Is there a way to set an Aurora writer instance read-only?


What I want to do is SET global read_only=1 on an AWS Aurora writer instance. Obviously this requires the SUPER grant, and I gather from other answers and Aurora documentation that SUPER cannot be granted. AFAICT there is no mysql.rds_* function that does this, and I can’t make out whether there is some parameter group that would allow something like this to be done.

Other than locking individual tables for writes, are there any other options available in this situation?


You are correct in that it needs to be done in a parameter group.

You can either edit your existing parameter group, or copy it to a new one and then edit the parameter group and change read_only from {TrueIfReplica} to 1, and then save your changes.

You will be prompted whether to apply the change immediately or in the next maintenance window, but its a very quick change to apply and I am sure you would want to apply it immediately.

Once the change is applied, it will take about 5-10 seconds to take effect.

Answered By – Ashley Kleynhans

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published