Environment - Amazon Managed Workflows for Apache Airflow
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Environment

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

Contents

AirflowConfigurationOptions

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

Type: String to string map

Key Length Constraints: Minimum length of 1. Maximum length of 64.

Key Pattern: [a-z]+([a-z0-9._]*[a-z0-9_]+)?

Value Length Constraints: Minimum length of 1. Maximum length of 65536.

Value Pattern: [ -~]+

Required: No

AirflowVersion

The Apache Airflow version on your environment.

Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, and 2.9.2.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 32.

Pattern: [0-9a-z.]+

Required: No

Arn

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

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:aws(-[a-z]+)?:airflow:[a-z0-9\-]+:\d{12}:environment/\w+.*

Required: No

CeleryExecutorQueue

The queue ARN for the environment's Celery Executor. Amazon MWAA uses a Celery Executor to distribute tasks across multiple workers. When you create an environment in a shared VPC, you must provide access to the Celery Executor queue from your VPC.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:aws(-[a-z]+)?:sqs:[a-z0-9\-]+:\d{12}:[a-zA-Z_0-9+=,.@\-_/]+

Required: No

CreatedAt

The day and time the environment was created.

Type: Timestamp

Required: No

DagS3Path

The relative path to the DAGs folder in your Amazon S3 bucket. For example, s3://mwaa-environment/dags. For more information, see Adding or updating DAGs.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1024.

Pattern: .*

Required: No

DatabaseVpcEndpointService

The VPC endpoint for the environment's Amazon RDS database.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: ([a-z.-]+)?com\.amazonaws\.vpce\.[a-z0-9\-]+\.[a-zA-Z_0-9+=,.@\-_/]+

Required: No

EndpointManagement

Defines whether the VPC endpoints configured for the environment are created, and managed, by the customer or by Amazon MWAA. If set to SERVICE, Amazon MWAA will create and manage the required VPC endpoints in your VPC. If set to CUSTOMER, you must create, and manage, the VPC endpoints in your VPC.

Type: String

Valid Values: CUSTOMER | SERVICE

Required: No

EnvironmentClass

The environment class type. Valid values: mw1.small, mw1.medium, mw1.large, mw1.xlarge, and mw1.2xlarge. For more information, see Amazon MWAA environment class.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1024.

Required: No

ExecutionRoleArn

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

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:aws(-[a-z]+)?:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@\-_/]+

Required: No

KmsKey

The Amazon KMS encryption key used to encrypt the data in your environment.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: (((arn:aws(-[a-z]+)?:kms:[a-z]{2}-[a-z]+-\d:\d+:)?key\/)?[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|(arn:aws(-[a-z]+)?:kms:[a-z]{2}-[a-z]+-\d:\d+:)?alias/.+)

Required: No

LastUpdate

The status of the last update on the environment.

Type: LastUpdate object

Required: No

LoggingConfiguration

The Apache Airflow logs published to CloudWatch Logs.

Type: LoggingConfiguration object

Required: No

MaxWebservers

The maximum number of web servers that you want to run in your environment. Amazon MWAA scales the number of Apache Airflow web servers up to the number you specify for MaxWebservers when you interact with your Apache Airflow environment using Apache Airflow REST API, or the Apache Airflow CLI. For example, in scenarios where your workload requires network calls to the Apache Airflow REST API with a high transaction-per-second (TPS) rate, Amazon MWAA will increase the number of web servers up to the number set in MaxWebserers. As TPS rates decrease Amazon MWAA disposes of the additional web servers, and scales down to the number set in MinxWebserers.

Valid values: Accepts between 2 and 5. Defaults to 2.

Type: Integer

Valid Range: Minimum value of 2.

Required: No

MaxWorkers

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

Type: Integer

Valid Range: Minimum value of 1.

Required: No

MinWebservers

The minimum number of web servers that you want to run in your environment. Amazon MWAA scales the number of Apache Airflow web servers up to the number you specify for MaxWebservers when you interact with your Apache Airflow environment using Apache Airflow REST API, or the Apache Airflow CLI. As the transaction-per-second rate, and the network load, decrease, Amazon MWAA disposes of the additional web servers, and scales down to the number set in MinxWebserers.

Valid values: Accepts between 2 and 5. Defaults to 2.

Type: Integer

Valid Range: Minimum value of 2.

Required: No

MinWorkers

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

Type: Integer

Valid Range: Minimum value of 1.

Required: No

Name

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

Type: String

Length Constraints: Minimum length of 1. Maximum length of 80.

Pattern: [a-zA-Z][0-9a-zA-Z-_]*

Required: No

NetworkConfiguration

Describes the VPC networking components used to secure and enable network traffic between the Amazon resources for your environment. For more information, see About networking on Amazon MWAA.

Type: NetworkConfiguration object

Required: No

PluginsS3ObjectVersion

The version of the plugins.zip file in your Amazon S3 bucket. You must specify the version ID that Amazon S3 assigns to the file.

Version IDs are Unicode, UTF-8 encoded, URL-ready, opaque strings that are no more than 1,024 bytes long. The following is an example:

3sL4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo

For more information, see Installing custom plugins.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1024.

Required: No

PluginsS3Path

The relative path to the file in your Amazon S3 bucket. For example, s3://mwaa-environment/plugins.zip. For more information, see Installing custom plugins.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1024.

Pattern: .*

Required: No

RequirementsS3ObjectVersion

The version of the requirements.txt file on your Amazon S3 bucket. You must specify the version ID that Amazon S3 assigns to the file.

Version IDs are Unicode, UTF-8 encoded, URL-ready, opaque strings that are no more than 1,024 bytes long. The following is an example:

3sL4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo

For more information, see Installing Python dependencies.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1024.

Required: No

RequirementsS3Path

The relative path to the requirements.txt file in your Amazon S3 bucket. For example, s3://mwaa-environment/requirements.txt. For more information, see Installing Python dependencies.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1024.

Pattern: .*

Required: No

Schedulers

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

Type: Integer

Valid Range: Maximum value of 5.

Required: No

ServiceRoleArn

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

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:aws(-[a-z]+)?:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@\-_/]+

