AmazonMWAA

2021/05/26 - AmazonMWAA - 3 updated api methods

Changes  Adds scheduler count selection for Environments using Airflow version 2.0.2 or later.

CreateEnvironment (updated) Link ¶
Changes (request)
{'Schedulers': 'integer'}

Creates an Amazon Managed Workflows for Apache Airflow (MWAA) environment.

See also: AWS API Documentation

Request Syntax

client.create_environment(
    AirflowConfigurationOptions={
        'string': 'string'
    },
    AirflowVersion='string',
    DagS3Path='string',
    EnvironmentClass='string',
    ExecutionRoleArn='string',
    KmsKey='string',
    LoggingConfiguration={
        'DagProcessingLogs': {
            'Enabled': True|False,
            'LogLevel': 'CRITICAL'|'ERROR'|'WARNING'|'INFO'|'DEBUG'
        },
        'SchedulerLogs': {
            'Enabled': True|False,
            'LogLevel': 'CRITICAL'|'ERROR'|'WARNING'|'INFO'|'DEBUG'
        },
        'TaskLogs': {
            'Enabled': True|False,
            'LogLevel': 'CRITICAL'|'ERROR'|'WARNING'|'INFO'|'DEBUG'
        },
        'WebserverLogs': {
            'Enabled': True|False,
            'LogLevel': 'CRITICAL'|'ERROR'|'WARNING'|'INFO'|'DEBUG'
        },
        'WorkerLogs': {
            'Enabled': True|False,
            'LogLevel': 'CRITICAL'|'ERROR'|'WARNING'|'INFO'|'DEBUG'
        }
    },
    MaxWorkers=123,
    MinWorkers=123,
    Name='string',
    NetworkConfiguration={
        'SecurityGroupIds': [
            'string',
        ],
        'SubnetIds': [
            'string',
        ]
    },
    PluginsS3ObjectVersion='string',
    PluginsS3Path='string',
    RequirementsS3ObjectVersion='string',
    RequirementsS3Path='string',
    Schedulers=123,
    SourceBucketArn='string',
    Tags={
        'string': 'string'
    },
    WebserverAccessMode='PRIVATE_ONLY'|'PUBLIC_ONLY',
    WeeklyMaintenanceWindowStart='string'
)
type AirflowConfigurationOptions

dict

param AirflowConfigurationOptions

A list of key-value pairs containing the Apache Airflow configuration options you want to attach to your environment. To learn more, see Apache Airflow configuration options.

  • (string) --

    • (string) --

type AirflowVersion

string

param AirflowVersion

The Apache Airflow version for your environment. For example, v1.10.12 . If no value is specified, defaults to the latest version. Valid values: v1.10.12 .

type DagS3Path

string

param DagS3Path

[REQUIRED]

The relative path to the DAGs folder on your Amazon S3 bucket. For example, dags . To learn more, see Adding or updating DAGs.

type EnvironmentClass

string

param EnvironmentClass

The environment class type. Valid values: mw1.small , mw1.medium , mw1.large . To learn more, see Amazon MWAA environment class.

type ExecutionRoleArn

string

param ExecutionRoleArn

[REQUIRED]

The Amazon Resource Name (ARN) of the execution role for your environment. An execution role is an AWS Identity and Access Management (IAM) role that grants MWAA permission to access AWS services and resources used by your environment. For example, arn:aws:iam::123456789:role/my-execution-role . To learn more, see Amazon MWAA Execution role.

type KmsKey

string

param KmsKey

The AWS Key Management Service (KMS) key to encrypt the data in your environment. You can use an AWS owned CMK, or a Customer managed CMK (advanced). To learn more, see Get started with Amazon Managed Workflows for Apache Airflow.

type LoggingConfiguration

dict

param LoggingConfiguration

