Skip to main content

Upstash

Upstash is a serverless data platform offering Redis and Kafka services with per-request pricing.

Resources

UpstashRedis

Create and manage Upstash Redis databases.
import { UpstashRedis } from "alchemy/upstash";

const redis = await UpstashRedis("my-redis", {
  primaryRegion: "us-east-1"
});

Props

primaryRegion
UpstashRegion
required
Primary region for the database. Available regions:
  • us-east-1
  • us-west-1
  • us-west-2
  • eu-west-1
  • eu-central-1
  • ap-southeast-1
  • ap-southeast-2
  • ap-northeast-1
  • sa-east-1
name
string
default:"${app}-${stage}-${id}"
Name of the database
readRegions
UpstashRegion[]
Read regions for the database
budget
number
Monthly budget for the database
eviction
boolean
Whether to enable eviction for the database
apiKey
Secret
API key to use (overrides environment variable)
email
string
Email to use (overrides environment variable)

Returns

id
string
ID of the database
name
string
Name of the database
databaseType
string
Type of the database in terms of pricing model
region
'global'
Region where database is hosted
port
number
Database port for clients to connect
createdAt
number
Creation time of the database as Unix time
state
string
State of database (active or deleted)
password
Secret
Password of the database
userEmail
string
Email or team id of the owner of the database
endpoint
string
Endpoint URL of the database
tls
boolean
Whether TLS is enabled
restToken
Secret
REST token for the database
readOnlyRestToken
Secret
Read-only REST token for the database

Build docs developers (and LLMs) love