0

I have a DynamoDB instance created in AWS and I have also created a cache cluster in AWS Elasticache. I want to use Elasticache to improve read/write performance. I am not sure how this is done with Python.

Can you please provide pointers/guidance on how to attach the Elasticache to my DynamoDB instance? I was able to connect to the Elasticache and fetch the clusters, but need help on how to proceed.

Reference code:

conn = boto.elasticache.connect_to_region('us-west-2',
    aws_access_key_id='<KEY_ID>',
    aws_secret_access_key='<KEY_ACCESS>')
print conn.describe_cache_clusters(cache_cluster_id='<ID>')
Sabuncu
  • 5,095
  • 5
  • 55
  • 89
user3284887
  • 61
  • 1
  • 7
  • 3
    Why do you need to improve DynamoDB read performance? DynamoDB queries generally have single-digit millisecond latency. Adding a cache will add complexity with likely very little impact on performance. If your DynamoDB reads are that slow, you're probably using it wrong and/or have not designed your data model well. – rpmartz Jun 22 '14 at 18:32
  • What do you want to do? What do you mean by "attach the Elasticache to my DynamoDB instance"? – Ivan Nov 10 '14 at 11:37

1 Answers1

1

Here is an article that describes a similar situation involving Elasticache and DynamoDB. The code is in node, but will help you understand how to do this.

Caching Strategy with DynamoDB Streams, AWS Lambda and ElastiCache

John Hanley
  • 74,467
  • 6
  • 95
  • 159