- If your services run in private environments, by setting up a tunnel.
- If your services run on AWS Lambda, by giving Restate Cloud permission to invoke them.
- By making your services accessible over the public internet, and using request signing.
Connecting services in private environments
You can connect services that run in a locked-down private environment to Restate Cloud using a secure tunnel. This allows you to expose your services to Restate Cloud without opening up ports to the public internet. You can deploy the tunnel client in your environment and make it appear as if your Restate Cloud environment is inside your private network. This allows you to use native access control mechanisms, like VPC Security Groups and Kubernetes network policies, to manage access.1. Create a Restate Cloud environment
Open the Restate Cloud UI and create a new environment. Note the environment id (env_...
) and request signing key (under security -> HTTP services: publickeyv1_...
), as you will need them later.
Create a "Full"
scope API key with a descriptive name for the tunnel client and copy the key for later.
2. Setup the CLI
Next, we need to set up a CLI profile to connect to our Restate Cloud environment. Log in to Restate Cloud using the CLI:3. Run the tunnel
The tunnel can be hosted as a cloud VM in your VPC, a sidecar to your service, or a dedicated pod in your container orchestrator. You can deploy multiple copies for redundancy. To run the tunnel:Environment variables
Environment variables
RESTATE_ENVIRONMENT_ID
is the environment id (including theenv_
prefix).RESTATE_BEARER_TOKEN
is the API key you created in step 1.RESTATE_TUNNEL_NAME
is a name for the tunnel. Choose a unique DNS-friendly tunnel name, e.g.prod-tunnel
.RESTATE_SIGNING_PUBLIC_KEY
is the public key you copied from the Cloud UI in step 1.RESTATE_CLOUD_REGION
is the region of your Restate Cloud environment, e.g.eu
orus
.- You can run
latest
or pin the current version, e.g.0.4.0
- The health check URL is at
:9090/health
Tunnel ports
Tunnel ports
The tunnel client exposes the following ports
9090
tunnel’s own health status8080
Restate Ingress9070
Restate Admin API
4. Run a Restate service
Follow the quickstart to run a Restate service locally.5. Register your service
If your setup is correct, you can now register your service with the Restate Cloud environment:- Use just the numeric environment id here (without the
env_
prefix). - The tunnel name must match the name provided to the tunnel client
- The remote fqdn and port must resolve to the Restate service endpoint (e.g.
localhost:9080
) from the perspective of the tunnel client
localhost:9080
and your environment id is env_20d1231jyphzkm8
, you can register it like this:
6. Test your service
You can now test your service by invoking it via Restate Cloud:How does it work?
- Restate CLI is communicating with your Restate environment at
https://*.eu.restate.cloud:9070
using your user ID token and asks the admin API to perform a discovery at the special tunnel URL. - The Restate Cloud end of the tunnel receives the request from your environment and forwards the traffic to the tunnel container.
- The tunnel container is forwarding the traffic to the Restate service endpoint.

Connecting AWS Lambda services
To invoke services running on AWS Lambda, Restate Cloud needs to assume an AWS identity in the same account that the Lambda is deployed to. Create a new role that has permission to invoke your Lambda handlers, and give it the following trust policy.The Restate Cloud role is distinct from the Lambda function’s execution role.
The execution role is assumed by your function to perform its work. A dedicated
invoker role is needed to grant Restate Cloud permission to invoke service handlers
functions in your account, and nothing more.
Securing your services:If your Lambda has an appropriate trust policy as described above, you do not
need to secure incoming requests any further. If you choose to however, the
identity verification checks will work on Lambda endpoints as well.