Skip to main content
Qovery creates it in the AWS account of the environment’s cluster, as a Blueprint service in one of your environments.
New to this? You don’t need to know Kubernetes or Terraform. Qovery sets up Amazon ElastiCache Serverless for Valkey in your cloud account and manages it for you: you fill in a form, or paste the prompt below into your coding agent. The values it publishes, listed under Outputs, reach your other services as environment variables. Qovery tells you when a newer version of the Blueprint is available. Check the requirements in the Reference section before you start, and try it first in a development environment.

Create it

  1. Open the environment, then New service › Blueprint.
  2. Find Amazon ElastiCache Serverless for Valkey in the catalog and pick the major version.
  3. Fill in the variables. Required ones are marked; the others use their defaults.
  4. Create the service, and deploy it now or later.
You don’t add any file to your repository. Qovery creates the Blueprint from the Console or the API.

Variables and outputs

Generated from qbm.yml at AWS/valkey-serverless/9/1.2.1, the manifest the Console form is built from.
Outputs become environment variables that other services in the environment can use. By default Qovery also creates an alias for each output, prefixed with the Blueprint’s name; see Aliases Qovery creates for outputs for the naming rules and the cases where no alias is created.
Secret variables and outputs are encrypted and masked in Qovery, but Terraform can also keep their values, and values derived from them, in its state. With the Qovery-managed state backend (the default), Qovery stores the state. If you use your own backend, protect it and keep state files out of version control.

Reference

From the Blueprint’s README. Creates an AWS ElastiCache Serverless cache on Valkey 9. There is no node type or shard count to pick: AWS scales the cache with the load and bills the data stored and the ECPUs consumed. Traffic is encrypted in transit, data is encrypted at rest, and access goes through a password-protected user. For a cache with a fixed node type, use the aws-elasticache-valkey blueprint instead.

Connecting

Three things differ from the node-based blueprint:
  • Use a cluster-mode client. A serverless cache always runs in cluster mode, and AWS only supports clients that speak the cluster protocol. Multi-key commands only work on keys that share a hash slot; across slots they fail with CROSSSLOT.
  • Two ports. The cache serves writes and consistent reads on 6379 and replica reads on 6380, on the same hostname. Many clients open connections to both, so the security group opens both.
  • A user name is required. Applications authenticate as the app user with valkey_password. There is no auth token and no usable default user.
The valkey_url output carries all of it: rediss://app:<password>@<host>:6379. The rediss:// scheme is correct: Valkey speaks the Redis protocol, and TLS is always on.

Variables

Required

The limit is 32 characters to leave room for the suffixes of the user id (<name>-app) and the user group id (<name>-users), which ElastiCache caps at 40.

Credentials

In the Console, leaving the field blank omits it. Through the API or Terraform, omit the variable rather than sending an empty string: the platform rejects an empty variable value. Changing valkey_password replaces the password in place, without touching the cache or its data. AWS takes a few minutes to apply it (close to four in testing). Applications still holding the old one must be redeployed with the new value.

Usage limits

With both at 0, the cache scales as far as AWS allows. A cap bounds the bill as well as the capacity. The blueprint always sends both limits, with 0 translated to the AWS maximum. A cache whose limits are removed altogether cannot be updated: AWS rejects the call with No modifications were requested.

Network

By default the cache is attached to the Qovery cluster network. The subnets come from the ElastiCache subnet group created at cluster bootstrap (elasticache-<cluster vpc id>): one subnet per Availability Zone, three at most. The security group is created by the blueprint, named qovery-valkey-serverless-<name>, and opens 6379–6380 to every CIDR of the VPC. It does not reuse the cluster workers security group, which opens 6379 only. ElastiCache cannot move a serverless cache to other subnets, so subnet_ids is read once. A later change to the variable or to the cluster’s subnet group leaves the cache where it is.

Backups

Deleting the service deletes the cache without a final snapshot. The AWS Terraform provider has no argument for one on a serverless cache. To keep the data, take a manual snapshot in AWS before deleting the service.

IAM role

Outputs

Access control

The blueprint creates one ElastiCache user and one user group, both on the valkey engine, and attaches the group to the cache:
  • user <name>-app, user name app, access string on ~* &* +@all (every key, every pub/sub channel, every command), authenticated by password;
  • user group <name>-users, holding that user.
Terraform manages the membership list of the group: a user added to it outside the blueprint is removed on the next deployment.

Lifecycle ignore_changes

  • subnet_ids — set at creation; see Network.

Assuming an IAM role

Optional. Set the role_arn variable to make the blueprint assume an IAM role instead of using the configured credentials directly; leave it unset to use them as is.
  • Format: arn:aws:iam::<account-id>:role/<name>, with an optional path (role/<path>/<name>). The aws-cn, aws-us-gov and aws-iso* partitions are accepted too.
  • The role must be in the same AWS account as the credentials; cross-account roles are not supported.
  • The role’s trust policy must allow the deploy credentials’ IAM principal to assume it.
  • The role itself must carry the permissions listed in Required AWS IAM permissions.

Required AWS IAM permissions

When role_arn is set, Terraform makes these AWS calls as the assumed role, so the permissions below belong to that role. Access to a user-provided Terraform backend, if you use one, is not covered by role_arn: it keeps using the deploy credentials.
Unless role_arn is set, the credentials used to deploy this blueprint must allow the actions below. The EC2 read actions let Terraform look up the cluster VPC and its subnets. ec2:CreateVpcEndpoint, the ec2:CreateTags that goes with it and iam:CreateServiceLinkedRole are the ones the AWS managed policy AmazonElastiCacheFullAccess grants for serverless caches: ElastiCache places a VPC endpoint in the chosen subnets.