Introducing Dragonfly Cloud! Learn More

Question: How do you configure VPC peering with Redis Cloud?


Virtual Private Cloud (VPC) peering allows you to connect your cloud provider's virtual network with the virtual network of Redis Cloud, enabling a secure and private connection between your database and application without traversing the public internet. Here's how you can configure VPC peering with Redis Cloud:


  • A Redis Cloud account.
  • A VPC set up in your cloud provider (AWS, GCP, Azure, etc.) with a defined IP range.
  • Knowledge of your network's configuration to avoid IP range conflicts.

AWS Example

  1. Log into Redis Cloud: Navigate to your Redis Cloud dashboard.

  2. Navigate to VPC Peering: Find the 'Subscriptions' tab, select your subscription, and then locate the 'VPC Peering' option.

  3. Create a Peering Connection: Provide the necessary details about your AWS VPC, including the VPC ID and region. Redis Cloud will generate a peering request.

  4. AWS Management Console: Log in to your AWS console, navigate to the VPC Dashboard, and then to the 'Peering Connections' section. You should see the peering request from Redis Cloud. Accept this request.

  5. Update Route Tables: In AWS, update the route tables for your VPC to include routes to the Redis Cloud subnet, ensuring traffic directed to your Redis database is routed through the peering connection.

  6. Configure Security Groups: Adjust your security groups in AWS to allow traffic between your application and Redis Cloud over the peering connection.

# Example of updating a route table (AWS CLI) aws ec2 create-route --route-table-id rtb-xyz --destination-cidr-block --vpc-peering-connection-id pcx-abc123

GCP and Azure

The process for GCP and Azure is similar but tailored to their respective networking configurations. For GCP, you'll use the Google Cloud Console to establish and accept the peering connection, and for Azure, you'll use the Azure Portal. Ensure you adjust your network rules and routing tables accordingly for these platforms.

Best Practices

  • Regularly review your VPC peering connections for security and compliance.
  • Monitor network performance and costs associated with data transfer.
  • Consider redundancy and failover strategies for critical applications.

VPC peering with Redis Cloud enhances security and performance by providing a direct, private connection to your Redis deployments. By following these steps, you can efficiently set up VPC peering across various cloud providers.

Was this content helpful?

White Paper

Free System Design on AWS E-Book

Download this early release of O'Reilly's latest cloud infrastructure e-book: System Design on AWS.

Free System Design on AWS E-Book

Start building today 

Dragonfly is fully compatible with the Redis ecosystem and requires no code changes to implement.