Bindings
Bindings allow your Workers to interact with resources on the Cloudflare developer platform.
There are multiple types of bindings available today.
Configuration
Bindings can be configured by one of two ways:
- Updating your project’s
wrangler.toml
file. - Logging in to the Cloudflare dashboard > Account Home > Workers & Pages > your Worker > Settings> Variables.
Service bindings
Service bindings allow for communication with another Worker.
- Configure and learn more about Service bindings.
KV namespace bindings
KV namespace bindings allow for communication between a Worker and a KV namespace.
- Learn more about KV namespace bindings.
- Configure KV namespace bindings via your
wrangler.toml
file.
Durable Object bindings
Durable Object bindings for communication between a Worker and a Durable Object.
- Learn more about Durable Object bindings.
- Configure Durable Object bindings via your
wrangler.toml
file.
R2 bucket bindings
R2 bucket bindings for communication between a Worker and an R2 bucket.
- Learn more about R2 bucket bindings.
- Configure R2 bucket bindings via your
wrangler.toml
file.
Queue bindings
Queue bindings allow for communication between a Worker and a Queue.
- Configure Queue bindings via your
wrangler.toml
file.
D1 database bindings
D1 bindings allow you to query a D1 database from your Worker.
- Configure a D1 binding.
- Learn more about how to query a D1 database using the client API.
Dispatch namespace bindings (Workers for Platforms)
Dispatch namespace bindings allow for communication between a dynamic dispatch Worker and a dispatch namespace. Dispatch namespace bindings are used in Workers for Platforms. Workers for Platforms helps you deploy serverless functions programmatically on behalf of your customers.
- Configure dispatch namespace bindings via your
wrangler.toml
file.
mTLS certificate bindings
mTLS certificate bindings enable Worker subrequests to present a client certificate when communicating with a service that requires client authentication.
- Learn more about mTLS certificate bindings.
- Configure mTLS certificate bindings via your
wrangler.toml
file.
Email bindings
Email bindings allow you to send emails from your Worker. This is useful for when you want to know about certain types of events being triggered, for example.
- Learn more about email bindings.
- Configure email bindings via your
wrangler.toml
file.
Constellation bindings
Constellation bindings allow for communication between a Worker and a Constellation project.
- Learn more about Constellation bindings.
- Configure Constellation bindings via your
wrangler.toml
file.