boto/boto — pull request #1711 by stevearc (2013-09-10 02:21:33+00:00)
Title: Fixing create_cache_cluster to allow creation of Redis replicas

Amazon's documentation is incomplete in this regard, but after playing with the web interface and the API I figured out how it works.

If you launch a redis cache cluster with a ``replication_group_id``, that cluster becomes a read-only replica cluster in the replication group. BUT if you do that, then you can't send up any other parameters, *including* the "required" ones (engine, num_nodes, and cache_node_type). The one exception I have found to that is the ``preferred_availability_zone`` parameter, which I was able to figure out only because it's an option on their web interface.

Since Amazon is essentially using the same endpoint for two logically different functions, I split the ``create_cache_cluster`` command into ``create_cache_cluster`` and ``create_replica_cluster`` to match. You *could* fix the behavior by not making engine, num_nodes, and cache_node_type required arguments, but I think that is significantly less clear.