Defines the Apache Airflow logs to send to CloudWatch Logs: DagProcessingLogs , SchedulerLogs , TaskLogs , WebserverLogs , WorkerLogs .

  • DagProcessingLogs (dict) --

    Defines the type of logs to send for the Apache Airflow log type (e.g. DagProcessingLogs ). Valid values: CloudWatchLogGroupArn , Enabled , LogLevel .

    • Enabled (boolean) -- [REQUIRED]

      Indicates whether to enable the Apache Airflow log type (e.g. DagProcessingLogs ) in CloudWatch Logs.

    • LogLevel (string) -- [REQUIRED]

      Defines the Apache Airflow logs to send for the log type (e.g. DagProcessingLogs ) to CloudWatch Logs. Valid values: CRITICAL , ERROR , WARNING , INFO .

  • SchedulerLogs (dict) --

    Defines the type of logs to send for the Apache Airflow log type (e.g. DagProcessingLogs ). Valid values: CloudWatchLogGroupArn , Enabled , LogLevel .

    • Enabled (boolean) -- [REQUIRED]

      Indicates whether to enable the Apache Airflow log type (e.g. DagProcessingLogs ) in CloudWatch Logs.

    • LogLevel (string) -- [REQUIRED]

      Defines the Apache Airflow logs to send for the log type (e.g. DagProcessingLogs ) to CloudWatch Logs. Valid values: CRITICAL , ERROR , WARNING , INFO .

  • TaskLogs (dict) --

    Defines the type of logs to send for the Apache Airflow log type (e.g. DagProcessingLogs ). Valid values: CloudWatchLogGroupArn , Enabled , LogLevel .

    • Enabled (boolean) -- [REQUIRED]

      Indicates whether to enable the Apache Airflow log type (e.g. DagProcessingLogs ) in CloudWatch Logs.

    • LogLevel (string) -- [REQUIRED]

      Defines the Apache Airflow logs to send for the log type (e.g. DagProcessingLogs ) to CloudWatch Logs. Valid values: CRITICAL , ERROR , WARNING , INFO .

  • WebserverLogs (dict) --

    Defines the type of logs to send for the Apache Airflow log type (e.g. DagProcessingLogs ). Valid values: CloudWatchLogGroupArn , Enabled , LogLevel .

    • Enabled (boolean) -- [REQUIRED]

      Indicates whether to enable the Apache Airflow log type (e.g. DagProcessingLogs ) in CloudWatch Logs.

    • LogLevel (string) -- [REQUIRED]

      Defines the Apache Airflow logs to send for the log type (e.g. DagProcessingLogs ) to CloudWatch Logs. Valid values: CRITICAL , ERROR , WARNING , INFO .

  • WorkerLogs (dict) --

    Defines the type of logs to send for the Apache Airflow log type (e.g. DagProcessingLogs ). Valid values: CloudWatchLogGroupArn , Enabled , LogLevel .

    • Enabled (boolean) -- [REQUIRED]

      Indicates whether to enable the Apache Airflow log type (e.g. DagProcessingLogs ) in CloudWatch Logs.

    • LogLevel (string) -- [REQUIRED]

      Defines the Apache Airflow logs to send for the log type (e.g. DagProcessingLogs ) to CloudWatch Logs. Valid values: CRITICAL , ERROR , WARNING , INFO .

type MaxWorkers

integer

param MaxWorkers

The maximum number of workers that you want to run in your environment. MWAA scales the number of Apache Airflow workers up to the number you specify in the MaxWorkers field. For example, 20 . When there are no more tasks running, and no more in the queue, MWAA disposes of the extra workers leaving the one worker that is included with your environment, or the number you specify in MinWorkers .

type MinWorkers

integer

param MinWorkers

The minimum number of workers that you want to run in your environment. MWAA scales the number of Apache Airflow workers up to the number you specify in the MaxWorkers field. When there are no more tasks running, and no more in the queue, MWAA disposes of the extra workers leaving the worker count you specify in the MinWorkers field. For example, 2 .

type Name

string

param Name

[REQUIRED]

The name of the Amazon MWAA environment. For example, MyMWAAEnvironment .

type NetworkConfiguration

dict

param NetworkConfiguration

[REQUIRED]

The VPC networking components used to secure and enable network traffic between the AWS resources for your environment. To learn more, see About networking on Amazon MWAA.

  • SecurityGroupIds (list) --

    A list of 1 or more security group IDs. Accepts up to 5 security group IDs. A security group must be attached to the same VPC as the subnets. To learn more, see Security in your VPC on Amazon MWAA.

    • (string) --

  • SubnetIds (list) --

    A list of 2 subnet IDs. Required to create an environment. Must be private subnets in two different availability zones. A subnet must be attached to the same VPC as the security group.

    • (string) --

type PluginsS3ObjectVersion

string

