Home
Cache/Database

Deploy Valkey (Redis Fork) on AWS in 5 Minutes

Valkey is the community-driven fork of Redis, maintaining 100% compatibility while ensuring open-source freedom. If you're using Redis, you can switch to Valkey with zero code changes. Our AMI gives you production-ready Valkey with clustering support.

6 min read FlowOps Consulting

What's Included

  • Valkey 7.2 or 8.1 (choose version)
  • 100% Redis compatible
  • TLS encryption enabled
  • Authentication configured
  • Persistence (RDB + AOF)
  • Cluster mode ready
  • Separate data volume

Step-by-Step Guide

1

Launch the AMI

Find "Valkey FlowOps" on AWS Marketplace and launch.

# Valkey versions: # 7.2 - Stable, based on Redis 7.2 # 8.1 - Latest features # Recommended instance types: # r5.large (16GB) - Moderate caching # r5.xlarge (32GB) - Production # r5.2xlarge (64GB) - Large datasets
2

Connect to Valkey

Use any Redis client - Valkey is fully compatible.

ssh -i your-key.pem ubuntu@your-instance-ip sudo cat /opt/flowops/credentials.txt # Connect with redis-cli (yes, redis-cli works!) redis-cli -a your-password # Or use Valkey CLI valkey-cli -a your-password # Test connection 127.0.0.1:6379> PING PONG
3

Use with Python

Standard Redis libraries work perfectly with Valkey.

# pip install redis import redis # Connect to Valkey (using redis library) r = redis.Redis( host='your-instance-ip', port=6379, password='your-password', ssl=True, ssl_cert_reqs=None # For self-signed certs ) # All Redis operations work r.set('user:1:name', 'Alice') r.set('user:1:email', 'alice@example.com') r.expire('user:1:name', 3600) # 1 hour TTL # Hash operations r.hset('user:1', mapping={ 'name': 'Alice', 'email': 'alice@example.com', 'visits': 0 }) r.hincrby('user:1', 'visits', 1) # Lists for queues r.lpush('job:queue', 'job-123') job = r.rpop('job:queue') # Pub/Sub pubsub = r.pubsub() pubsub.subscribe('notifications')
4

Session Caching Example

Use Valkey for session storage in web applications.

from flask import Flask, session from flask_session import Session import redis app = Flask(__name__) # Configure Flask-Session with Valkey app.config['SESSION_TYPE'] = 'redis' app.config['SESSION_REDIS'] = redis.Redis( host='your-instance-ip', port=6379, password='your-password', ssl=True ) Session(app) @app.route('/login') def login(): session['user_id'] = 'user-123' session['logged_in'] = True return 'Logged in!' @app.route('/profile') def profile(): if session.get('logged_in'): return f"Welcome, {session['user_id']}" return 'Please log in' # Sessions automatically stored in Valkey with TTL

Comparison

FeatureValkeyRedisElastiCache
LicenseBSD (truly open)SSPL (restrictive)Proprietary
Redis Compatible100%N/A100%
Self-HostedYesYesNo
Community GovernedYes (Linux Foundation)NoNo
CostYour infra onlyYour infra onlyPremium

Use Cases

  • Session storage
  • API response caching
  • Real-time leaderboards
  • Rate limiting
  • Pub/Sub messaging
  • Job queues

Pricing

Our AMIs are available on AWS Marketplace with simple hourly pricing:

Need Help?

Our UK-based support team is here to help you get the most out of your deployment. Email us at support@flowopsconsulting.co.uk for any questions.

Ready to Get Started?

Deploy in 5 minutes on AWS Marketplace

View on AWS Marketplace

Comments