Skip to main content
err:unkey:application:invalid_environment_settings
Example

What Happened?

You called createDeployment for an environment whose settings cannot produce a running deployment. Rather than accept the request and let it fail partway through the build, Unkey rejects it immediately and lists every setting that needs fixing. The detail message enumerates all failing checks at once so you can fix them in a single pass. An environment must satisfy the same requirements the deploy pipeline enforces:
  • port is between 1 and 65535.
  • cpu is at least 0.25 vCPU (250 millicores).
  • memory is at least 256 MiB.
  • At least one schedulable region is configured.
A freshly created environment starts with default runtime settings and a default region, but this error appears if those were cleared or set to invalid values, or if no schedulable region exists yet.

How To Fix

  1. Read the detail message; it names each failing setting and its current value.
  2. Call updateSettings on the environment to set a valid port, vcpus, and memoryMib.
  3. If the message mentions regions, configure at least one schedulable region for the environment.
  4. Retry createDeployment.

Common Mistakes

  • Values below the minimum: cpu must be at least 0.25 vCPU, memory at least 256 MiB, and port within 1-65535; anything lower fails validation.
  • Clearing all regions: An environment with no schedulable region cannot be scheduled anywhere.
  • Fixing one field at a time: The detail lists every problem at once; resolve them all before retrying instead of round-tripping per field.
Last modified on July 20, 2026