Difficult to find this information for ElastiCache (for Redis) - if we can use databases with it such as 0, 1, 2 ... like it's possible in Redis.
Asked
Active
Viewed 2,291 times
1 Answers
4
We have quite a few ElastiCache instances (standalone) running in AWS and it simply works. Launch the CLI by issuing command:
redis-cli
Then use the following command:
select <db number>
For example:
select 4
And you'll be working with DB 4, by default you're connected to DB 0. Redis by default has 16 databases available.
Edit: Redis Cluster supports only one database (0).

Nikolay Dimitrov
- 1,766
- 1
- 14
- 23
-
Does this work for Muilt AZ Elastic Cache for Redis? I read this warning "When using Redis Cluster, the SELECT command cannot be used, since Redis Cluster only supports database zero" at https://redis.io/commands/select/ Would that limit also apply to Muilt AZ Elastic Cache for Redis? – Sam Anthony Jun 06 '23 at 07:46
-
@SamAnthony you are correct, I'll edit my answer. – Nikolay Dimitrov Jun 07 '23 at 08:28
-
1Thanks for updating the answer. Just to clarify, the SELECT command does work with "Muilt AZ Elastic Cache for Redis", but not for "Redis Cluster" as stated in the documentation. – Sam Anthony Jun 10 '23 at 03:17