Required: No

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. For more information, see Create an Amazon S3 bucket for Amazon MWAA.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:aws(-[a-z]+)?:s3:::[a-z0-9.\-]+

Required: No

StartupScriptS3ObjectVersion

The version of the startup shell script in your Amazon S3 bucket. You must specify the version ID that Amazon S3 assigns to the file.

Version IDs are Unicode, UTF-8 encoded, URL-ready, opaque strings that are no more than 1,024 bytes long. The following is an example:

3sL4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo

For more information, see Using a startup script.

Type: String

Required: No

StartupScriptS3Path

The relative path to the startup shell script in your Amazon S3 bucket. For example, s3://mwaa-environment/startup.sh.

Amazon MWAA runs the script as your environment starts, and before running the Apache Airflow process. You can use this script to install dependencies, modify Apache Airflow configuration options, and set environment variables. For more information, see Using a startup script.

Type: String

Required: No

Status

The status of the Amazon MWAA environment.

Valid values:

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

  • CREATING_SNAPSHOT - Indicates the request to update environment details, or upgrade the environment version, is in progress and Amazon MWAA is creating a storage volume snapshot of the Amazon RDS database cluster associated with the environment. A database snapshot is a backup created at a specific point in time. Amazon MWAA uses snapshots to recover environment metadata if the process to update or upgrade an environment fails.

  • 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.

  • PENDING - Indicates the request was successful, but the process to create the environment is paused until you create the required VPC endpoints in your VPC. After you create the VPC endpoints, the process resumes.

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

  • ROLLING_BACK - Indicates the request to update environment details, or upgrade the environment version, failed and Amazon MWAA is restoring the environment using the latest storage volume snapshot.

  • 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 did not return to its previous state and is not stable.

  • UPDATE_FAILED - Indicates the request to update the environment failed, and the environment was restored to its previous state successfully and is ready to use.

  • MAINTENANCE - Indicates that the environment is undergoing maintenance. Depending on the type of work Amazon MWAA is performing, your environment might become unavailable during this process. After all operations are done, your environment will return to its status prior to mainteneace operations.

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

Type: String

Valid Values: CREATING | CREATE_FAILED | AVAILABLE | UPDATING | DELETING | DELETED | UNAVAILABLE | UPDATE_FAILED | ROLLING_BACK | CREATING_SNAPSHOT | PENDING | MAINTENANCE

Required: No

Tags

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

Type: String to string map

Map Entries: Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: ([\p{L}\p{Z}\p{N}_.:/=+\-@]*)

Value Length Constraints: Minimum length of 1. Maximum length of 256.

Value Pattern: ([\p{L}\p{Z}\p{N}_.:/=+\-@]*)

Required: No

WebserverAccessMode

The Apache Airflow web server access mode. For more information, see Apache Airflow access modes.

Type: String

Valid Values: PRIVATE_ONLY | PUBLIC_ONLY

Required: No

WebserverUrl

The Apache Airflow web server host name for the Amazon MWAA environment. For more information, see Accessing the Apache Airflow UI.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 256.

Pattern: https://.+

Required: No

WebserverVpcEndpointService

The VPC endpoint for the environment's web server.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: ([a-z.-]+)?com\.amazonaws\.vpce\.[a-z0-9\-]+\.[a-zA-Z_0-9+=,.@\-_/]+

Required: No

WeeklyMaintenanceWindowStart

The day and time of the week in Coordinated Universal Time (UTC) 24-hour standard time that weekly maintenance updates are scheduled. For example: TUE:03:30.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 9.

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

Required: No

See Also

For more information about using this API in one of the language-specific Amazon SDKs, see the following: