The following command will create Redis with the cluster mode enabled:
aws elasticache create-replication-group ^--replication-group-id "aws-bootcamp-redis" ^--replication-group-description "AWS Bootcamp redis cluster enabled" ^--engine "redis" ^--engine-version "3.2.10" ^--port 6379 ^--cache-parameter-group-name "default.redis3.2.cluster.on" ^--cache-node-type "cache.t2.micro" ^--num-node-groups 2 ^--replicas-per-node-group 2 ^--cache-subnet-group-name "default" ^--security-group-ids "sg-2e5a905a"
Here --num-node-groups will create two shards and under each shard --replicas-per-node-group will create two replicas along with the primary node.