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.
Can we have multiple databases in ElastiCache (for Redis)?
Asked Answered
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).
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 redis.io/commands/select Would that limit also apply to Muilt AZ Elastic Cache for Redis? –
Nomanomad
@SamAnthony you are correct, I'll edit my answer. –
Chrystel
Thanks 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. –
Nomanomad
© 2022 - 2024 — McMap. All rights reserved.