[ aws . mwaa-serverless ]

create-workflow

Description

Creates a new workflow in Amazon Managed Workflows for Apache Airflow Serverless. This operation initializes a workflow with the specified configuration including the workflow definition, execution role, and optional settings for encryption, logging, and networking. You must provide the workflow definition as a YAML file stored in Amazon S3 that defines the DAG structure using supported Amazon Web Services operators. Amazon Managed Workflows for Apache Airflow Serverless automatically creates the first version of the workflow and sets up the necessary execution environment with multi-tenant isolation and security controls.

See also: AWS API Documentation

Synopsis

  create-workflow
--name <value>
[--client-token <value>]
--definition-s3-location <value>
--role-arn <value>
[--description <value>]
[--encryption-configuration <value>]
[--logging-configuration <value>]
[--engine-version <value>]
[--network-configuration <value>]
[--tags <value>]
[--trigger-mode <value>]
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]
[--debug]
[--endpoint-url <value>]
[--no-verify-ssl]
[--no-paginate]
[--output <value>]
[--query <value>]
[--profile <value>]
[--region <value>]
[--version <value>]
[--color <value>]
[--no-sign-request]
[--ca-bundle <value>]
[--cli-read-timeout <value>]
[--cli-connect-timeout <value>]
[--cli-binary-format <value>]
[--no-cli-pager]
[--cli-auto-prompt]
[--no-cli-auto-prompt]

Options

--name (string) [required]

The name of the workflow. You must use unique workflow names within your Amazon Web Services account. The service generates a unique identifier that is appended to ensure temporal uniqueness across the account lifecycle.

Constraints:

  • min: 1
  • max: 255
  • pattern: [a-zA-Z0-9]+[a-zA-Z0-9\.\-_]*

--client-token (string)

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This token prevents duplicate workflow creation requests.

Constraints:

  • min: 1
  • max: 128
  • pattern: [\x21-\x7E]+

--definition-s3-location (structure) [required]

The Amazon S3 location where the workflow definition file is stored. This must point to a valid YAML file that defines the workflow structure using supported Amazon Web Services operators and tasks. Amazon Managed Workflows for Apache Airflow Serverless takes a snapshot of the definition at creation time, so subsequent changes to the Amazon S3 object will not affect the workflow unless you create a new version. In your YAML definition, include task dependencies, scheduling information, and operator configurations that are compatible with the Amazon Managed Workflows for Apache Airflow Serverless execution environment.

Bucket -> (string) [required]

The name of the Amazon S3 bucket that contains the workflow definition file.

ObjectKey -> (string) [required]

The key (name) of the workflow definition file within the S3 bucket.

VersionId -> (string)

Optional. The version ID of the workflow definition file in Amazon S3. If not specified, the latest version is used.

Shorthand Syntax:

Bucket=string,ObjectKey=string,VersionId=string

JSON Syntax:

{
  "Bucket": "string",
  "ObjectKey": "string",
  "VersionId": "string"
}

--role-arn (string) [required]

The Amazon Resource Name (ARN) of the IAM role that Amazon Managed Workflows for Apache Airflow Serverless assumes when executing the workflow. This role must have the necessary permissions to access the required Amazon Web Services services and resources that your workflow tasks will interact with. The role is used for task execution in the isolated, multi-tenant environment and should follow the principle of least privilege. Amazon Managed Workflows for Apache Airflow Serverless validates role access during workflow creation but runtime permission checks are performed by the target services.

Constraints:

  • min: 1
  • max: 2048
  • pattern: arn:aws(?:-(?:cn|us-gov|iso|iso-b|iso-e|iso-f))?:iam::[0-9]{12}:role(/[a-zA-Z0-9+=,.@_\-]{1,512})*?/[a-zA-Z0-9+=,.@_\-]{1,64}

--description (string)

An optional description of the workflow that you can use to provide additional context about the workflow’s purpose and functionality.

