Peter Ferrarotto
Peter Ferrarotto

Reputation: 156

MySQL Aurora DB Instance Turned read-only on by itself on AWS RDS

I've been working with MySQL and AuroraDB on AWS for a while now for a site I'm making. Up until a few minutes ago, I've been able to run any and all mutator functions on the instance through Lambda and MySQL workbench.

However, when I attempted to run an INSERT a few minutes ago, it gave me an error. I traced it back to Lambda saying that the --read-only flag is on my DB instance.

I was able to run these queries this morning, and now I cannot UPDATE, INSERT, or DELETE. I don't understand why it set itself to read-only randomly, besides maybe some sort of management or cleanup occurring on the AWS server, but under notifications there wasn't anything relating to any kind of maintenance.

Please let me know if there's any more information you need. I assumed that the code I was running is arbitrary, as I've tried running SQL commands directly through the workbench with the same results.

Upvotes: 2

Views: 2794

Answers (1)

Peter Ferrarotto
Peter Ferrarotto

Reputation: 156

I found out the issue - the role of the slave instances of my Aurora cluster had swapped, probably during maintenance. I've since pointed all my Lambda functions to the cluster itself, which I actually didn't even know was something you could do, let alone the standard practice.

Upvotes: 3

Related Questions