Skip to main content

tcb fn layer create

Creates a layer and publishes a version. Layer versions are immutable, publish a new version to update content.

Usage​

tcb fn layer create <alias> --file <path> [options]

Flags​

FlagRequiredDescriptionDefault
<alias>YesLayer alias—
--file <path>YesDirectory or ZIP path—
--runtime <runtimes>NoCompatible runtimes, comma separatedCommon runtimes
-e, --env-id <envId>YesEnvironment ID—

Example​

# Upload a directory
tcb fn layer create myLayer --file ./node_modules -e my-env-id

# Upload a ZIP file with compatible runtimes
tcb fn layer create commonLib --file ./libs.zip --runtime Nodejs18.15,Nodejs20.19 -e my-env-id