Amplify Toolbox
    Preparing search index...
    • Internal

      Set the ambient pipeline scope and stage context, execute fn, then clean up.

      Use this inside your stageFactory to make the pipeline scope available to defineHosting/defineBackend (which detect the ambient scope via globalThis).

      Type Parameters

      • T

      Parameters

      • scope: Stage

        The CDK Stage provided by the pipeline.

      • stageConfig: PipelineStageConfig<T>

        The full stage configuration for the current stage.

      • fn: () => void | Promise<void>

        A callback (sync or async) that imports/executes your application code.

      Returns Promise<void>