We announced the upcoming end-of-support for AWS SDK for JavaScript v2.
We recommend that you migrate to AWS SDK for JavaScript v3. For dates, additional details, and information on how to migrate, please refer to the linked announcement.

Class: AWS.MWAA

Inherits:
AWS.Service show all
Identifier:
mwaa
API Version:
2020-07-01
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

This section contains the Amazon Managed Workflows for Apache Airflow (MWAA) API reference documentation. For more information, see What is Amazon MWAA?.

Endpoints

Regions

For a list of supported regions, see Amazon MWAA endpoints and quotas in the Amazon Web Services General Reference.

Sending a Request Using MWAA

var mwaa = new AWS.MWAA();
mwaa.createCliToken(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the MWAA object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var mwaa = new AWS.MWAA({apiVersion: '2020-07-01'});

You can also set the API version globally in AWS.config.apiVersions using the mwaa service identifier:

AWS.config.apiVersions = {
  mwaa: '2020-07-01',
  // other service API versions
};

var mwaa = new AWS.MWAA();

Version:

  • 2020-07-01

Constructor Summary collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService

Constructor Details

new AWS.MWAA(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a MWAA object

var mwaa = new AWS.MWAA({apiVersion: '2020-07-01'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String|AWS.Endpoint)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com' or an Endpoint object.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.MWAA.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.MWAA.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.MWAA.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • s3UsEast1RegionalEndpoint ('legacy'|'regional')

    when region is set to 'us-east-1', whether to send s3 request to global endpoints or 'us-east-1' regional endpoints. This config is only applicable to S3 client. Defaults to legacy

  • s3UseArnRegion (Boolean)

    whether to override the request region with the region inferred from requested resource's ARN. Only available for S3 buckets Defaults to true

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and error and returns the amount of time to delay in milliseconds. If the result is a non-zero negative value, no further retry attempts will be made. The base option will be ignored if this option is supplied. The function is only called for retryable errors.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean|undefined)

    whether to call operations with endpoints given by service dynamically. Setting this

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to true.

  • stsRegionalEndpoints ('legacy'|'regional')

    whether to send sts request to global endpoints or regional endpoints. Defaults to 'legacy'.

  • useFipsEndpoint (Boolean)

    Enables FIPS compatible endpoints. Defaults to false.

  • useDualstackEndpoint (Boolean)

    Enables IPv6 dualstack endpoint. Defaults to false.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

createCliToken(params = {}, callback) ⇒ AWS.Request

Creates a CLI token for the Airflow CLI. To learn more, see Creating an Apache Airflow CLI token.

Service Reference:

Examples:

Calling the createCliToken operation

var params = {
  Name: 'STRING_VALUE' /* required */
};
mwaa.createCliToken(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • CliToken — (String)

        An Airflow CLI login token.

      • WebServerHostname — (String)

        The Airflow web server hostname for the environment.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createEnvironment(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the createEnvironment operation

var params = {
  DagS3Path: 'STRING_VALUE', /* required */
  ExecutionRoleArn: 'STRING_VALUE', /* required */
  Name: 'STRING_VALUE', /* required */
  NetworkConfiguration: { /* required */
    SecurityGroupIds: [
      'STRING_VALUE',
      /* more items */
    ],
    SubnetIds: [
      'STRING_VALUE',
      /* more items */
    ]
  },
  SourceBucketArn: 'STRING_VALUE', /* required */
  AirflowConfigurationOptions: {
    '<ConfigKey>': 'STRING_VALUE',
    /* '<ConfigKey>': ... */
  },
  AirflowVersion: 'STRING_VALUE',
  EndpointManagement: CUSTOMER | SERVICE,
  EnvironmentClass: 'STRING_VALUE',
  KmsKey: 'STRING_VALUE',
  LoggingConfiguration: {
    DagProcessingLogs: {
      Enabled: true || false, /* required */
      LogLevel: CRITICAL | ERROR | WARNING | INFO | DEBUG /* required */
    },
    SchedulerLogs: {
      Enabled: true || false, /* required */
      LogLevel: CRITICAL | ERROR | WARNING | INFO | DEBUG /* required */
    },
    TaskLogs: {
      Enabled: true || false, /* required */
      LogLevel: CRITICAL | ERROR | WARNING | INFO | DEBUG /* required */
    },
    WebserverLogs: {
      Enabled: true || false, /* required */
      LogLevel: CRITICAL | ERROR | WARNING | INFO | DEBUG /* required */
    },
    WorkerLogs: {
      Enabled: true || false, /* required */
      LogLevel: CRITICAL | ERROR | WARNING | INFO | DEBUG /* required */
    }
  },
  MaxWebservers: 'NUMBER_VALUE',
  MaxWorkers: 'NUMBER_VALUE',
  MinWebservers: 'NUMBER_VALUE',
  MinWorkers: 'NUMBER_VALUE',
  PluginsS3ObjectVersion: 'STRING_VALUE',
  PluginsS3Path: 'STRING_VALUE',
  RequirementsS3ObjectVersion: 'STRING_VALUE',
  RequirementsS3Path: 'STRING_VALUE',
  Schedulers: 'NUMBER_VALUE',
  StartupScriptS3ObjectVersion: 'STRING_VALUE',
  StartupScriptS3Path: 'STRING_VALUE',
  Tags: {
    '<TagKey>': 'STRING_VALUE',
    /* '<TagKey>': ... */
  },
  WebserverAccessMode: PRIVATE_ONLY | PUBLIC_ONLY,
  WeeklyMaintenanceWindowStart: 'STRING_VALUE'
};
mwaa.createEnvironment(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

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

    • ExecutionRoleArn — (String)

      The Amazon Resource Name (ARN) of the execution role for your environment. An execution role is an Amazon Web Services Identity and Access Management (IAM) role that grants MWAA permission to access Amazon Web Services services and resources used by your environment. For example, arn:aws:iam::123456789:role/my-execution-role. For more information, see Amazon MWAA Execution 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. For more information, see Create an Amazon S3 bucket for Amazon MWAA.

    • DagS3Path — (String)

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

    • NetworkConfiguration — (map)

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

    • PluginsS3Path — (String)

      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. For more information, see Installing custom plugins.

    • PluginsS3ObjectVersion — (String)

      The version of the plugins.zip file on your Amazon S3 bucket. You must specify a version each time a plugins.zip file is updated. For more information, see How S3 Versioning works.

    • RequirementsS3Path — (String)

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

    • RequirementsS3ObjectVersion — (String)

      The version of the requirements.txt file on your Amazon S3 bucket. You must specify a version each time a requirements.txt file is updated. For more information, see How S3 Versioning works.

    • StartupScriptS3Path — (String)

      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.

    • StartupScriptS3ObjectVersion — (String)

      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 every time you update the script.

      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.

    • AirflowConfigurationOptions — (map<String>)

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

    • EnvironmentClass — (String)

      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.

    • MaxWorkers — (Integer)

      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.

    • KmsKey — (String)

      The Amazon Web Services Key Management Service (KMS) key to encrypt the data in your environment. You can use an Amazon Web Services owned CMK, or a Customer managed CMK (advanced). For more information, see Create an Amazon MWAA environment.

    • AirflowVersion — (String)

      The Apache Airflow version for your environment. If no value is specified, it defaults to the latest version. For more information, see Apache Airflow versions on Amazon Managed Workflows for Apache Airflow (MWAA).

      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

    • LoggingConfiguration — (map)

      Defines the Apache Airflow logs to send to CloudWatch Logs.

      • DagProcessingLogs — (map)

        Publishes Airflow DAG processing logs to CloudWatch Logs.

        • Enabledrequired — (Boolean)

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

        • LogLevelrequired — (String)

          Defines the Apache Airflow log level (e.g. INFO) to send to CloudWatch Logs.

          Possible values include:
          • "CRITICAL"
          • "ERROR"
          • "WARNING"
          • "INFO"
          • "DEBUG"
      • SchedulerLogs — (map)

        Publishes Airflow scheduler logs to CloudWatch Logs.

        • Enabledrequired — (Boolean)

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

        • LogLevelrequired — (String)

          Defines the Apache Airflow log level (e.g. INFO) to send to CloudWatch Logs.

          Possible values include:
          • "CRITICAL"
          • "ERROR"
          • "WARNING"
          • "INFO"
          • "DEBUG"
      • WebserverLogs — (map)

        Publishes Airflow web server logs to CloudWatch Logs.

        • Enabledrequired — (Boolean)

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

        • LogLevelrequired — (String)

          Defines the Apache Airflow log level (e.g. INFO) to send to CloudWatch Logs.

          Possible values include:
          • "CRITICAL"
          • "ERROR"
          • "WARNING"
          • "INFO"
          • "DEBUG"
      • WorkerLogs — (map)

        Publishes Airflow worker logs to CloudWatch Logs.

        • Enabledrequired — (Boolean)

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

        • LogLevelrequired — (String)

          Defines the Apache Airflow log level (e.g. INFO) to send to CloudWatch Logs.

          Possible values include:
          • "CRITICAL"
          • "ERROR"
          • "WARNING"
          • "INFO"
          • "DEBUG"
      • TaskLogs — (map)

        Publishes Airflow task logs to CloudWatch Logs.

        • Enabledrequired — (Boolean)

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

        • LogLevelrequired — (String)

          Defines the Apache Airflow log level (e.g. INFO) to send to CloudWatch Logs.

          Possible values include:
          • "CRITICAL"
          • "ERROR"
          • "WARNING"
          • "INFO"
          • "DEBUG"
    • WeeklyMaintenanceWindowStart — (String)

      The day and time of the week in Coordinated Universal Time (UTC) 24-hour standard time 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.

    • Tags — (map<String>)

      The key-value tag pairs you want to associate to your environment. For example, "Environment": "Staging". For more information, see Tagging Amazon Web Services resources.

    • WebserverAccessMode — (String)

      Defines the access mode for the Apache Airflow web server. For more information, see Apache Airflow access modes.

      Possible values include:
      • "PRIVATE_ONLY"
      • "PUBLIC_ONLY"
    • MinWorkers — (Integer)

      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.

    • Schedulers — (Integer)

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

      • v2 - Accepts between 2 to 5. Defaults to 2.

      • v1 - Accepts 1.

    • EndpointManagement — (String)

      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 for your VPC. If you choose to create an environment in a shared VPC, you must set this value to CUSTOMER. In a shared VPC deployment, the environment will remain in PENDING status until you create the VPC endpoints. If you do not take action to create the endpoints within 72 hours, the status will change to CREATE_FAILED. You can delete the failed environment and create a new one.

      Possible values include:
      • "CUSTOMER"
      • "SERVICE"
    • MinWebservers — (Integer)

      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.

    • MaxWebservers — (Integer)

      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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Arn — (String)

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

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createWebLoginToken(params = {}, callback) ⇒ AWS.Request

Creates a web login token for the Airflow Web UI. To learn more, see Creating an Apache Airflow web login token.

Service Reference:

Examples:

Calling the createWebLoginToken operation

var params = {
  Name: 'STRING_VALUE' /* required */
};
mwaa.createWebLoginToken(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • WebToken — (String)

        An Airflow web server login token.

      • WebServerHostname — (String)

        The Airflow web server hostname for the environment.

      • IamIdentity — (String)

        The name of the IAM identity creating the web login token. This might be an IAM user, or an assumed or federated identity. For example, assumed-role/Admin/your-name.

      • AirflowIdentity — (String)

        The user name of the Apache Airflow identity creating the web login token.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteEnvironment(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the deleteEnvironment operation

var params = {
  Name: 'STRING_VALUE' /* required */
};
mwaa.deleteEnvironment(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getEnvironment(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the getEnvironment operation

var params = {
  Name: 'STRING_VALUE' /* required */
};
mwaa.getEnvironment(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Environment — (map)

        An object containing all available details about the environment.

        • Name — (String)

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

        • Status — (String)

          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.

          Possible values include:
          • "CREATING"
          • "CREATE_FAILED"
          • "AVAILABLE"
          • "UPDATING"
          • "DELETING"
          • "DELETED"
          • "UNAVAILABLE"
          • "UPDATE_FAILED"
          • "ROLLING_BACK"
          • "CREATING_SNAPSHOT"
          • "PENDING"
          • "MAINTENANCE"
        • Arn — (String)

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

        • CreatedAt — (Date)

          The day and time the environment was created.

        • WebserverUrl — (String)

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

        • ExecutionRoleArn — (String)

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

        • ServiceRoleArn — (String)

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

        • KmsKey — (String)

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

        • AirflowVersion — (String)

          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.

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

        • DagS3Path — (String)

          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.

        • PluginsS3Path — (String)

          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.

        • PluginsS3ObjectVersion — (String)

          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.

        • RequirementsS3Path — (String)

          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.

        • RequirementsS3ObjectVersion — (String)

          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.

        • StartupScriptS3Path — (String)

          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.

        • StartupScriptS3ObjectVersion — (String)

          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.

        • AirflowConfigurationOptions — (map<String>)

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

        • EnvironmentClass — (String)

          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.

        • MaxWorkers — (Integer)

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

        • NetworkConfiguration — (map)

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

        • LoggingConfiguration — (map)

          The Apache Airflow logs published to CloudWatch Logs.

          • DagProcessingLogs — (map)

            The Airflow DAG processing logs published to CloudWatch Logs and the log level.

            • Enabled — (Boolean)

              Indicates whether the Apache Airflow log type (e.g. DagProcessingLogs) is enabled.

            • LogLevel — (String)

              The Apache Airflow log level for the log type (e.g. DagProcessingLogs).

              Possible values include:
              • "CRITICAL"
              • "ERROR"
              • "WARNING"
              • "INFO"
              • "DEBUG"
            • 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:*.

          • SchedulerLogs — (map)

            The Airflow scheduler logs published to CloudWatch Logs and the log level.

            • Enabled — (Boolean)

              Indicates whether the Apache Airflow log type (e.g. DagProcessingLogs) is enabled.

            • LogLevel — (String)

              The Apache Airflow log level for the log type (e.g. DagProcessingLogs).

              Possible values include:
              • "CRITICAL"
              • "ERROR"
              • "WARNING"
              • "INFO"
              • "DEBUG"
            • 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:*.

          • WebserverLogs — (map)

            The Airflow web server logs published to CloudWatch Logs and the log level.

            • Enabled — (Boolean)

              Indicates whether the Apache Airflow log type (e.g. DagProcessingLogs) is enabled.

            • LogLevel — (String)

              The Apache Airflow log level for the log type (e.g. DagProcessingLogs).

              Possible values include:
              • "CRITICAL"
              • "ERROR"
              • "WARNING"
              • "INFO"
              • "DEBUG"
            • 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:*.

          • WorkerLogs — (map)

            The Airflow worker logs published to CloudWatch Logs and the log level.

            • Enabled — (Boolean)

              Indicates whether the Apache Airflow log type (e.g. DagProcessingLogs) is enabled.

            • LogLevel — (String)

              The Apache Airflow log level for the log type (e.g. DagProcessingLogs).

              Possible values include:
              • "CRITICAL"
              • "ERROR"
              • "WARNING"
              • "INFO"
              • "DEBUG"
            • 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:*.

          • TaskLogs — (map)

            The Airflow task logs published to CloudWatch Logs and the log level.

            • Enabled — (Boolean)

              Indicates whether the Apache Airflow log type (e.g. DagProcessingLogs) is enabled.

            • LogLevel — (String)

              The Apache Airflow log level for the log type (e.g. DagProcessingLogs).

              Possible values include:
              • "CRITICAL"
              • "ERROR"
              • "WARNING"
              • "INFO"
              • "DEBUG"
            • 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:*.

        • LastUpdate — (map)

          The status of the last update on the environment.

          • Status — (String)

            The status of the last update on the environment.

            Possible values include:
            • "SUCCESS"
            • "PENDING"
            • "FAILED"
          • CreatedAt — (Date)

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

          • Error — (map)

            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.

          • Source — (String)

            The source of the last update to the environment. Includes internal processes by Amazon MWAA, such as an environment maintenance update.

        • WeeklyMaintenanceWindowStart — (String)

          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.

        • Tags — (map<String>)

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

        • WebserverAccessMode — (String)

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

          Possible values include:
          • "PRIVATE_ONLY"
          • "PUBLIC_ONLY"
        • MinWorkers — (Integer)

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

        • Schedulers — (Integer)

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

        • WebserverVpcEndpointService — (String)

          The VPC endpoint for the environment's web server.

        • DatabaseVpcEndpointService — (String)

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

        • CeleryExecutorQueue — (String)

          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.

        • EndpointManagement — (String)

          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.

          Possible values include:
          • "CUSTOMER"
          • "SERVICE"
        • MinWebservers — (Integer)

          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.

        • MaxWebservers — (Integer)

          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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listEnvironments(params = {}, callback) ⇒ AWS.Request

Lists the Amazon Managed Workflows for Apache Airflow (MWAA) environments.

Service Reference:

Examples:

Calling the listEnvironments operation

var params = {
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
mwaa.listEnvironments(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • NextToken — (String)

      Retrieves the next page of the results.

    • MaxResults — (Integer)

      The maximum number of results to retrieve per page. For example, 5 environments per page.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Environments — (Array<String>)

        Returns a list of Amazon MWAA environments.

      • NextToken — (String)

        Retrieves the next page of the results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listTagsForResource(params = {}, callback) ⇒ AWS.Request

Lists the key-value tag pairs associated to the Amazon Managed Workflows for Apache Airflow (MWAA) environment. For example, "Environment": "Staging".

Service Reference:

Examples:

Calling the listTagsForResource operation

var params = {
  ResourceArn: 'STRING_VALUE' /* required */
};
mwaa.listTagsForResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceArn — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

publishMetrics(params = {}, callback) ⇒ AWS.Request

Internal only. Publishes environment health metrics to Amazon CloudWatch.

Service Reference:

Examples:

Calling the publishMetrics operation

var params = {
  EnvironmentName: 'STRING_VALUE', /* required */
  MetricData: [ /* required */
    {
      MetricName: 'STRING_VALUE', /* required */
      Timestamp: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, /* required */
      Dimensions: [
        {
          Name: 'STRING_VALUE', /* required */
          Value: 'STRING_VALUE' /* required */
        },
        /* more items */
      ],
      StatisticValues: {
        Maximum: 'NUMBER_VALUE',
        Minimum: 'NUMBER_VALUE',
        SampleCount: 'NUMBER_VALUE',
        Sum: 'NUMBER_VALUE'
      },
      Unit: Seconds | Microseconds | Milliseconds | Bytes | Kilobytes | Megabytes | Gigabytes | Terabytes | Bits | Kilobits | Megabits | Gigabits | Terabits | Percent | Count | Bytes/Second | Kilobytes/Second | Megabytes/Second | Gigabytes/Second | Terabytes/Second | Bits/Second | Kilobits/Second | Megabits/Second | Gigabits/Second | Terabits/Second | Count/Second | None,
      Value: 'NUMBER_VALUE'
    },
    /* more items */
  ]
};
mwaa.publishMetrics(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • EnvironmentName — (String)

      Internal only. The name of the environment.

    • MetricData — (Array<map>)

      Internal only. Publishes metrics to Amazon CloudWatch. To learn more about the metrics published to Amazon CloudWatch, see Amazon MWAA performance metrics in Amazon CloudWatch.

      • MetricNamerequired — (String)

        Internal only. The name of the metric.

      • Timestamprequired — (Date)

        Internal only. The time the metric data was received.

      • Dimensions — (Array<map>)

        Internal only. The dimensions associated with the metric.

        • Namerequired — (String)

          Internal only. The name of the dimension.

        • Valuerequired — (String)

          Internal only. The value of the dimension.

      • Value — (Float)

        Internal only. The value for the metric.

      • Unit — (String)

        Internal only. The unit used to store the metric.

        Possible values include:
        • "Seconds"
        • "Microseconds"
        • "Milliseconds"
        • "Bytes"
        • "Kilobytes"
        • "Megabytes"
        • "Gigabytes"
        • "Terabytes"
        • "Bits"
        • "Kilobits"
        • "Megabits"
        • "Gigabits"
        • "Terabits"
        • "Percent"
        • "Count"
        • "Bytes/Second"
        • "Kilobytes/Second"
        • "Megabytes/Second"
        • "Gigabytes/Second"
        • "Terabytes/Second"
        • "Bits/Second"
        • "Kilobits/Second"
        • "Megabits/Second"
        • "Gigabits/Second"
        • "Terabits/Second"
        • "Count/Second"
        • "None"
      • StatisticValues — (map)

        Internal only. The statistical values for the metric.

        • SampleCount — (Integer)

          Internal only. The number of samples used for the statistic set.

        • Sum — (Float)

          Internal only. The sum of values for the sample set.

        • Minimum — (Float)

          Internal only. The minimum value of the sample set.

        • Maximum — (Float)

          Internal only. The maximum value of the sample set.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

tagResource(params = {}, callback) ⇒ AWS.Request

Associates key-value tag pairs to your Amazon Managed Workflows for Apache Airflow (MWAA) environment.

Service Reference:

Examples:

Calling the tagResource operation

var params = {
  ResourceArn: 'STRING_VALUE', /* required */
  Tags: { /* required */
    '<TagKey>': 'STRING_VALUE',
    /* '<TagKey>': ... */
  }
};
mwaa.tagResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceArn — (String)

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

    • Tags — (map<String>)

      The key-value tag pairs you want to associate to your environment. For example, "Environment": "Staging". For more information, see Tagging Amazon Web Services resources.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

untagResource(params = {}, callback) ⇒ AWS.Request

Removes key-value tag pairs associated to your Amazon Managed Workflows for Apache Airflow (MWAA) environment. For example, "Environment": "Staging".

Service Reference:

Examples:

Calling the untagResource operation

var params = {
  ResourceArn: 'STRING_VALUE', /* required */
  tagKeys: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
mwaa.untagResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceArn — (String)

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

    • tagKeys — (Array<String>)

      The key-value tag pair you want to remove. For example, "Environment": "Staging".

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateEnvironment(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the updateEnvironment operation

var params = {
  Name: 'STRING_VALUE', /* required */
  AirflowConfigurationOptions: {
    '<ConfigKey>': 'STRING_VALUE',
    /* '<ConfigKey>': ... */
  },
  AirflowVersion: 'STRING_VALUE',
  DagS3Path: 'STRING_VALUE',
  EnvironmentClass: 'STRING_VALUE',
  ExecutionRoleArn: 'STRING_VALUE',
  LoggingConfiguration: {
    DagProcessingLogs: {
      Enabled: true || false, /* required */
      LogLevel: CRITICAL | ERROR | WARNING | INFO | DEBUG /* required */
    },
    SchedulerLogs: {
      Enabled: true || false, /* required */
      LogLevel: CRITICAL | ERROR | WARNING | INFO | DEBUG /* required */
    },
    TaskLogs: {
      Enabled: true || false, /* required */
      LogLevel: CRITICAL | ERROR | WARNING | INFO | DEBUG /* required */
    },
    WebserverLogs: {
      Enabled: true || false, /* required */
      LogLevel: CRITICAL | ERROR | WARNING | INFO | DEBUG /* required */
    },
    WorkerLogs: {
      Enabled: true || false, /* required */
      LogLevel: CRITICAL | ERROR | WARNING | INFO | DEBUG /* required */
    }
  },
  MaxWebservers: 'NUMBER_VALUE',
  MaxWorkers: 'NUMBER_VALUE',
  MinWebservers: 'NUMBER_VALUE',
  MinWorkers: 'NUMBER_VALUE',
  NetworkConfiguration: {
    SecurityGroupIds: [ /* required */
      'STRING_VALUE',
      /* more items */
    ]
  },
  PluginsS3ObjectVersion: 'STRING_VALUE',
  PluginsS3Path: 'STRING_VALUE',
  RequirementsS3ObjectVersion: 'STRING_VALUE',
  RequirementsS3Path: 'STRING_VALUE',
  Schedulers: 'NUMBER_VALUE',
  SourceBucketArn: 'STRING_VALUE',
  StartupScriptS3ObjectVersion: 'STRING_VALUE',
  StartupScriptS3Path: 'STRING_VALUE',
  WebserverAccessMode: PRIVATE_ONLY | PUBLIC_ONLY,
  WeeklyMaintenanceWindowStart: 'STRING_VALUE'
};
mwaa.updateEnvironment(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

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

    • ExecutionRoleArn — (String)

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

    • AirflowVersion — (String)

      The Apache Airflow version for your environment. To upgrade your environment, specify a newer version of Apache Airflow supported by Amazon MWAA.

      Before you upgrade an environment, make sure your requirements, DAGs, plugins, and other resources used in your workflows are compatible with the new Apache Airflow version. For more information about updating your resources, see Upgrading an Amazon MWAA 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.

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

    • DagS3Path — (String)

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

    • PluginsS3Path — (String)

      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. For more information, see Installing custom plugins.

    • PluginsS3ObjectVersion — (String)

      The version of the plugins.zip file on your Amazon S3 bucket. You must specify a version each time a plugins.zip file is updated. For more information, see How S3 Versioning works.

    • RequirementsS3Path — (String)

      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. For more information, see Installing Python dependencies.

    • RequirementsS3ObjectVersion — (String)

      The version of the requirements.txt file on your Amazon S3 bucket. You must specify a version each time a requirements.txt file is updated. For more information, see How S3 Versioning works.

    • StartupScriptS3Path — (String)

      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.

    • StartupScriptS3ObjectVersion — (String)

      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 every time you update the script.

      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.

    • AirflowConfigurationOptions — (map<String>)

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

    • EnvironmentClass — (String)

      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.

    • MaxWorkers — (Integer)

      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.

    • NetworkConfiguration — (map)

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

      • SecurityGroupIdsrequired — (Array<String>)

        A list of security group IDs. A security group must be attached to the same VPC as the subnets. For more information, see Security in your VPC on Amazon MWAA.

    • LoggingConfiguration — (map)

      The Apache Airflow log types to send to CloudWatch Logs.

      • DagProcessingLogs — (map)

        Publishes Airflow DAG processing logs to CloudWatch Logs.

        • Enabledrequired — (Boolean)

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

        • LogLevelrequired — (String)

          Defines the Apache Airflow log level (e.g. INFO) to send to CloudWatch Logs.

          Possible values include:
          • "CRITICAL"
          • "ERROR"
          • "WARNING"
          • "INFO"
          • "DEBUG"
      • SchedulerLogs — (map)

        Publishes Airflow scheduler logs to CloudWatch Logs.

        • Enabledrequired — (Boolean)

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

        • LogLevelrequired — (String)

          Defines the Apache Airflow log level (e.g. INFO) to send to CloudWatch Logs.

          Possible values include:
          • "CRITICAL"
          • "ERROR"
          • "WARNING"
          • "INFO"
          • "DEBUG"
      • WebserverLogs — (map)

        Publishes Airflow web server logs to CloudWatch Logs.

        • Enabledrequired — (Boolean)

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

        • LogLevelrequired — (String)

          Defines the Apache Airflow log level (e.g. INFO) to send to CloudWatch Logs.

          Possible values include:
          • "CRITICAL"
          • "ERROR"
          • "WARNING"
          • "INFO"
          • "DEBUG"
      • WorkerLogs — (map)

        Publishes Airflow worker logs to CloudWatch Logs.

        • Enabledrequired — (Boolean)

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

        • LogLevelrequired — (String)

          Defines the Apache Airflow log level (e.g. INFO) to send to CloudWatch Logs.

          Possible values include:
          • "CRITICAL"
          • "ERROR"
          • "WARNING"
          • "INFO"
          • "DEBUG"
      • TaskLogs — (map)

        Publishes Airflow task logs to CloudWatch Logs.

        • Enabledrequired — (Boolean)

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

        • LogLevelrequired — (String)

          Defines the Apache Airflow log level (e.g. INFO) to send to CloudWatch Logs.

          Possible values include:
          • "CRITICAL"
          • "ERROR"
          • "WARNING"
          • "INFO"
          • "DEBUG"
    • WeeklyMaintenanceWindowStart — (String)

      The day and time of the week in Coordinated Universal Time (UTC) 24-hour standard time 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.

    • WebserverAccessMode — (String)

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

      Possible values include:
      • "PRIVATE_ONLY"
      • "PUBLIC_ONLY"
    • MinWorkers — (Integer)

      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.

    • Schedulers — (Integer)

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

    • MinWebservers — (Integer)

      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.

    • MaxWebservers — (Integer)

      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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Arn — (String)

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

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.