Question: Am working on AWS cluster re-assigning the replica shard in an AWS ES cluster of node 1. Where i want both primary and replica shards to be reside. But when a run the below command am getting an error 

```
curl  -XPOST 'http://AWS-CLuster-name.com/_cluster/allocation/reroute' -d '{ "commands": [{"allocate_replica":{"index": ".kibana", "shard": 0, node: "nodename" "primary": false }'

```

When run the above command am getting below error. 

```
{"Message":"Your request: '/_cluster/allocation/reroute' is not allowed."}

```

Does this mean manual shard allocation is not allowed in AWS? Could anyone please clarify. 

Thanks

Answer: 
Correct, AWS does not allow you to control shard allocation directly, at least not in the usual way. 

I'm hoping it *can* be done in some other AWS-specific way, as I've got a yellow cluster that I'd really rather be green. :(

*[Followup: it seems the Elasticsearch domain eventually realizes it can fix this itself. In our case, because we were getting short on free space, replicas were being left unassigned. We freed up space, and maybe 30 minutes later the shards started replicating all on their own.]*
This is not allowed in elasticsearch, since it would violate the concept as replicas for failover or distributed at all. <https://www.elastic.co/guide/en/elasticsearch/guide/master/replica-shards.html> 

Having the same primary and replica shard on the same node is useless and simpy not allowed. Has nothing to do with AWS.