param PluginsS3ObjectVersion

The version of the plugins.zip file on your Amazon S3 bucket. A version must be specified each time a plugins.zip file is updated. To learn more, see How S3 Versioning works.

type PluginsS3Path

string

param PluginsS3Path

The relative path to the plugins.zip file on your Amazon S3 bucket. For example, plugins.zip . If specified, then the plugins.zip version is required. To learn more, see Installing custom plugins.

type RequirementsS3ObjectVersion

string

param RequirementsS3ObjectVersion

The version of the requirements.txt file on your Amazon S3 bucket. A version must be specified each time a requirements.txt file is updated. To learn more, see How S3 Versioning works.

type RequirementsS3Path

string

param RequirementsS3Path

The relative path to the requirements.txt file on your Amazon S3 bucket. For example, requirements.txt . If specified, then a file version is required. To learn more, see Installing Python dependencies.

type Schedulers

integer

param Schedulers

The number of Apache Airflow schedulers to run in your environment.

type SourceBucketArn

string

param SourceBucketArn

[REQUIRED]

The Amazon Resource Name (ARN) of the Amazon S3 bucket where your DAG code and supporting files are stored. For example, arn:aws:s3:::my-airflow-bucket-unique-name . To learn more, see Create an Amazon S3 bucket for Amazon MWAA.

type Tags

dict

param Tags

The key-value tag pairs you want to associate to your environment. For example, "Environment": "Staging" . To learn more, see Tagging AWS resources.

  • (string) --

    • (string) --

type WebserverAccessMode

string

param WebserverAccessMode

The Apache Airflow Web server access mode. To learn more, see Apache Airflow access modes.

type WeeklyMaintenanceWindowStart

string

param WeeklyMaintenanceWindowStart

The day and time of the week to start weekly maintenance updates of your environment in the following format: DAY:HH:MM . For example: TUE:03:30 . You can specify a start time in 30 minute increments only. Supported input includes the following:

  • MON|TUE|WED|THU|FRI|SAT|SUN:([01]\d|2[0-3]):(00|30)

rtype

dict

returns

Response Syntax

{
    'Arn': 'string'
}

Response Structure

  • (dict) --

    • Arn (string) --

      The Amazon Resource Name (ARN) returned in the response for the environment.

GetEnvironment (updated) Link ¶
Changes (response)
{'Environment': {'Schedulers': 'integer'}}

Retrieves the details of an Amazon Managed Workflows for Apache Airflow (MWAA) environment.

See also: AWS API Documentation

Request Syntax

client.get_environment(
    Name='string'
)
type Name

string

param Name

[REQUIRED]

The name of the Amazon MWAA environment. For example, MyMWAAEnvironment .

rtype

dict

returns

Response Syntax

{
    'Environment': {
        'AirflowConfigurationOptions': {
            'string': 'string'
        },
        'AirflowVersion': 'string',
        'Arn': 'string',
        'CreatedAt': datetime(2015, 1, 1),
        'DagS3Path': 'string',
        'EnvironmentClass': 'string',
        'ExecutionRoleArn': 'string',
        'KmsKey': 'string',
        'LastUpdate': {
            'CreatedAt': datetime(2015, 1, 1),
            'Error': {
                'ErrorCode': 'string',
                'ErrorMessage': 'string'
            },
            'Status': 'SUCCESS'|'PENDING'|'FAILED'
        },
        'LoggingConfiguration': {
            'DagProcessingLogs': {
                'CloudWatchLogGroupArn': 'string',
                'Enabled': True|False,
                'LogLevel': 'CRITICAL'|'ERROR'|'WARNING'|'INFO'|'DEBUG'
            },
            'SchedulerLogs': {
                'CloudWatchLogGroupArn': 'string',
                'Enabled': True|False,
                'LogLevel': 'CRITICAL'|'ERROR'|'WARNING'|'INFO'|'DEBUG'
            },
            'TaskLogs': {
                'CloudWatchLogGroupArn': 'string',
                'Enabled': True|False,
                'LogLevel': 'CRITICAL'|'ERROR'|'WARNING'|'INFO'|'DEBUG'
            },
            'WebserverLogs': {
                'CloudWatchLogGroupArn': 'string',
                'Enabled': True|False,
                'LogLevel': 'CRITICAL'|'ERROR'|'WARNING'|'INFO'|'DEBUG'
            },
            'WorkerLogs': {
                'CloudWatchLogGroupArn': 'string',
                'Enabled': True|False,
                'LogLevel': 'CRITICAL'|'ERROR'|'WARNING'|'INFO'|'DEBUG'
            }
        },
        'MaxWorkers': 123,
        'MinWorkers': 123,
        'Name': 'string',
        'NetworkConfiguration': {
            'SecurityGroupIds': [
                'string',
            ],
            'SubnetIds': [
                'string',
            ]
        },
        'PluginsS3ObjectVersion': 'string',
        'PluginsS3Path': 'string',
        'RequirementsS3ObjectVersion': 'string',
        'RequirementsS3Path': 'string',
        'Schedulers': 123,
        'ServiceRoleArn': 'string',
        'SourceBucketArn': 'string',
        'Status': 'CREATING'|'CREATE_FAILED'|'AVAILABLE'|'UPDATING'|'DELETING'|'DELETED'|'UNAVAILABLE'|'UPDATE_FAILED',
        'Tags': {
            'string': 'string'
        },
        'WebserverAccessMode': 'PRIVATE_ONLY'|'PUBLIC_ONLY',
        'WebserverUrl': 'string',
        'WeeklyMaintenanceWindowStart': 'string'
    }
}

Response Structure

  • (dict) --

    • Environment (dict) --

      An object containing all available details about the environment.

      • AirflowConfigurationOptions (dict) --

        A list of key-value pairs containing the Apache Airflow configuration options attached to your environment. To learn more, see Apache Airflow configuration options.

        • (string) --

          • (string) --

      • AirflowVersion (string) --

        The Apache Airflow version on your environment. For example, v1.10.12 .

      • Arn (string) --

        The Amazon Resource Name (ARN) of the Amazon MWAA environment.

      • CreatedAt (datetime) --

        The day and time the environment was created.

      • DagS3Path (string) --

        The relative path to the DAGs folder on your Amazon S3 bucket. For example, dags . To learn more, see Adding or updating DAGs.

      • EnvironmentClass (string) --

        The environment class type. Valid values: mw1.small , mw1.medium , mw1.large . To learn more, see Amazon MWAA environment class.

      • ExecutionRoleArn (string) --

        The Amazon Resource Name (ARN) of the execution role in IAM that allows MWAA to access AWS resources in your environment. For example, arn:aws:iam::123456789:role/my-execution-role . To learn more, see Amazon MWAA Execution role.

      • KmsKey (string) --

        The Key Management Service (KMS) encryption key used to encrypt the data in your environment.

      • LastUpdate (dict) --

        The status of the last update on the environment, and any errors that were encountered.

        • CreatedAt (datetime) --

          The day and time of the last update on the environment.

        • Error (dict) --

          The error that was encountered during the last update of the environment.

          • ErrorCode (string) --

            The error code that corresponds to the error with the last update.

          • ErrorMessage (string) --

            The error message that corresponds to the error code.

        • Status (string) --

          The status of the last update on the environment. Valid values: SUCCESS , PENDING , FAILED .

      • LoggingConfiguration (dict) --

        The Apache Airflow logs being sent to CloudWatch Logs: DagProcessingLogs , SchedulerLogs , TaskLogs , WebserverLogs , WorkerLogs .

        • DagProcessingLogs (dict) --

          Defines the type of logs to send for the Apache Airflow log type (e.g. DagProcessingLogs ). Valid values: CloudWatchLogGroupArn , Enabled , LogLevel .

          • CloudWatchLogGroupArn (string) --

            The Amazon Resource Name (ARN) for the CloudWatch Logs group where the Apache Airflow log type (e.g. DagProcessingLogs ) is published. For example, arn:aws:logs:us-east-1:123456789012:log-group:airflow-MyMWAAEnvironment-MwaaEnvironment-DAGProcessing:* .

          • Enabled (boolean) --

            Indicates whether to enable the Apache Airflow log type (e.g. DagProcessingLogs ) in CloudWatch Logs.

          • LogLevel (string) --

            Defines the Apache Airflow logs to send for the log type (e.g. DagProcessingLogs ) to CloudWatch Logs. Valid values: CRITICAL , ERROR , WARNING , INFO .

        • SchedulerLogs (dict) --

          Defines the type of logs to send for the Apache Airflow log type (e.g. DagProcessingLogs ). Valid values: CloudWatchLogGroupArn , Enabled , LogLevel .

          • CloudWatchLogGroupArn (string) --

            The Amazon Resource Name (ARN) for the CloudWatch Logs group where the Apache Airflow log type (e.g. DagProcessingLogs ) is published. For example, arn:aws:logs:us-east-1:123456789012:log-group:airflow-MyMWAAEnvironment-MwaaEnvironment-DAGProcessing:* .

          • Enabled (boolean) --

            Indicates whether to enable the Apache Airflow log type (e.g. DagProcessingLogs ) in CloudWatch Logs.

          • LogLevel (string) --

            Defines the Apache Airflow logs to send for the log type (e.g. DagProcessingLogs ) to CloudWatch Logs. Valid values: CRITICAL , ERROR , WARNING , INFO .

        • TaskLogs (dict) --

          Defines the type of logs to send for the Apache Airflow log type (e.g. DagProcessingLogs ). Valid values: CloudWatchLogGroupArn , Enabled , LogLevel .

          • CloudWatchLogGroupArn (string) --

            The Amazon Resource Name (ARN) for the CloudWatch Logs group where the Apache Airflow log type (e.g. DagProcessingLogs ) is published. For example, arn:aws:logs:us-east-1:123456789012:log-group:airflow-MyMWAAEnvironment-MwaaEnvironment-DAGProcessing:* .

          • Enabled (boolean) --

            Indicates whether to enable the Apache Airflow log type (e.g. DagProcessingLogs ) in CloudWatch Logs.

          • LogLevel (string) --

            Defines the Apache Airflow logs to send for the log type (e.g. DagProcessingLogs ) to CloudWatch Logs. Valid values: CRITICAL , ERROR , WARNING , INFO .

        • WebserverLogs (dict) --

          Defines the type of logs to send for the Apache Airflow log type (e.g. DagProcessingLogs ). Valid values: CloudWatchLogGroupArn , Enabled , LogLevel .

          • CloudWatchLogGroupArn (string) --

            The Amazon Resource Name (ARN) for the CloudWatch Logs group where the Apache Airflow log type (e.g. DagProcessingLogs ) is published. For example, arn:aws:logs:us-east-1:123456789012:log-group:airflow-MyMWAAEnvironment-MwaaEnvironment-DAGProcessing:* .

          • Enabled (boolean) --

            Indicates whether to enable the Apache Airflow log type (e.g. DagProcessingLogs ) in CloudWatch Logs.

          • LogLevel (string) --

            Defines the Apache Airflow logs to send for the log type (e.g. DagProcessingLogs ) to CloudWatch Logs. Valid values: CRITICAL , ERROR , WARNING , INFO .

        • WorkerLogs (dict) --

          Defines the type of logs to send for the Apache Airflow log type (e.g. DagProcessingLogs ). Valid values: CloudWatchLogGroupArn , Enabled , LogLevel .

          • CloudWatchLogGroupArn (string) --

            The Amazon Resource Name (ARN) for the CloudWatch Logs group where the Apache Airflow log type (e.g. DagProcessingLogs ) is published. For example, arn:aws:logs:us-east-1:123456789012:log-group:airflow-MyMWAAEnvironment-MwaaEnvironment-DAGProcessing:* .

          • Enabled (boolean) --

            Indicates whether to enable the Apache Airflow log type (e.g. DagProcessingLogs ) in CloudWatch Logs.

          • LogLevel (string) --

            Defines the Apache Airflow logs to send for the log type (e.g. DagProcessingLogs ) to CloudWatch Logs. Valid values: CRITICAL , ERROR , WARNING , INFO .

      • MaxWorkers (integer) --

        The maximum number of workers that run in your environment. For example, 20 .

      • MinWorkers (integer) --

        The minimum number of workers that run in your environment. For example, 2 .

      • Name (string) --

        The name of the Amazon MWAA environment. For example, MyMWAAEnvironment .

      • NetworkConfiguration (dict) --

        The VPC networking components used to secure and enable network traffic between the AWS resources for your environment. To learn more, see About networking on Amazon MWAA.

        • SecurityGroupIds (list) --

          A list of 1 or more security group IDs. Accepts up to 5 security group IDs. A security group must be attached to the same VPC as the subnets. To learn more, see Security in your VPC on Amazon MWAA.

          • (string) --

        • SubnetIds (list) --

          A list of 2 subnet IDs. Required to create an environment. Must be private subnets in two different availability zones. A subnet must be attached to the same VPC as the security group.

          • (string) --

      • PluginsS3ObjectVersion (string) --

        The version of the plugins.zip file on your Amazon S3 bucket. To learn more, see Installing custom plugins.

      • PluginsS3Path (string) --

        The relative path to the plugins.zip file on your Amazon S3 bucket. For example, plugins.zip . To learn more, see Installing custom plugins.

      • RequirementsS3ObjectVersion (string) --

        The version of the requirements.txt file on your Amazon S3 bucket. To learn more, see Installing Python dependencies.

      • RequirementsS3Path (string) --

        The relative path to the requirements.txt file on your Amazon S3 bucket. For example, requirements.txt . To learn more, see Installing Python dependencies.

      • Schedulers (integer) --

        The number of Apache Airflow schedulers that run in your Amazon MWAA environment.

      • ServiceRoleArn (string) --

        The Amazon Resource Name (ARN) for the service-linked role of the environment. To learn more, see Amazon MWAA Service-linked role.

      • SourceBucketArn (string) --

        The Amazon Resource Name (ARN) of the Amazon S3 bucket where your DAG code and supporting files are stored. For example, arn:aws:s3:::my-airflow-bucket-unique-name . To learn more, see Create an Amazon S3 bucket for Amazon MWAA.

      • Status (string) --

        The status of the Amazon MWAA environment. Valid values:

        • CREATING - Indicates the request to create the environment is in progress.

        • CREATE_FAILED - Indicates the request to create the environment failed, and the environment could not be created.

        • AVAILABLE - Indicates the request was successful and the environment is ready to use.

        • UPDATING - Indicates the request to update the environment is in progress.

        • DELETING - Indicates the request to delete the environment is in progress.

        • DELETED - Indicates the request to delete the environment is complete, and the environment has been deleted.

        • UNAVAILABLE - Indicates the request failed, but the environment was unable to rollback and is not in a stable state.

        • UPDATE_FAILED - Indicates the request to update the environment failed, and the environment has rolled back successfully and is ready to use.

        We recommend reviewing our troubleshooting guide for a list of common errors and their solutions. To learn more, see Amazon MWAA troubleshooting.

      • Tags (dict) --

        The key-value tag pairs associated to your environment. For example, "Environment": "Staging" . To learn more, see Tagging AWS resources.

        • (string) --

          • (string) --

      • WebserverAccessMode (string) --

        The Apache Airflow Web server access mode. To learn more, see Apache Airflow access modes.

      • WebserverUrl (string) --

        The Apache Airflow Web server host name for the Amazon MWAA environment. To learn more, see Accessing the Apache Airflow UI.

      • WeeklyMaintenanceWindowStart (string) --

        The day and time of the week that weekly maintenance updates are scheduled. For example: TUE:03:30 .

