How can I configure and access ElastiCache for Redis from my Lightsail instance?
4 minute read
I want to connect to Amazon ElastiCache for Redis endpoints from my Amazon Lightsail instance.
To connect to an ElastiCache for Redis cluster from a Lightsail instance, complete the following steps:
(Optional) Create the Lightsail instance and ElastiCache for Redis resources.
Configure the security group on the cluster to allow the connection.
Turn on VPC peering on your Lightsail instance.
Connect to the Redis cluster endpoint from the Lightsail instance.
(Optional) Create the Lightsail instance and ElastiCache Redis resources
For information on how to create a Lightsail instance and connecting to the instance, see Create an Amazon Lightsail instance. For information on how to create an ElastiCache for Redis cluster, see Create a cluster. Note: Create the Lightsail and ElastiCache resources in the same Region. You must create the ElastiCache resources on the default VPC.
Configure the security group on the cluster to allow the connection
The security group of the ElastiCache for Redis cluster must allow incoming TCP connections on port 6379 from the Lightsail instance's private IP address.
To add inbound port 6379 to your ElastiCache for Redis cluster, complete the following steps: