Skip to content
This repository was archived by the owner on Jan 9, 2024. It is now read-only.

Commit e260aa6

Browse files
Tim Van LaerGrokzen
authored andcommitted
Elasticache example
1 parent 667910e commit e260aa6

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
from rediscluster import RedisCluster
2+
3+
rc = RedisCluster(
4+
host='clustercfg.cfg-endpoint-name.aq25ta.euw1.cache.amazonaws.com',
5+
port=6379,
6+
password='password_is_protected',
7+
skip_full_coverage_check=True, # Bypass Redis CONFIG call to elasticache
8+
decode_responses=True, # decode_responses must be set to True when used with python3
9+
ssl=True, # in-transit encryption, https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/in-transit-encryption.html
10+
ssl_cert_reqs=None # see https://github.com/andymccurdy/redis-py#ssl-connections
11+
)
12+
13+
rc.set("foo", "bar")
14+
15+
print(rc.get("foo"))

0 commit comments

Comments
 (0)