Amplify Toolbox
    Preparing search index...

    Interface PipelineStageConfig<TConfig>

    Configuration for a deployment stage.

    Each stage represents a deployment environment (e.g., beta, prod). Stages are deployed in the order they appear in the stages array.

    interface PipelineStageConfig<TConfig = Record<string, unknown>> {
        approvalComment?: string;
        bakeTime?: Duration;
        config?: TConfig;
        env?: Environment;
        environment?: Record<string, string>;
        name: string;
        requireApproval?: boolean;
    }

    Type Parameters

    • TConfig = Record<string, unknown>
    Index

    Properties

    approvalComment?: string

    Optional comment shown in the approval notification. Only relevant when requireApproval is true.

    bakeTime?: Duration

    Optional baking time after deployment before proceeding. Useful for canary validation — gives time for alarms to fire.

    Implemented as a CodeBuild sleep step (~$0.005/min on BUILD_GENERAL1_SMALL). An explicit timeout of bakeTime + 10 minutes is set on the CodeBuild step to prevent pipeline hangs.

    For longer baking periods, use requireApproval: true with external monitoring/alerting instead.

    config?: TConfig

    User-defined configuration passed through to the stageFactory.

    Use this for per-stage settings like domain names, feature flags, scaling parameters, etc.

    { domain: 'myapp.com', enableCanary: true }
    
    env?: Environment

    Target AWS account and region for this stage. When omitted, deploys to the pipeline's own account/region.

    environment?: Record<string, string>

    Environment variables to set on process.env when importing the app file for this stage.

    These are synthesis-time variables (available during cdk synth), not deployment-time. Use this for per-stage configuration that your CDK app reads from process.env (e.g., domain names, feature flags). Only applies when using the appFile prop.

    { DOMAIN: 'myapp.com', ENABLE_CANARY: 'true' }
    
    name: string

    Logical name for this stage (e.g., 'beta', 'prod'). Used as the CDK Stage construct id.

    requireApproval?: boolean

    Whether to require manual approval before deploying to this stage.

    false