Constraints:

  • min: 1
  • max: 1024
  • pattern: .+

--encryption-configuration (structure)

The configuration for encrypting workflow data at rest and in transit. Specifies the encryption type and optional KMS key for customer-managed encryption.

Type -> (string) [required]

The type of encryption to use. Values are AWS_MANAGED_KEY (Amazon Web Services manages the encryption key) or CUSTOMER_MANAGED_KEY (you provide a KMS key).

Possible values:

  • AWS_MANAGED_KEY
  • CUSTOMER_MANAGED_KEY

KmsKeyId -> (string)

The ID or ARN of the Amazon Web Services KMS key to use for encryption. Required when Type is CUSTOMER_MANAGED_KEY .

Shorthand Syntax:

Type=string,KmsKeyId=string

JSON Syntax:

{
  "Type": "AWS_MANAGED_KEY"|"CUSTOMER_MANAGED_KEY",
  "KmsKeyId": "string"
}

--logging-configuration (structure)

The configuration for workflow logging. Specifies the CloudWatch log group where workflow execution logs are stored. Amazon Managed Workflows for Apache Airflow Serverless automatically exports worker logs and task-level information to the specified log group in your account using remote logging functionality. This provides comprehensive observability for debugging and monitoring workflow execution across the distributed, serverless environment.

LogGroupName -> (string) [required]

The name of the CloudWatch log group where workflow execution logs are stored.

Shorthand Syntax:

LogGroupName=string

JSON Syntax:

{
  "LogGroupName": "string"
}

--engine-version (integer)

The version of the Amazon Managed Workflows for Apache Airflow Serverless engine that you want to use for this workflow. This determines the feature set, supported operators, and execution environment capabilities available to your workflow. Amazon Managed Workflows for Apache Airflow Serverless maintains backward compatibility across versions while introducing new features and improvements. Currently supports version 1 with plans for additional versions as the service evolves.

--network-configuration (structure)

Network configuration for the workflow execution environment, including VPC security groups and subnets for secure network access. When specified, Amazon Managed Workflows for Apache Airflow Serverless deploys ECS worker tasks in your customer VPC to provide secure connectivity to your resources. If not specified, tasks run in the service’s default worker VPC with network isolation from other customers. This configuration enables secure access to VPC-only resources like RDS databases or private endpoints.

SecurityGroupIds -> (list)

A list of VPC security group IDs to associate with the workflow execution environment.

(string)

Constraints:

  • min: 1
  • max: 255
  • pattern: sg-[a-z0-9]*

SubnetIds -> (list)

A list of VPC subnet IDs where the workflow execution environment is deployed.

(string)

Constraints:

  • min: 1
  • max: 255
  • pattern: subnet-[a-z0-9]*

Shorthand Syntax:

SecurityGroupIds=string,string,SubnetIds=string,string

JSON Syntax:

{
  "SecurityGroupIds": ["string", ...],
  "SubnetIds": ["string", ...]
}

--tags (map)

A map of tags to assign to the workflow resource. Tags are key-value pairs that are used for resource organization and cost allocation.

Constraints:

  • min: 0
  • max: 50

key -> (string)

Constraints:

  • min: 1
  • max: 128
  • pattern: .*

value -> (string)

Constraints:

  • min: 0
  • max: 256
  • pattern: .*

Shorthand Syntax:

KeyName1=string,KeyName2=string

JSON Syntax:

{"string": "string"
  ...}

--trigger-mode (string)

The trigger mode for the workflow execution.

Constraints:

  • min: 1
  • max: 255
  • pattern: .*

--cli-input-json | --cli-input-yaml (string) Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. Similarly, if provided yaml-input it will print a sample input YAML that can be used with --cli-input-yaml. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command. The generated JSON skeleton is not stable between versions of the AWS CLI and there are no backwards compatibility guarantees in the JSON skeleton generated.

Global Options

--debug (boolean)