UpdateEnvironment (updated) Link ¶
Changes (request)
{'Schedulers': 'integer'}

Updates an Amazon Managed Workflows for Apache Airflow (MWAA) environment.

See also: AWS API Documentation

Request Syntax

client.update_environment(
    AirflowConfigurationOptions={
        'string': 'string'
    },
    AirflowVersion='string',
    DagS3Path='string',
    EnvironmentClass='string',
    ExecutionRoleArn='string',
    LoggingConfiguration={
        'DagProcessingLogs': {
            'Enabled': True|False,
            'LogLevel': 'CRITICAL'|'ERROR'|'WARNING'|'INFO'|'DEBUG'
        },
        'SchedulerLogs': {
            'Enabled': True|False,
            'LogLevel': 'CRITICAL'|'ERROR'|'WARNING'|'INFO'|'DEBUG'
        },
        'TaskLogs': {
            'Enabled': True|False,
            'LogLevel': 'CRITICAL'|'ERROR'|'WARNING'|'INFO'|'DEBUG'
        },
        'WebserverLogs': {
            'Enabled': True|False,
            'LogLevel': 'CRITICAL'|'ERROR'|'WARNING'|'INFO'|'DEBUG'
        },
        'WorkerLogs': {
            'Enabled': True|False,
            'LogLevel': 'CRITICAL'|'ERROR'|'WARNING'|'INFO'|'DEBUG'
        }
    },
    MaxWorkers=123,
    MinWorkers=123,
    Name='string',
    NetworkConfiguration={
        'SecurityGroupIds': [
            'string',
        ]
    },
    PluginsS3ObjectVersion='string',
    PluginsS3Path='string',
    RequirementsS3ObjectVersion='string',
    RequirementsS3Path='string',
    Schedulers=123,
    SourceBucketArn='string',
    WebserverAccessMode='PRIVATE_ONLY'|'PUBLIC_ONLY',
    WeeklyMaintenanceWindowStart='string'
)
type AirflowConfigurationOptions

