Amplify Toolbox
    Preparing search index...

    Type Alias DefinePipelineProps<TConfig>

    User-facing props for definePipeline().

    Unlike the internal PipelineProps, this type does NOT expose stageFactorydefinePipeline() automatically discovers and imports amplify/hosting.ts and amplify/backend.ts for each stage using the ambient scope pattern (globalThis.__AMPLIFY_PIPELINE_SCOPE__).

    This is Amplify-specific glue and has no equivalent in @aws-blocks/pipeline.

    // amplify/pipeline.ts
    definePipeline({
    source: {
    repo: 'my-org/my-app',
    connectionArn: 'arn:aws:codeconnections:us-east-1:123456789:connection/aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb',
    },
    branches: [
    {
    branch: 'main',
    stages: [
    { name: 'beta' },
    { name: 'prod', requireApproval: true, config: { domain: 'myapp.com' } },
    ],
    },
    ],
    });
    type DefinePipelineProps<TConfig = Record<string, unknown>> = {
        branches: BranchConfig<TConfig>[];
        crossAccountKeys?: boolean;
        selfMutation?: boolean;
        source: Omit<PipelineSourceConfig, "connectionArn"> & {
            connectionArn: string;
        };
        stackName?: string;
        synth?: PipelineSynthConfig;
    }

    Type Parameters

    • TConfig = Record<string, unknown>

      Type of user-defined per-stage configuration.

    Index

    Properties

    branches: BranchConfig<TConfig>[]

    Branch configurations. Each entry creates a separate CodePipeline.

    crossAccountKeys?: boolean

    Cross-account keys for artifact encryption. Enable when deploying to accounts different from the pipeline account.

    false
    
    selfMutation?: boolean

    Whether the pipeline should self-mutate (update its own definition).

    true
    
    source: Omit<PipelineSourceConfig, "connectionArn"> & { connectionArn: string }

    Source repository configuration.

    connectionArn is narrowed to a plain string here. @aws-blocks/pipeline additionally accepts a config('CONNECTION_ARN') marker, but only on its async Pipeline.create() path (which awaits synth-time resolution). definePipeline() synthesizes synchronously (new AmplifyPipelineConstruct), which rejects a marker connectionArn — so allowing one in the type would be a contract the runtime can't honor. Pass the ARN literally, or read it into a string before calling definePipeline().

    stackName?: string

    Optional CloudFormation stack name for the pipeline stack.

    When omitted, defaults to amplify-pipeline-<sanitized-repo-name>. Provide an explicit name if you need a stable stack name or have multiple pipelines for the same repository in one account/region.

    'my-app-pipeline'
    

    Synth step configuration.