0

I configured ElastiCache redis with cluster mode enabled. I want to connect ElastiCache with local Django. So I configured bastion host. I connected ElastiCache(non-cluster mode) with local Django. I tried cache.set(), cache.get(). It's OK. I installed 'Django-redis-cache' and 'settings.py' is like that.

CACHES = {
    'default': {
        'BACKEND': 'redis_cache.RedisCache',
        'LOCATION': 'localhost:6379',
    }
}

But I have problem when I connect ElastiCache(cluster mode) with django. I tried tunneling with ElastiCache configuration endpoint.

When I use the same 'settings.py', error message is like that. 'SELECT is not allowed in cluster mode' So, I changed 'settings.py'.

CACHES = {
    'default': {
        'BACKEND': 'redis_cache.RedisCache',
        'LOCATION': 'localhost:6379',
        'OPTIONS': {
            'DB': 0
        },
    }
}

And then, error message is like that. 'MOVED 4205 xx.xx.xx.xxx:6379' What I have to do? There are no example which connect ElastiCache(cluster mode) with Django.

0 Answers0