dict

param AirflowConfigurationOptions

A list of key-value pairs containing the Apache Airflow configuration options you want to attach to your environment. To learn more, see Apache Airflow configuration options.

  • (string) --

    • (string) --

type AirflowVersion

string

param AirflowVersion

The Apache Airflow version for your environment. For example, v1.10.12 . If no value is specified, defaults to the latest version. Valid values: v1.10.12 .

type DagS3Path

string

param DagS3Path

The relative path to the DAGs folder on your Amazon S3 bucket. For example, dags . To learn more, see Adding or updating DAGs.

type EnvironmentClass

string

param EnvironmentClass

The environment class type. Valid values: mw1.small , mw1.medium , mw1.large . To learn more, see Amazon MWAA environment class.

type ExecutionRoleArn

string

param ExecutionRoleArn

The Amazon Resource Name (ARN) of the execution role in IAM that allows MWAA to access AWS resources in your environment. For example, arn:aws:iam::123456789:role/my-execution-role . To learn more, see Amazon MWAA Execution role.

type LoggingConfiguration

dict

param LoggingConfiguration

Defines the Apache Airflow logs to send to CloudWatch Logs: DagProcessingLogs , SchedulerLogs , TaskLogs , WebserverLogs , WorkerLogs .

  • DagProcessingLogs (dict) --

    Defines the type of logs to send for the Apache Airflow log type (e.g. DagProcessingLogs ). Valid values: CloudWatchLogGroupArn , Enabled , LogLevel .

    • Enabled (boolean) -- [REQUIRED]

      Indicates whether to enable the Apache Airflow log type (e.g. DagProcessingLogs ) in CloudWatch Logs.

    • LogLevel (string) -- [REQUIRED]

      Defines the Apache Airflow logs to send for the log type (e.g. DagProcessingLogs ) to CloudWatch Logs. Valid values: CRITICAL , ERROR , WARNING , INFO .

  • SchedulerLogs (dict) --

    Defines the type of logs to send for the Apache Airflow log type (e.g. DagProcessingLogs ). Valid values: CloudWatchLogGroupArn , Enabled , LogLevel .

    • Enabled (boolean) -- [REQUIRED]

      Indicates whether to enable the Apache Airflow log type (e.g. DagProcessingLogs ) in CloudWatch Logs.

    • LogLevel (string) -- [REQUIRED]

      Defines the Apache Airflow logs to send for the log type (e.g. DagProcessingLogs ) to CloudWatch Logs. Valid values: CRITICAL , ERROR , WARNING , INFO .

  • TaskLogs (dict) --

    Defines the type of logs to send for the Apache Airflow log type (e.g. DagProcessingLogs ). Valid values: CloudWatchLogGroupArn , Enabled , LogLevel .

    • Enabled (boolean) -- [REQUIRED]

      Indicates whether to enable the Apache Airflow log type (e.g. DagProcessingLogs ) in CloudWatch Logs.

    • LogLevel (string) -- [REQUIRED]

      Defines the Apache Airflow logs to send for the log type (e.g. DagProcessingLogs ) to CloudWatch Logs. Valid values: CRITICAL , ERROR , WARNING , INFO .

  • WebserverLogs (dict) --

    Defines the type of logs to send for the Apache Airflow log type (e.g. DagProcessingLogs ). Valid values: CloudWatchLogGroupArn , Enabled , LogLevel .

    • Enabled (boolean) -- [REQUIRED]

      Indicates whether to enable the Apache Airflow log type (e.g. DagProcessingLogs ) in CloudWatch Logs.

    • LogLevel (string) -- [REQUIRED]

      Defines the Apache Airflow logs to send for the log type (e.g. DagProcessingLogs ) to CloudWatch Logs. Valid values: CRITICAL , ERROR , WARNING , INFO .

  • WorkerLogs (dict) --

    Defines the type of logs to send for the Apache Airflow log type (e.g. DagProcessingLogs ). Valid values: CloudWatchLogGroupArn , Enabled , LogLevel .

    • Enabled (boolean) -- [REQUIRED]

      Indicates whether to enable the Apache Airflow log type (e.g. DagProcessingLogs ) in CloudWatch Logs.

    • LogLevel (string) -- [REQUIRED]

      Defines the Apache Airflow logs to send for the log type (e.g. DagProcessingLogs ) to CloudWatch Logs. Valid values: CRITICAL , ERROR , WARNING , INFO .

