Documentation for agents: an index at /llms.txt, every docs page in one file at /llms-full.txt, and Markdown for any docs page by adding .md to its URL.

Effect KitRedis

Managed providers

Apply cloud provider rules with RedisProfiles and restrict where the client may connect.

A provider profile encodes what a managed service requires: TLS, the topology, the identity type and the commands it blocks. The client checks these when the layer is built and when a command is sent, so a mismatch fails before any traffic.

Example (Connecting to ElastiCache With IAM)

import { RedisProfiles } from "@effect-kit/redis";
import {  } from "@effect-kit/redis/node";

export const  = .({
  : "rediss://my-cache.abc123.use1.cache.amazonaws.com:6379",
  : ,
  : RedisProfiles.({
    : "valkey",
    : "replication-group",
    : "standalone",
    : "iam",
  }),
});

Provider profiles

Each profile is a function of the options that change its rules. Pass the result as profile.

ProfileOptionsRules it applies
RedisProfiles.elasticacheengine, deployment, routing, authenticationTLS required. Redis engine only: restricts CONFIG, DEBUG, SAVE and other admin commands. Serverless and cluster use database 0.
RedisProfiles.memorydbengine, authenticationCluster routing, TLS required, database 0.
RedisProfiles.redisCloudplan, routing, authenticationDatabase 0. TLS required, except on the free plan.
RedisProfiles.redisSoftwarerouting, authenticationTLS required, database 0.
RedisProfiles.memorystoreRedistlsStandalone. Restricts ACL, CLIENT, CLUSTER, CONFIG, DEBUG and others.
RedisProfiles.memorystoreValkeyrouting, authentication, tlsRestricts ACL, DEBUG, CONFIG SET and others. Database 0 in cluster.
RedisProfiles.memorystoreRedisClusterauthentication, tlsCluster routing, database 0.
RedisProfiles.azureManagedRedisclustering, authenticationTLS required, database 0. search unsupported except on enterprise.
RedisProfiles.aivenValkeyuserTLS required. The default user cannot run ACL.
RedisProfiles.digitalOceanValkeyroutingTLS required. Restricts ACL, CONFIG, MONITOR, FAILOVER and others.
RedisProfiles.tairedition, routing, tlsPassword authentication.
RedisProfiles.upstashtransportTLS required, database 0. native uses a proxy and a password, http uses a bearer token.

All of them accept modules, like the engine profiles. A command on a restricted list fails with ProfileError and reason: "restricted-command", with delivery: "unsent".

The profile data was last reviewed on 2026-10-26 (revision: "reviewed-2026-10-26"), and every profile has certification: "pending". Provider rules change. Check the provider's own documentation.

What the layer checks

Building the layer with a profile fails with ProfileError when:

reasonCause
routingThe profile's routing does not match the layer, for example a cluster profile with RedisNode.layer.
tlsThe profile requires TLS and the endpoint has none, or turns off certificate verification.
databaseThe profile allows only database 0 and database is not 0.
identityThe profile needs a password, IAM or Entra identity and credentials is missing. IAM and Entra need an Effect or RedisCredentials.provider, not a fixed value.
network-policyIAM or Entra is used with Cluster or Sentinel and no network policy is set.
restricted-commandThe clientName you set would use a restricted command.

IAM and Entra credentials must carry expiresAtMillis. AWS and Entra credentials also need a username. Without them, opening a connection fails with HandshakeError where stage is "credentials".

The AWS IAM profiles set credentialLifetime to a max-age of 11 hours 55 minutes, and the Entra profile retires connections 180000 ms before the token expires. See Credentials.

Restricting where the client connects

network is an allow-list. It is checked on every dial, including the node addresses a cluster or Sentinel reports, so a topology reply cannot send the client to a host outside the list.

Example (Allowing One Host)

import {  } from "@effect-kit/redis/node";

export const  = .({
  : "rediss://cache.example.com:6380",
  : {
    : ["cache.example.com"],
    : ["cache.example.com"],
  },
});

allowedHosts is required. allowedServerNames also constrains the TLS server name. A violation of the endpoint you configured is ProfileError with reason: "network-policy". A discovered address that breaks the policy fails the dial with TransportError and reason: "policy".

Tested providers

The package was tested against hosted Aiven Valkey and Redis Cloud Free instances, and Upstash over native sockets and HTTP. The other profiles come from the providers' documentation. The repository has no live-service tests for them.