MDAA TS Docs
    Preparing search index...

    Configuration for a single MWAA environment instance.

    interface MwaaEnvironmentProps {
        airflowAccessRoles?: MdaaRoleRef[];
        airflowConfigurationOptions?: { [key: string]: string };
        airflowVersion?: string;
        dagPath?: string;
        dagS3Path?: string;
        environmentClass?: MwaaEnvironmentClass;
        executionRoleArn: string;
        logging?: MwaaLoggingConfig;
        logRetentionDays?: number;
        maxWebservers?: number;
        maxWorkers?: number;
        minWebservers?: number;
        minWorkers?: number;
        pluginsS3Path?: string;
        requirementsS3Path?: string;
        schedulers?: number;
        securityGroupIngress?: MwaaSecurityGroupIngressProps;
        startupScriptS3Path?: string;
        subnets: string[];
        vpcId: string;
        webserverAccessMode?: MwaaWebserverAccessMode;
        weeklyMaintenanceWindowStart?: string;
    }
    Index

    Properties

    airflowAccessRoles?: MdaaRoleRef[]

    Per-environment roles granted Airflow web login and CLI access.

    Use cases: Operator access; Developer access; Team-based access control

    AWS: IAM roles with Airflow access managed policy attached

    Validation: Optional; array of valid MdaaRoleRef

    airflowConfigurationOptions?: { [key: string]: string }

    Airflow configuration overrides as key-value pairs. Keys use the format 'section.option' (e.g., 'core.default_timezone').

    Use cases: Custom Airflow behavior; Performance tuning; Plugin configuration

    AWS: MWAA Airflow configuration options

    Validation: Optional; valid Airflow configuration keys

    airflowVersion?: string

    Apache Airflow version for the environment.

    Use cases: Version pinning; Upgrade testing

    AWS: MWAA environment Airflow version

    Validation: Optional; valid Airflow version string (e.g., '2.10.3')

    dagPath?: string

    Local path to a directory containing DAG files to deploy to the environment's DAG prefix (deployment/airflow/<env-name>/dags/). All .py files in this directory will be uploaded to S3 using the deployment role.

    When not specified, a default placeholder DAG is deployed so the MWAA environment can start successfully (MWAA requires at least one .py file in the DAGs path).

    Use cases: DAG deployment; Initial environment bootstrapping; CI/CD DAG delivery

    AWS: S3 DAG path via BucketDeployment

    Validation: Optional; valid local directory path containing .py files

    dagS3Path?: string

    Relative path to the DAGs folder within the source bucket, under the environment prefix (deployment/airflow//). For example, 'dags' resolves to 'deployment/airflow//dags' in the project bucket.

    Use cases: DAG file organization; Multiple DAG directories

    AWS: MWAA DAG S3 path

    Validation: Optional; valid S3 key prefix (no leading slash)

    'dags'
    
    environmentClass?: MwaaEnvironmentClass

    Environment class determining container and metadata database sizing.

    Use cases: Workload sizing; Cost optimization; Performance tuning

    AWS: MWAA environment class

    Validation: Optional; enum: mw1.small, mw1.medium, mw1.large, mw1.xlarge, mw1.2xlarge

    'mw1.small'
    
    executionRoleArn: string

    IAM execution role ARN for the MWAA environment. This role is assumed by Airflow workers and schedulers for DAG operations. Create this role in the Roles module with an airflow-env.amazonaws.com trust policy, and configure it as an execution role in the DataOps Project module when using project integration (so it receives project bucket and KMS key access).

    Use cases: Airflow worker permissions; DAG execution identity

    AWS: IAM role ARN with airflow-env.amazonaws.com trust

    Validation: Required; valid IAM role ARN

    Logging configuration for each Airflow component.

    Use cases: Debug troubleshooting; Audit compliance; Cost optimization

    AWS: CloudWatch log groups per Airflow component

    Validation: Optional; valid log levels per component

    logRetentionDays?: number

    Retention period (in days) for the CloudWatch log groups MWAA creates for each Airflow component. The construct pre-creates these log groups with this retention (and KMS encryption) so retention is applied by default instead of MWAA's never-expire default. Set to 0 for infinite retention.

    Use cases: Log cost control; Audit retention compliance

    AWS: CloudWatch log group retention

    Validation: Optional; valid CloudWatch retention day value or 0 for infinite

    731 (two years)
    
    maxWebservers?: number

    Maximum number of web servers (Airflow 2.10+).

    Use cases: Web UI scaling; Load handling

    AWS: MWAA max web servers

    Validation: Optional; integer >= minWebservers

    maxWorkers?: number

    Maximum number of workers for auto-scaling.

    Use cases: Peak load handling; Cost ceiling

    AWS: MWAA max workers

    Validation: Optional; integer >= minWorkers

    10
    
    minWebservers?: number

    Minimum number of web servers (Airflow 2.10+).

    Use cases: Web UI availability; High availability

    AWS: MWAA min web servers

    Validation: Optional; integer >= 2

    minWorkers?: number

    Minimum number of workers for auto-scaling.

    Use cases: Baseline capacity; Cost control

    AWS: MWAA min workers

    Validation: Optional; integer >= 1

    1
    
    pluginsS3Path?: string

    Relative path to the plugins ZIP file within the source bucket, under the environment prefix (deployment/airflow//).

    Use cases: Custom Airflow operators; Plugin distribution

    AWS: MWAA plugins S3 path

    Validation: Optional; valid S3 key ending in .zip

    requirementsS3Path?: string

    Relative path to the requirements.txt file within the source bucket, under the environment prefix (deployment/airflow//).

    Use cases: Python dependency management; Package installation

    AWS: MWAA requirements S3 path

    Validation: Optional; valid S3 key ending in .txt

    schedulers?: number

    Number of Airflow schedulers to run. When omitted, MWAA applies its own service default of 2; this module does not set the property.

    Use cases: DAG parsing performance; Scheduling throughput

    AWS: MWAA scheduler count

    Validation: Optional; integer (2-5)

    securityGroupIngress?: MwaaSecurityGroupIngressProps

    Security group ingress rules for the MWAA environment.

    Use cases: Web server access control; Worker connectivity

    AWS: VPC security group rules

    Validation: Optional; valid CIDR or security group references

    startupScriptS3Path?: string

    Relative path to the startup shell script within the source bucket, under the environment prefix (deployment/airflow//).

    Use cases: Environment initialization; Custom setup commands

    AWS: MWAA startup script S3 path

    Validation: Optional; valid S3 key ending in .sh

    subnets: string[]

    Subnet IDs for the MWAA environment (minimum 2, must be in different AZs).

    Use cases: Multi-AZ deployment; High availability

    AWS: VPC subnets

    Validation: Required; minimum 2 subnet IDs in different AZs

    vpcId: string

    VPC ID for deploying the MWAA environment.

    Use cases: VPC isolation; Network segmentation

    AWS: VPC

    Validation: Required; valid VPC ID

    webserverAccessMode?: MwaaWebserverAccessMode

    Web server access mode controlling how the Airflow UI is accessed.

    WARNING: PUBLIC_ONLY exposes the Airflow web server to the public internet, removing the VPC network-isolation control. Access remains authenticated via IAM, but the endpoint becomes publicly reachable. Prefer the PRIVATE_ONLY default and reach the UI over VPN/Direct Connect or a VPC endpoint.

    Use cases: Private-only access for secure deployments; Public access for development

    AWS: MWAA web server access mode

    Validation: Optional; enum: PRIVATE_ONLY, PUBLIC_ONLY

    'PRIVATE_ONLY'
    
    weeklyMaintenanceWindowStart?: string

    Weekly maintenance window start in 'DAY:HH:MM' format (UTC).

    Use cases: Planned maintenance scheduling; Availability management

    AWS: MWAA weekly maintenance window

    Validation: Optional; format 'DAY:HH:MM' (e.g., 'SUN:03:00')