Skip to main content

tcb fn copy

Copies a function to another name within the same environment.

Usage​

tcb fn copy <sourceName> <targetName> [options]

Flags​

FlagRequiredDescriptionDefault
<sourceName>YesSource function name—
<targetName>YesTarget function name—
--forceNoOverwrite the target when it already exists—

Example​

# Copy the app function to app2
tcb fn copy app app2

# Overwrite an existing target
tcb fn copy app app2 --force

Notes​

  • The copy carries code, timeout, memory, environment variables, VPC configuration, handler, and runtime
  • Triggers are not copied, configure them separately for the target function