AWS Elastic Beanstalk EC2 With Redis - Cannot Connect - Django_Redis

0 votes

Hi I am trying to connect my Django application to use Redis ElastiCache and am having trouble with getting it connected using AWS. The application is published to an EC2 instance using Elastic Beanstalk and it running perfect when I am not trying to connect to my Redis cache.

From the post here (Setting up ElastiCache Redis with Elastic BeanStalk + Django) I created my ElastiCache to not use a cluster and I have set up both the EC2 instance and the Redis cache to use the same Security Group.

Here is how my cache is configured in settings.py.

CACHES = {
    'default': {
        'BACKEND': 'django_redis.cache.RedisCache',
        'LOCATION': 'redis://my-cache.kjshd.0001.use2.cache.amazonaws.com:6379/',
    'OPTIONS': {
        'CLIENT_CLASS': 'django_redis.client.DefaultClient'
        }
    }
}

What am I missing? Are there additional settings that need changed on my cache or somewhere in AWS to open communication? Does this configuration look okay? I was previously using Redis in Azure and this configuration worked but now have the requirement to move to AWS. Is there a way to test that my EC2 instance can connect to Redis? I have the ability to SSH into the server but I was not sure what I would do once I was connected.

Thanks for any help.

Aug 22, 2018 in AWS by bug_seeker
• 14,970 points
396 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

After setting the security group, I found out that I needed to change the inbound settings for the security group to connect to my ElastiCache Redis node.

Documentation was found here.

https://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/GettingStarted.AuthorizeAccess.html#GettingStarted.AuthorizeAccess.VPC

answered Aug 22, 2018 by Priyaj
• 56,120 points

Related Questions In AWS

0 votes
1 answer
0 votes
1 answer

How to use AWS CLI with Elastic Beanstalk?

You have to create a source bundle ...READ MORE

answered Sep 28, 2018 in AWS by Archana
• 3,770 points
70 views
0 votes
1 answer
+13 votes
2 answers
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How to add SSL certificate to AWS EC2 with the help of new AWS Certificate Manager service

refer this link  https://aws.amazon.com/certificate-manager/faqs/ You can't install the certificates ...READ MORE

answered Jul 19, 2018 in AWS by Priyaj
• 56,120 points
26 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.