Does CloudFormation expose the Reader Endpoint of a Redis ElastiCache Replication Group?

强颜欢笑 提交于 2020-03-22 07:45:27

问题


I need to expose the Reader Endpoint of my Redis ReplicationGroup so it can be used by dependent CloudFormation stacks.

I've previously used the primary endpoint, which is available as a CloudFormation return value, but I now need to use the Reader Endpoint, introduced in June 2019 [https://aws.amazon.com/about-aws/whats-new/2019/06/amazon-elasticache-launches-reader-endpoint-for-redis/].

However the Reader Endpoint does not appear in the Return Values in the CloudFormation documentation [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticache-replicationgroup.html]

My stack outputs are defined as:

MyReplicationGroup.PrimaryEndPoint.Address
MyReplicationGroup.PrimaryEndPoint.Port

Is the Reader Endpoint available, but not yet documented? Perhaps the following is all I need?

MyReplicationGroup.ReaderEndPoint.Address
MyReplicationGroup.ReaderEndPoint.Port

I'd rather not use the ReadEndPoint.Addresses and ReadEndPoint.Ports as these are lists of replicas, and I then need to programmatically choose which to connect to - the Reader Endpoint will do all that for me (that is the whole point of it).


回答1:


You may have to resort to raising an issue on the Cloudformation coverage roadmap to make the Reader Endpoint attributes available for use in Cloudformation.




回答2:


Reader Endpoint Address is not currently exposed.

But there is a relationship between a Primary Endpoint and a Reader Endpoint which you can utilize.

Suppose you have a primary endpoint one.two.three.com.
Then reader endpoint would be one-ro.two.three.com.

In this way, you can generate the address for a Reader Endpoint with the help of a corresponding Primary Endpoint.

Note: I know this is not the permanent solution but for now as a workaround we can deduce the Reader Endpoint with the help of the Primary Endpoint.



来源:https://stackoverflow.com/questions/58302132/does-cloudformation-expose-the-reader-endpoint-of-a-redis-elasticache-replicatio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!