JSON in ElastiCache for Redis Not working

0

When I test against my Redis cluster with the command 'JSON.SET', I get an error that says "unsupported command 'JSON.SET'". However, I did test against the cluster using the command 'SET', and that one worked properly. It seems that the cluster doesn't support JSON data types/ commands, but I can verify that the Redis cluster engine is 6.2.6.

Is this some configuration issue or is JSON commands no longer supported?

References:

https://aws.amazon.com/blogs/database/unlocking-json-workloads-with-elasticache-and-memorydb/?sc_channel=EL&sc_campaign=Live_Streaming_2022_vid&sc_medium=YouTube&sc_content=a76oXjtQcK4&sc_detail=DATABASE&sc_country=US

https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/json-gs.html

preguntada hace un año282 visualizaciones
1 Respuesta
0

As checked link Supported Redis JSON commands. The command JSON.SET shoud be supported, and follow doucment:JSON.SET is working as expected. Could you double check your ElastiCacache redis version, and your redis client version.

The testing in my new created Elasticache redis cluster for reference.

$ redis-6.2.6/src/redis-cli --version
redis-cli 6.2.6
$ redis-6.2.6/src/redis-cli -h xxx.cache.amazonaws.com ping
PONG
$ redis-6.2.6/src/redis-cli -h xxx.cache.amazonaws.com info server | grep redis_version
redis_version:6.2.6
$ redis-6.2.6/src/redis-cli -h xxx.amazonaws.com JSON.SET k1 . '{"firstName":"John","lastName":"Smith","age":27,"weight":135.25,"isAlive":true,"address":{"street":"21 2nd Street","city":"New York","state":"NY","zipcode":"10021-3100"},"phoneNumbers":[{"type":"home","number":"212 555-1234"},{"type":"office","number":"646 555-4567"}],"children":[],"spouse":null}'
OK
$ redis-6.2.6/src/redis-cli -h xxx.cache.amazonaws.com JSON.GET k1 $.address.*
"[\"21 2nd Street\",\"New York\",\"NY\",\"10021-3100\"]"
profile pictureAWS
Jerry_K
respondido hace un año

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas