Portaldocs

Lambda

Connect a Lambda Cloud account so Portal can run jobs on Lambda's GPU instances.

Warnings and limits

  • Lambda has no spot instances and gives no notice: a job there is suspended only when you suspend it, or before a limit you set.
  • Lambda capacity changes by the minute. After a launch finds no capacity for a type in a region, Portal waits before it tries that type there again: 60 s, doubling up to 30 minutes.
  • Portal launches at most one Lambda instance every 12 s per account, and makes at most one API call a second.
  • Quotes leave out storage and data transfer.

Connect

Create an API key in Lambda's console, then add it on Portal's console Connect page, or from the CLI:

export LAMBDA_API_KEY=...   # in your own terminal, not in a shared log
portal connect lambda --from-cli

--from-cli reads the key from LAMBDA_API_KEY without printing it. You can also put LAMBDA_API_KEY=... in a file and run portal connect lambda --file lambda.env. The key is sealed on Portal's side and never shown again.

Instances

Portal offers the instance types Lambda lists for your account, with their GPUs, prices and the regions that have capacity at that moment. Prices are refreshed every 5 minutes.

SSH keys

Lambda instances start with an SSH key. Portal adds a key of its own to your Lambda account the first time it launches, and launches only with keys whose private half it holds. If your account already has a key under Portal's name that Portal did not make (for example one an earlier Portal host registered), Portal leaves that key as it is, never uses or replaces it, and registers a key of its own under a name only that key holds. A warning in the job's events names both keys. You can delete the old key in Lambda's console.

Stopping

When a job ends or you stop it, Portal terminates the instance and waits up to 90 s for Lambda to confirm it.

On this page