type MaxWorkers

integer

param MaxWorkers

The maximum number of workers that you want to run in your environment. MWAA scales the number of Apache Airflow workers up to the number you specify in the MaxWorkers field. For example, 20 . When there are no more tasks running, and no more in the queue, MWAA disposes of the extra workers leaving the one worker that is included with your environment, or the number you specify in MinWorkers .

type MinWorkers

integer

param MinWorkers

The minimum number of workers that you want to run in your environment. MWAA scales the number of Apache Airflow workers up to the number you specify in the MaxWorkers field. When there are no more tasks running, and no more in the queue, MWAA disposes of the extra workers leaving the worker count you specify in the MinWorkers field. For example, 2 .

type Name

string

param Name

[REQUIRED]

The name of your Amazon MWAA environment. For example, MyMWAAEnvironment .

type NetworkConfiguration

dict

param NetworkConfiguration

The VPC networking components used to secure and enable network traffic between the AWS resources for your environment. To learn more, see About networking on Amazon MWAA.

  • SecurityGroupIds (list) -- [REQUIRED]

    A list of 1 or more security group IDs. Accepts up to 5 security group IDs. A security group must be attached to the same VPC as the subnets. To learn more, see Security in your VPC on Amazon MWAA.

    • (string) --

type PluginsS3ObjectVersion

