OnCallReadyStart learning

redis-cli: the Redis command line interface (redis-tools)

redis-cli [-h HOST] [-p PORT] [--tls] [-a PASSWORD] [-c] [COMMAND [ARG ...]]

Options you will use

-h HOST
server hostname (default 127.0.0.1): for ElastiCache the primary, reader or configuration endpoint
-p PORT
server port (default 6379)
--tls
connect over TLS - required when the replication group has in-transit encryption
-a PASSWORD
AUTH with this password (the ElastiCache AUTH token); prints a warning, use REDISCLI_AUTH instead
-c
cluster mode: follow -MOVED and -ASK redirections
--raw
raw replies (the default when the output is not a terminal)

Examples

$ redis-cli -h master.sessions.abc123.euc1.cache.amazonaws.com PING

is it up (PONG)

$ redis-cli -h HOST SET cart:1 apples EX 300

a key that expires in 5 minutes

$ redis-cli -h HOST INFO replication

role, connected replicas, offsets

$ redis-cli -c -h clustercfg.x.abc123.euc1.cache.amazonaws.com GET user:42

cluster mode: follow redirections

Gotchas

Try redis-cli in a real terminal Free, in your browser - a real Ubuntu terminal to try it in, with missions that check your work.