Turn on debug logging.

--endpoint-url (string)

Override command’s default URL with the given URL.

--no-verify-ssl (boolean)

By default, the AWS CLI uses SSL when communicating with AWS services. For each SSL connection, the AWS CLI will verify SSL certificates. This option overrides the default behavior of verifying SSL certificates.

--no-paginate (boolean)

Disable automatic pagination. If automatic pagination is disabled, the AWS CLI will only make one call, for the first page of results.

--output (string)

The formatting style for command output.

  • json
  • text
  • table
  • yaml
  • yaml-stream

--query (string)

A JMESPath query to use in filtering the response data.

--profile (string)

Use a specific profile from your credential file.

--region (string)

The region to use. Overrides config/env settings.

--version (string)

Display the version of this tool.

--color (string)

Turn on/off color output.

  • on
  • off
  • auto

--no-sign-request (boolean)

Do not sign requests. Credentials will not be loaded if this argument is provided.

--ca-bundle (string)

The CA certificate bundle to use when verifying SSL certificates. Overrides config/env settings.

--cli-read-timeout (int)

The maximum socket read time in seconds. If the value is set to 0, the socket read will be blocking and not timeout. The default value is 60 seconds.

--cli-connect-timeout (int)

The maximum socket connect time in seconds. If the value is set to 0, the socket connect will be blocking and not timeout. The default value is 60 seconds.

--cli-binary-format (string)

The formatting style to be used for binary blobs. The default format is base64. The base64 format expects binary blobs to be provided as a base64 encoded string. The raw-in-base64-out format preserves compatibility with AWS CLI V1 behavior and binary values must be passed literally. When providing contents from a file that map to a binary blob fileb:// will always be treated as binary and use the file contents directly regardless of the cli-binary-format setting. When using file:// the file contents will need to properly formatted for the configured cli-binary-format.

  • base64
  • raw-in-base64-out

--no-cli-pager (boolean)

Disable cli pager for output.

--cli-auto-prompt (boolean)

Automatically prompt for CLI input parameters.

--no-cli-auto-prompt (boolean)

Disable automatically prompt for CLI input parameters.

Output

WorkflowArn -> (string)

The Amazon Resource Name (ARN) of the newly created workflow. This ARN uniquely identifies the workflow resource.

Constraints:

  • min: 1
  • max: 2048
  • pattern: arn:aws(?:-(?:cn|us-gov|iso|iso-b|iso-e|iso-f))?:airflow-serverless:([a-z]{2}-[a-z]+-[0-9]{1}):([0-9]{12}):workflow/([a-zA-Z0-9][a-zA-Z0-9\.\-_]{0,254}-[a-zA-Z0-9]{10})

CreatedAt -> (timestamp)

The timestamp when the workflow was created, in ISO 8601 date-time format.

RevisionId -> (string)

A unique identifier for this revision of the workflow configuration. This ID changes when the workflow is updated and you can use it for optimistic concurrency control in update operations. The revision ID helps prevent conflicting updates and ensures that updates are applied to the expected version of the workflow configuration.

WorkflowStatus -> (string)

The current status of the workflow. Possible values are READY (workflow is ready to run) and DELETING (workflow is being deleted).

Possible values:

  • READY
  • DELETING

WorkflowVersion -> (string)

The version identifier of the workflow. This is a service-generated alphanumeric string that uniquely identifies this version of the workflow. Amazon Managed Workflows for Apache Airflow Serverless uses a version-first approach where each workflow can have multiple immutable versions, which allows you to maintain different configurations and roll back to previous versions as needed. The version identifier is used in ARNs and API operations to reference specific workflow versions.

Constraints:

  • min: 32
  • max: 32
  • pattern: [a-z0-9]{32}

IsLatestVersion -> (boolean)

A Boolean flag that indicates whether this workflow version is the latest version of the workflow.

Warnings -> (list)

Warning messages generated during workflow creation.

(string)