The store should handle the case when another master is selected in ElastiCache, while connecting to the Primary Endpoint. One way to do that is to detect the READONLY error and re-connect.