title: Entity Framework Core on top of an AWS Aurora PostgreSQL cluster with a write/read node and a read only node
body: <p>I have an API Gateway running .NET Core which proxies to AWS Lambda functions. Using Entity Framework Core, these Lambda functions communicate with an AWS Aurora PostgreSQL RDS Cluster. The cluster contains one read/write node and one read only node. </p>
  
  <p>During setting up EF Core, I used database first to scaffold, which has worked fine. The scaffolding was done off the read/write instance of the cluster, and the read write instance is what is referenced in the context connection string in the resulting DatabaseContext class. </p>
  
  <p>However, I have some read intensive API methods (and resulting Lambda functions) that I would like to point specifically to my read only node (which has sub-second replication from the read/write node managed automatically by AWS). I have no idea however, how to set this up in my EF Core implementation. I am a beginner with EF Core, so I've been really happy that I have it working with the one node. How do I set things up in my .NET Core application so I can specify some queries to go to the read only node? The read only node has exactly the same schema and objects. </p>
  
  <p>If I try to do a database first scaffold using the db context scaffold via the EF Core CLI but point it to the read only node, will that work? Or fail miserably? Is there some kind of specific way I should be setting this up? Or should I avoid EF Core for the read only node, and just use something like Dapper or SqlKata to do the read only queries and maintain its own connections etc? </p>