- Newest
- Most votes
- Most comments
Based on your description, you've successfully set up a system where your PHP application can write to the primary Aurora Global Database cluster through the reader endpoint in the secondary region. This is likely using the write forwarding feature of Aurora Global Database, which allows secondary clusters to forward write operations to the primary cluster.
However, you're encountering limitations with the RDS Data API when trying to achieve the same functionality for your desktop application. The limitation you've quoted is accurate - the RDS Data API requires access to a writer instance for query processing (even for read queries), and since secondary clusters in an Aurora Global Database don't have writer instances until promoted to primary, the Data API cannot process queries against the secondary cluster.
For your use case, there are a few alternatives to consider:
-
Use direct database connectivity from your desktop application instead of the Data API. This would allow you to leverage write forwarding similar to your PHP application.
-
Set up an API layer (like a REST API using AWS Lambda or API Gateway) that connects to the appropriate Aurora cluster and provides endpoints for your desktop application.
-
Use RDS Proxy with your Aurora Global Database. RDS Proxy can work with Aurora Global Databases and might provide a more suitable connection management solution for your desktop application.
The write forwarding feature you're using with your PHP application is specifically designed to allow secondary clusters to forward write operations to the primary cluster, but this functionality isn't currently integrated with the RDS Data API's architecture, which requires a writer instance to be present in the cluster it's connecting to.
Sources
Using write forwarding in an Aurora PostgreSQL global database - Amazon Aurora
Using write forwarding in an Aurora MySQL global database - Amazon Aurora
Using RDS Proxy with Aurora global databases - Amazon Aurora
Using the Amazon RDS Data API - Amazon Aurora
Using Amazon Aurora Global Database - Amazon Aurora
Relevant content
asked 3 years ago
