Amplify Toolbox
    Preparing search index...

    Type Alias PipelineProps<TConfig>

    PipelineProps: BlocksPipelineProps<TConfig> & {
        _sourceOverride?: CodePipelineSource;
        stageFactory: (
            scope: cdk.Stage,
            stageConfig: PipelineStageConfig<TConfig>,
        ) => void | Promise<void>;
    }

    Internal props for the AmplifyPipelineConstruct.

    The generic @aws-blocks/pipeline props unchanged, with stageFactory narrowed to required. The two-phase hosting deploy is expressed through the upstream postStage prop (part of BlocksPipelineProps), which definePipeline() supplies — no Amplify-specific hook prop is needed.

    stageFactory is narrowed to required here (aws-blocks makes it optional because it also supports the appFile path, which the Amplify shim does not use).

    Type Parameters

    • TConfig = Record<string, unknown>

      Type of user-defined per-stage configuration.

    Type Declaration

    • Optional Readonly Internal_sourceOverride?: CodePipelineSource

      Internal escape hatch: override the GitHub source with a custom source.

      Used in tests to provide an S3 source instead of requiring a real GitHub connection. @aws-blocks/pipeline consumes this at runtime but omits it from its public PipelineProps type, so the shim re-declares it here to keep it type-visible. Not part of the public API.

    • ReadonlystageFactory: (
          scope: cdk.Stage,
          stageConfig: PipelineStageConfig<TConfig>,
      ) => void | Promise<void>

      Factory function that populates a CDK Stage with stacks.

      Required in the Amplify wrapper (aws-blocks marks it optional to allow its appFile path, which the shim does not expose).

    new AmplifyPipelineConstruct(stack, 'Pipeline', {
    source: { repo: 'my-org/my-app', connectionArn: '...' },
    branches: [{ branch: 'main', stages: [{ name: 'prod' }] }],
    stageFactory: (scope, stageConfig) => {
    new MyStack(scope, 'App', { env: stageConfig.env });
    },
    });