string

param PluginsS3ObjectVersion

The version of the plugins.zip file on your Amazon S3 bucket. A version must be specified each time a plugins.zip file is updated. To learn more, see How S3 Versioning works.

type PluginsS3Path

string

param PluginsS3Path

The relative path to the plugins.zip file on your Amazon S3 bucket. For example, plugins.zip . If specified, then the plugins.zip version is required. To learn more, see Installing custom plugins.

type RequirementsS3ObjectVersion

string

param RequirementsS3ObjectVersion

The version of the requirements.txt file on your Amazon S3 bucket. A version must be specified each time a requirements.txt file is updated. To learn more, see How S3 Versioning works.

type RequirementsS3Path

string

param RequirementsS3Path

The relative path to the requirements.txt file on your Amazon S3 bucket. For example, requirements.txt . If specified, then a file version is required. To learn more, see Installing Python dependencies.

type Schedulers

integer

param Schedulers

The number of Apache Airflow schedulers to run in your Amazon MWAA environment.

type SourceBucketArn

string

param SourceBucketArn

The Amazon Resource Name (ARN) of the Amazon S3 bucket where your DAG code and supporting files are stored. For example, arn:aws:s3:::my-airflow-bucket-unique-name . To learn more, see Create an Amazon S3 bucket for Amazon MWAA.

type WebserverAccessMode

string

param WebserverAccessMode

The Apache Airflow Web server access mode. To learn more, see Apache Airflow access modes.

type WeeklyMaintenanceWindowStart

string

param WeeklyMaintenanceWindowStart

The day and time of the week to start weekly maintenance updates of your environment in the following format: DAY:HH:MM . For example: TUE:03:30 . You can specify a start time in 30 minute increments only. Supported input includes the following:

  • MON|TUE|WED|THU|FRI|SAT|SUN:([01]\d|2[0-3]):(00|30)

rtype

dict

returns

Response Syntax

{
    'Arn': 'string'
}

Response Structure

  • (dict) --

    • Arn (string) --

      The Amazon Resource Name (ARN) of the Amazon MWAA environment. For example, arn:aws:airflow:us-east-1:123456789012:environment/MyMWAAEnvironment .