Search code examples
amazon-web-servicesamazon-elasticache

How to persist a redis ACL in ElastiCache


Is it possible to persist a redis ACL e.g with the python client - something like this:

redis_client.acl_setuser(
    enabled=True,
    username=user_id,
    passwords=["+" + password],
    keys="*",
    commands=["+@all", "-select", f"+select|1"],
)
redis_client.acl_save()

with ElastiCache?


An alternative to redis_client.acl_save() is redis_client.config_rewrite() but I am wondering if either will actually persist.


Solution

  • I dont think you can. Elasticache Redis restricts lots of ACL and all config related command. Check this - https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/RestrictedCommands.html