Inquir Compute
Browse sections

Layers for serverless functions

Catalog layers package shared dependencies for reuse across serverless functions—pick Node, Python, or Go entries, stack merge order, and keep runtime bundles smaller than vendoring everything per upload.

Layers are pre-built dependency bundles—similar in idea to AWS Lambda layers—so you don’t have to pack every library into each function’s upload. The platform maintains separate catalogs for Node.js, Python, and Go; only entries that match a function’s runtime are offered.

Open the function’s test panel, go to the Config tab, then Layers. Use search to filter by name or description, select the layers you need, and save the function so attachments persist. The checklist shows catalog layers only.

How layers attach by runtime

  • Node.js — layers add npm packages. Use CommonJS require() (or ESM import when your project is set up for modules).
  • Python — layers add PyPI packages installed for the Python 3.12 runtime. Import them in your handler as usual.
  • Go — layers ship pre-downloaded modules for Go 1.22. Import those modules from your code without copying entire dependency trees into the function bundle.

What you’ll see in the catalog

Exact layer names depend on what your environment was seeded with. Typical groups include:

  • HTTP and APIs — clients for REST and third-party HTTP APIs.
  • Databases and data — drivers and helpers for SQL, document stores, and caches.
  • AI and automation — model SDKs, agent frameworks, and related tooling where provided.
  • Cloud and messaging — cloud vendor clients, BaaS SDKs, email/SMS, chat bots, queues, and streaming helpers.
  • Utilities — auth, validation, files, spreadsheets, logging, scraping, and more. Search is the fastest way to find a specific package.

Stacking multiple layers

Layers are merged in the order you attach them. If two layers expose the same top-level package or module path, the earlier attachment usually wins—prefer non-overlapping layers when you can.