> For the complete documentation index, see [llms.txt](https://www.cakewalk.security/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.cakewalk.security/docs/ai-agent-access/on-premise-setup/deploy-on-aws.md).

# Deploy on AWS

Run the MCP Gateway in your own AWS account from its container image, on Amazon EKS with Aurora PostgreSQL, ElastiCache and an Application Load Balancer.

This page runs the MCP Gateway in your own AWS account from its container image, with plain Kubernetes manifests and AWS managed services. Your Agents' tool calls, the stored credentials and the audit records then stay in your account. Your Admins still manage Connections and Policies in Cakewalk, and your Employees still sign in there.

Running Kubernetes on your own servers? See [Deploy on Kubernetes with Helm](https://www.cakewalk.security/docs/ai-agent-access/on-premise-setup/deploy-on-kubernetes-with-helm.md).

***

### 📖 Key concepts

* **On-premise MCP Gateway**: The same MCP Gateway that Cakewalk runs in its cloud, running in your account and serving your company only.
* **Policy engine**: A second container (OPA) in the gateway's pod. It evaluates every tool call against your Policies.
* **Configuration routes**: The routes under `/api/v1` that Cakewalk's cloud calls to send Connections and Policies to your gateway. Only Cakewalk's addresses may reach them.
* **Employee routes**: The routes that Agents and browsers use, such as `/mcp`. They require an Employee's token.

:bulb: *Why this matters*: With the gateway in your account, no tool call, credential or audit record leaves it. Cakewalk only sends configuration to it.

***

### 🧭 The architecture

| Part                                              | AWS service                                            |
| ------------------------------------------------- | ------------------------------------------------------ |
| The MCP Gateway and its policy engine, in one pod | Amazon EKS                                             |
| Database                                          | Aurora PostgreSQL                                      |
| Short-lived state                                 | ElastiCache for Redis OSS                              |
| HTTPS entry, certificate and address rule         | Application Load Balancer, with a certificate from ACM |
| Images                                            | `quay.io`, or a copy in Amazon ECR                     |
| Outbound traffic                                  | A NAT gateway                                          |

The gateway calls no AWS API. Its pod needs no IAM role.

The examples use placeholder names: the host `mcp.example.com` and the namespace `mcp-gateway`.

***

### 📦 What Cakewalk gives you

| Item                                                     | Used in       |
| -------------------------------------------------------- | ------------- |
| A registry account (name and token) for `quay.io`        | Step 2        |
| The image version to run, for example `2026-09-15.2`     | Steps 2 and 8 |
| An API key and an API secret for the calls from Cakewalk | Step 7        |
| The secret of the registration client                    | Step 7        |
| The source addresses of Cakewalk's calls                 | Step 9        |

This page uses `203.0.113.10` and `198.51.100.20` in place of Cakewalk's source addresses. They are placeholders: replace them with the addresses that Cakewalk gives you.

***

### ✅ What you need

* An EKS cluster with x86-64 nodes. The gateway image has no ARM build, so it does not run on Graviton nodes.
* The AWS Load Balancer Controller, version 2.4.3 or later, installed in the cluster.
* Private subnets with a NAT gateway. The gateway needs outbound HTTPS to the internet, because it talks to Cakewalk's identity provider and to the third-party MCP servers of your Connections. If you use no cloud MCP servers, you can restrict this traffic: Cakewalk gives you the domains to allow.
* Public subnets for the load balancer.
* A public certificate in ACM for the gateway's host, in the region of the cluster.

{% hint style="info" %}
The load balancer must be internet-facing: Cakewalk's cloud calls it from the internet. An Agent that is a cloud service, such as ChatGPT or Claude on the web, also connects from its provider's servers and not from the Employee's machine.
{% endhint %}

***

### 🛠 Install

#### 1. Create the namespace

The gateway's pod meets the `restricted` pod security level.

```yaml
apiVersion: v1
kind: Namespace
metadata:
  name: mcp-gateway
  labels:
    pod-security.kubernetes.io/enforce: restricted
```

Save it as `namespace.yaml` and apply it:

```sh
kubectl apply -f namespace.yaml
```

#### 2. Get the images

Choose one of the two.

{% tabs %}
{% tab title="Pull from quay.io" %}
Create a pull secret with the account that Cakewalk gave you:

```sh
kubectl -n mcp-gateway create secret docker-registry cakewalk-registry \
  --docker-server=quay.io --docker-username='<account>' --docker-password='<token>'
```

{% endtab %}

{% tab title="Copy to Amazon ECR" %}
Create the repositories `cakewalk/mcp-gateway` and `cakewalk/opa` in ECR, then copy both images:

```sh
ECR=<account id>.dkr.ecr.<region>.amazonaws.com

skopeo login quay.io -u '<account>'
aws ecr get-login-password --region <region> | skopeo login --username AWS --password-stdin $ECR

skopeo copy docker://quay.io/cakewalk/mcp-gateway:2026-09-15.2 \
            docker://$ECR/cakewalk/mcp-gateway:2026-09-15.2
skopeo copy docker://quay.io/cakewalk/opa:1.22.4-static \
            docker://$ECR/cakewalk/opa:1.22.4-static
```

In step 8, replace `quay.io/cakewalk` with your ECR address in both `image` lines, and remove `imagePullSecrets`. The nodes pull from ECR with their own role.
{% endtab %}
{% endtabs %}

#### 3. Create the Aurora database

Create an Aurora PostgreSQL cluster, version 16 or later, in the private subnets. We recommend version 18. Allow port 5432 in its security group from the security group of the cluster's nodes.

The script below creates the login role `mcp_gateway`, the database `mcp_gateway` owned by that role, and the schemas `api` and `audit_log`. No extension is needed. The gateway creates and upgrades its own tables when it starts.

Save it as `create-database.sql`:

```sql
\set ON_ERROR_STOP on

\if :{?gateway_password}
\else
  \echo 'Set the password of the new role: -v gateway_password=...'
  DO $$ BEGIN RAISE EXCEPTION 'gateway_password is not set'; END $$;
\endif

CREATE ROLE mcp_gateway LOGIN PASSWORD :'gateway_password';
GRANT mcp_gateway TO CURRENT_USER;
CREATE DATABASE mcp_gateway OWNER mcp_gateway;
REVOKE ALL ON DATABASE mcp_gateway FROM PUBLIC;

\connect mcp_gateway

CREATE SCHEMA api AUTHORIZATION mcp_gateway;
CREATE SCHEMA audit_log AUTHORIZATION mcp_gateway;
```

Aurora's certificate comes from Amazon's RDS certificate authority, which public trust stores do not include. Download its bundle, then run the script once as the master user, against the writer endpoint:

```sh
curl -o global-bundle.pem https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem

psql "host=<writer endpoint> port=5432 dbname=postgres user=<master user> sslmode=verify-full sslrootcert=global-bundle.pem" \
  -v gateway_password='<password>' -f create-database.sql
```

The gateway must trust the same authority. Store the bundle in a ConfigMap, which step 8 mounts:

```sh
kubectl -n mcp-gateway create configmap rds-ca --from-file=ca.crt=global-bundle.pem
```

The connection string for step 7:

```
Host=<writer endpoint>;Port=5432;Database=mcp_gateway;Username=mcp_gateway;Password=<password>;SSL Mode=VerifyFull
```

Choose a password without `;` and without quotes, because the connection string separates its parts with `;`.

#### 4. Create the Redis

Create an ElastiCache for Redis OSS replication group, version 7, in the private subnets, with encryption in transit and an AUTH token. Cluster mode can be on or off. Allow port 6379 in its security group from the security group of the cluster's nodes.

The gateway keeps short-lived state in Redis, so it needs no backups. Do not share the replication group with other applications.

The connection string for step 7:

```
<primary endpoint>:6379,password=<AUTH token>,ssl=true,abortConnect=false
```

Choose a token without `,`, because the connection string separates its parts with `,`.

#### 5. Request the certificate and plan the DNS name

Request a public certificate for `mcp.example.com` in ACM and note its ARN for step 9. The DNS record itself comes after step 9, when the load balancer exists.

#### 6. Generate the two key pairs

One pair signs the OAuth authorization codes. The other encrypts the credentials that the gateway stores for your Employees.

```sh
openssl genpkey -algorithm EC -pkeyopt ec_paramgen_curve:P-256 -out auth-code-private.pem
openssl pkey -in auth-code-private.pem -pubout -out auth-code-public.pem

openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:3072 -out encryption-private.pem
openssl pkey -in encryption-private.pem -pubout -out encryption-public.pem
```

{% hint style="danger" %}
Keep the four files in AWS Secrets Manager and in your backups. The encryption pair cannot be replaced: with a new one, every stored credential is unreadable and each Employee connects again.
{% endhint %}

The gateway encrypts with this key pair, not with AWS KMS.

#### 7. Create the Secret

One Kubernetes Secret holds everything that is secret. Each key is the name of a setting, so the names must be exactly these.

```sh
kubectl -n mcp-gateway create secret generic mcp-gateway-secrets \
  --from-literal=CONNECTION_STRING='<from step 3>' \
  --from-literal=REDIS_CONNECTION_STRING='<from step 4>' \
  --from-literal=OPA_AUTH_TOKEN="$(openssl rand -hex 32)" \
  --from-literal=MCP_GATEWAY_API_API_KEY='<from Cakewalk>' \
  --from-literal=MCP_GATEWAY_API_API_SECRET='<from Cakewalk>' \
  --from-literal=IDP_MCP_DCR_PROXY_AGENTFORCE_SECRET='<from Cakewalk>' \
  --from-file=MCP_AUTH_CODE_PRIVATE_KEY=auth-code-private.pem \
  --from-file=MCP_AUTH_CODE_PUBLIC_KEY=auth-code-public.pem \
  --from-file=Encryption__PUBLIC_KMS_SERVICE_LOCAL_DEV_CERT=encryption-public.pem \
  --from-file=Encryption__DATA_KEY_UNWRAPPER_SERVICE_LOCAL_DEV_CERT=encryption-private.pem
```

To keep the values in AWS Secrets Manager, let a tool such as the External Secrets Operator create this Secret from it. Keep the ten key names, and keep the line breaks of the four PEM values.

#### 8. Deploy the gateway

Save this as `mcp-gateway.yaml`. Replace `https://mcp.example.com` with your public URL and the image version with the one Cakewalk gave you. Leave the other settings as they are.

```yaml
apiVersion: v1
kind: ServiceAccount
metadata:
  name: mcp-gateway
  namespace: mcp-gateway
automountServiceAccountToken: false
---
# Configuration of the policy engine. It replaces the ${...} placeholders with its
# environment variables when it starts.
apiVersion: v1
kind: ConfigMap
metadata:
  name: mcp-gateway-opa
  namespace: mcp-gateway
data:
  config.yaml: |
    services:
      mcp-gateway:
        url: "http://127.0.0.1:8080"
        headers:
          X-API-Key: "${MCP_GATEWAY_API_API_KEY}"
          X-API-Secret: "${MCP_GATEWAY_API_API_SECRET}"
    bundles:
      authz:
        service: mcp-gateway
        resource: "/api/v1/PolicyBundle"
        polling:
          min_delay_seconds: 5
          max_delay_seconds: 15
  authz.rego: |
    package system.authz

    default allow := false

    allow if input.identity == opa.runtime().env.OPA_AUTH_TOKEN

    allow if input.path == ["health"]
---
# Two Services for the same pod. The load balancer applies the address rule of step 9
# to the second one only.
apiVersion: v1
kind: Service
metadata:
  name: mcp-gateway
  namespace: mcp-gateway
spec:
  type: ClusterIP
  selector:
    app.kubernetes.io/name: mcp-gateway
  ports:
    - name: http
      port: 8080
      targetPort: http
---
apiVersion: v1
kind: Service
metadata:
  name: mcp-gateway-s2s
  namespace: mcp-gateway
spec:
  type: ClusterIP
  selector:
    app.kubernetes.io/name: mcp-gateway
  ports:
    - name: http
      port: 8080
      targetPort: http
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: mcp-gateway
  namespace: mcp-gateway
  labels:
    app.kubernetes.io/name: mcp-gateway
spec:
  # More than one needs the image 2026.11.18.1 or later, agents that all use the MCP protocol
  # version 2026-07-28 or later, and a PostgreSQL connection limit that covers all replicas.
  replicas: 1
  # A new pod starts first, and an old pod is removed only when the new one is ready.
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
  selector:
    matchLabels:
      app.kubernetes.io/name: mcp-gateway
  template:
    metadata:
      labels:
        app.kubernetes.io/name: mcp-gateway
    spec:
      serviceAccountName: mcp-gateway
      automountServiceAccountToken: false
      terminationGracePeriodSeconds: 60
      imagePullSecrets:
        - name: cakewalk-registry
      securityContext:
        runAsNonRoot: true
        runAsUser: 10001
        runAsGroup: 10001
        fsGroup: 10001
        seccompProfile:
          type: RuntimeDefault
      containers:
        - name: mcp-gateway
          image: quay.io/cakewalk/mcp-gateway:2026-09-15.2
          # The settings come from the Secret of step 7, so the application starts directly.
          command: ["dotnet", "mcpgateway.api.dll"]
          securityContext:
            allowPrivilegeEscalation: false
            capabilities:
              drop: [ALL]
          ports:
            - name: http
              containerPort: 8080
          envFrom:
            - secretRef:
                name: mcp-gateway-secrets
          env:
            - name: MCP_GATEWAY_API_PUBLIC_URL
              value: "https://mcp.example.com"
            - name: ASPNETCORE_ENVIRONMENT
              value: Production
            - name: HOME
              value: /tmp
            - name: DATABASE_PROVIDER
              value: PostgreSql
            - name: MCP_GATEWAY_API_AUTH_SERVER_URL
              value: "https://idp2.getcakewalk.io"
            - name: MCP_GATEWAY_API_OAUTH_REDIRECT_BASE_URL
              value: "https://agent-force-api.getcakewalk.io"
            - name: MCP_DCR_PROXY_CLIENT_ID
              value: "mcp_dcr_proxy_agentforce_on_premise"
            - name: Encryption__PUBLIC_KMS_SERVICE_CLIENT_TYPE
              value: LOCAL
            - name: Encryption__PUBLIC_KMS_SERVICE_KEY_ID
              value: on-premise
            - name: OPA_URL
              value: "http://127.0.0.1:8181"
            - name: OPA_REPLAY_MAX_CONCURRENCY
              value: "16"
            - name: OPA_REPLAY_MAX_ITEMS
              value: "1000"
            - name: OPA_REPLAY_WINDOW_DAYS
              value: "30"
            - name: AuditLogging__AUDIT_LOGS_STORE_KEYS
              value: "Database"
            - name: SkillBundles__Enabled
              value: "false"
            # The RDS certificate authority of step 3, added to the public ones.
            - name: SSL_CERT_FILE
              value: /etc/ssl/extra-ca/ca.crt
          # The first start creates the tables, so it can take a few minutes.
          startupProbe:
            httpGet:
              path: /api/Health
              port: http
            periodSeconds: 10
            failureThreshold: 30
          livenessProbe:
            httpGet:
              path: /api/Health
              port: http
          readinessProbe:
            httpGet:
              path: /api/Health
              port: http
          # Keeps the pod serving while the load balancer takes it out of rotation.
          lifecycle:
            preStop:
              sleep:
                seconds: 10
          resources:
            requests:
              cpu: 100m
              memory: 256Mi
            limits:
              cpu: 500m
              memory: 2Gi
          volumeMounts:
            - name: tmp
              mountPath: /tmp
            - name: extra-ca
              mountPath: /etc/ssl/extra-ca
              readOnly: true
        - name: opa
          image: quay.io/cakewalk/opa:1.22.4-static
          args:
            - run
            - --server
            # The API listens on loopback only, so nothing outside this pod reaches it.
            - --addr=127.0.0.1:8181
            # Health endpoint for the kubelet, on its own port.
            - --diagnostic-addr=:8282
            - --authentication=token
            - --authorization=basic
            - --config-file=/config/config.yaml
            - /config/authz.rego
          securityContext:
            allowPrivilegeEscalation: false
            capabilities:
              drop: [ALL]
          ports:
            - name: opa-health
              containerPort: 8282
          env:
            - name: MCP_GATEWAY_API_API_KEY
              valueFrom:
                secretKeyRef:
                  name: mcp-gateway-secrets
                  key: MCP_GATEWAY_API_API_KEY
            - name: MCP_GATEWAY_API_API_SECRET
              valueFrom:
                secretKeyRef:
                  name: mcp-gateway-secrets
                  key: MCP_GATEWAY_API_API_SECRET
            - name: OPA_AUTH_TOKEN
              valueFrom:
                secretKeyRef:
                  name: mcp-gateway-secrets
                  key: OPA_AUTH_TOKEN
          livenessProbe:
            httpGet:
              path: /health
              port: opa-health
          readinessProbe:
            httpGet:
              path: /health
              port: opa-health
          # Longer than the gateway's, so the gateway never runs without its policy engine.
          lifecycle:
            preStop:
              sleep:
                seconds: 40
          resources:
            requests:
              cpu: 100m
              memory: 64Mi
            limits:
              cpu: 200m
              memory: 256Mi
          volumeMounts:
            - name: opa-config
              mountPath: /config
              readOnly: true
      volumes:
        - name: tmp
          emptyDir: {}
        - name: opa-config
          configMap:
            name: mcp-gateway-opa
        - name: extra-ca
          configMap:
            name: rds-ca
```

```sh
kubectl apply -f mcp-gateway.yaml
kubectl -n mcp-gateway rollout status deployment/mcp-gateway
```

**Error reports (optional).** The gateway can send its errors to Sentry. It is off unless you add the two variables below to the `env` of the `mcp-gateway` container. Use a DSN and an environment name from Cakewalk, so Cakewalk sees the errors of your gateway, or the DSN of your own Sentry project, which Cakewalk does not see and does not support.

```yaml
            - name: SENTRY_MCP_GATEWAY_DSN
              value: "<the DSN>"
            - name: SENTRY_ENVIRONMENT
              value: "<the name from Cakewalk, or a name of your own>"
```

With a DSN, the gateway sends to that Sentry project:

* Its errors, each with the message and the stack trace of the exception, and the build of the image. When an upstream MCP server answers with an error, the message can hold text that the server sent.
* The ids of the company, of the user and of the request.
* The log lines that came before each error. They hold user ids and request query strings.
* A performance trace of one request in a thousand.

It never sends the body of an HTTP request. The gateway then needs outbound HTTPS to the host of the DSN, through the NAT gateway.

#### 9. Create the load balancer

The Ingress below creates an internet-facing Application Load Balancer that routes only the paths the gateway needs. Everything else, such as `/metrics`, is not routed.

The Employee routes go to the Service `mcp-gateway`, for any source address. The configuration routes under `/api/v1` go to the Service `mcp-gateway-s2s`, and the `conditions` annotation limits that Service's rules to Cakewalk's addresses. The two paths under `/api/v1/Auth` belong to the Employees' OAuth flow. They are longer prefixes, so the load balancer evaluates them first.

Save this as `ingress.yaml` and set the ARN of your certificate:

```yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: mcp-gateway
  namespace: mcp-gateway
  annotations:
    alb.ingress.kubernetes.io/scheme: internet-facing
    alb.ingress.kubernetes.io/target-type: ip
    alb.ingress.kubernetes.io/listen-ports: '[{"HTTPS":443}]'
    alb.ingress.kubernetes.io/certificate-arn: <ARN of the certificate of step 5>
    alb.ingress.kubernetes.io/healthcheck-path: /api/Health
    # MCP connections are streams that stay open for minutes.
    alb.ingress.kubernetes.io/load-balancer-attributes: idle_timeout.timeout_seconds=600
    # Only Cakewalk's addresses reach the rules of the Service mcp-gateway-s2s.
    # Replace the two placeholders with the addresses that Cakewalk gives you.
    alb.ingress.kubernetes.io/conditions.mcp-gateway-s2s: >
      [{"field":"source-ip","sourceIpConfig":{"values":["203.0.113.10/32","198.51.100.20/32"]}}]
spec:
  ingressClassName: alb
  rules:
    # No host: this load balancer serves only the MCP Gateway.
    - http:
        paths:
          - path: /mcp
            pathType: Prefix
            backend: { service: { name: mcp-gateway, port: { name: http } } }
          - path: /meta
            pathType: Prefix
            backend: { service: { name: mcp-gateway, port: { name: http } } }
          - path: /.well-known
            pathType: Prefix
            backend: { service: { name: mcp-gateway, port: { name: http } } }
          - path: /api/v1/Auth/Connect
            pathType: Prefix
            backend: { service: { name: mcp-gateway, port: { name: http } } }
          - path: /api/v1/Auth/Callback
            pathType: Prefix
            backend: { service: { name: mcp-gateway, port: { name: http } } }
          - path: /auth/error
            pathType: Prefix
            backend: { service: { name: mcp-gateway, port: { name: http } } }
          - path: /auth/success
            pathType: Prefix
            backend: { service: { name: mcp-gateway, port: { name: http } } }
          - path: /dcr
            pathType: Prefix
            backend: { service: { name: mcp-gateway, port: { name: http } } }
          - path: /favicon-v2.png
            pathType: Prefix
            backend: { service: { name: mcp-gateway, port: { name: http } } }
          # Configuration routes, limited by the conditions annotation above.
          - path: /api/v1
            pathType: Prefix
            backend: { service: { name: mcp-gateway-s2s, port: { name: http } } }
```

```sh
kubectl apply -f ingress.yaml
kubectl -n mcp-gateway get ingress mcp-gateway
```

The `ADDRESS` column shows the name of the load balancer after a minute or two. Create an alias record for `mcp.example.com` that points at it, in Route 53 or in your DNS.

Two optional restrictions:

* **Your Employees only use Agents on their own machines.** Limit the load balancer to your networks and Cakewalk's addresses with the annotation `alb.ingress.kubernetes.io/inbound-cidrs`.
* **The host is open to the internet.** Attach an AWS WAF web ACL with a rate-based rule for `/dcr`, with the annotation `alb.ingress.kubernetes.io/wafv2-acl-arn`. An Agent registers itself on `/dcr` before any Employee signs in, so the route accepts requests without a token.

#### 10. Check

Both containers must be ready:

```sh
kubectl -n mcp-gateway get pods
# NAME                           READY   STATUS    RESTARTS
# mcp-gateway-6d9f7c5b8-x2x4k    2/2     Running   0
```

Then, from a machine of yours outside AWS:

| Request                                                                    | Expected                   | Otherwise                                                                       |
| -------------------------------------------------------------------------- | -------------------------- | ------------------------------------------------------------------------------- |
| `curl -i https://mcp.example.com/.well-known/oauth-protected-resource/mcp` | 200                        | 503: the pod is not ready, or a security group blocks the load balancer.        |
| `curl -i https://mcp.example.com/api/v1/PublicKey`                         | 404 from the load balancer | 401: the request reached the gateway, so the address rule of step 9 is missing. |
| `curl -i https://mcp.example.com/metrics`                                  | 404                        |                                                                                 |

{% hint style="danger" %}
Do not skip the second check. A 401 means that the configuration routes are open to every address.
{% endhint %}

#### 11. Tell Cakewalk

Until Cakewalk has set up your company on the gateway, the gateway rejects every Employee and has no Policies. During that time the policy engine's log repeats `Bundle load failed: server replied with Internal Server Error`. That is expected and stops when the company is set up.

After you tell us, our cloud reaches the gateway within minutes. The policy engine's log then shows the download of its policy bundle:

```sh
kubectl -n mcp-gateway logs deployment/mcp-gateway -c opa --tail=20
```

Then one Employee connects an Agent, adds a Connection and runs a tool. See [Employee Setup](https://www.cakewalk.security/docs/ai-agent-access/introduction/get-going-with-agent-access/employee-setup.md).

***

### 🧯 If something fails

```sh
kubectl -n mcp-gateway describe pod -l app.kubernetes.io/name=mcp-gateway
kubectl -n mcp-gateway logs deployment/mcp-gateway -c mcp-gateway --tail=100
kubectl -n mcp-gateway logs deployment/mcp-gateway -c opa --tail=100
```

| What you see                                                                                                                                             | Likely cause                                                                                                                                                            |
| -------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ImagePullBackOff`                                                                                                                                       | A missing pull secret, an image that was not copied to ECR, or a node that is not x86-64.                                                                               |
| The gateway container restarts, and the log names a missing or invalid setting                                                                           | A key is missing in the Secret or has another name (step 7).                                                                                                            |
| The gateway container restarts after about a minute, and the log ends with `Public Suffix List rule provider failed to build. Application cannot start.` | No outbound access to `publicsuffix.org`. Check the NAT gateway and the route tables.                                                                                   |
| The gateway container restarts, and the log shows a database error                                                                                       | The connection string, the security group of Aurora, or the ConfigMap `rds-ca` (step 3).                                                                                |
| The Ingress gets no address                                                                                                                              | The AWS Load Balancer Controller is not installed, or its log shows why it could not create the load balancer. A common cause is subnets without the tags it looks for. |
| Cakewalk reports that it cannot reach the gateway                                                                                                        | The security group of the load balancer, or the `inbound-cidrs` annotation, does not allow Cakewalk's addresses.                                                        |
| Employees are rejected after Cakewalk has set up the company                                                                                             | The Employees belong to another Cakewalk company. The gateway accepts only yours.                                                                                       |
| The policy engine's log says `OPA is out of date`                                                                                                        | The policy engine checks for a newer version when it starts. It sends nothing of yours. Do not replace the OPA image: Cakewalk chooses its version.                     |
| An Agent cannot register, `/dcr` answers 502                                                                                                             | The secret of the registration client is wrong (step 7), or the gateway cannot reach `idp2.getcakewalk.io`.                                                             |

The logs go to standard output only. The gateway does not write tool-call payloads to them. They do hold user ids and request query strings, and the message of an error that an upstream MCP server answered can hold text of that server, so treat them as you treat access logs. When you ask Cakewalk for help, send the logs of both containers.

***

### 🔄 Upgrades and backups

* **Back up** the Aurora cluster, and keep the four key files of step 6. Take a snapshot before each upgrade.
* **Upgrade** when Cakewalk announces a version. Change the image version in `mcp-gateway.yaml`, apply the changes to the manifest that the announcement lists, and run `kubectl apply -f mcp-gateway.yaml`. The new pod upgrades the tables as it starts, and the old pod serves until the new one is ready.
* **A rollback** returns to the older image and not to the older tables. After an upgrade that changed the tables, a rollback needs the snapshot.
* **One supported version.** Cakewalk supports one version at a time, because its cloud changes continuously. Stay on the version that we announce. When we announce a new version, the previous one keeps working with Cakewalk's cloud for 15 days, so upgrade within that time. If you need more time, let us know.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.cakewalk.security/docs/ai-agent-access/on-premise-setup/deploy-on-aws.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
