workflows
Creates, updates, deletes, gets or lists a workflows resource.
Overview
| Name | workflows |
| Type | Resource |
| Id | aws.mwaa_serverless.workflows |
Fields
The following fields are returned by SELECT queries:
- get_workflow
- list_workflows
| Name | Datatype | Description |
|---|---|---|
code | object | The Amazon S3 location of the code artifacts provided during workflow creation or update. |
code_snapshotted_at | string (date-time) | The time at which the code artifacts were copied for this workflow, in ISO 8601 date-time format. |
created_at | string (date-time) | The timestamp when the workflow was created, in ISO 8601 date-time format. |
definition_s3_location | object | The Amazon S3 location of the workflow definition file. |
description | string | The description of the workflow. (pattern: <code>.+</code>) |
encryption_configuration | object | The encryption configuration for the workflow. |
engine_version | integer | The version of the Amazon Managed Workflows for Apache Airflow Serverless engine that this workflow uses. |
logging_configuration | object | The logging configuration for the workflow. |
modified_at | string (date-time) | The timestamp when the workflow was last modified, in ISO 8601 date-time format. |
name | string | The name of the workflow. (pattern: <code>[a-zA-Z0-9]+[a-zA-Z0-9.-_]*</code>) |
network_configuration | object | The network configuration for the workflow execution environment. |
role_arn | string | The Amazon Resource Name (ARN) of the IAM role used for workflow execution. (pattern: <code>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}</code>) |
schedule_configuration | object | The schedule configuration for the workflow, including cron expressions for automated execution. Amazon Managed Workflows for Apache Airflow Serverless uses EventBridge Scheduler for cost-effective, timezone-aware scheduling. When a workflow includes schedule information in its YAML definition, the service automatically configures the appropriate triggers for automated execution. Only one version of a workflow can have an active schedule at any given time. |
trigger_mode | string | The trigger mode for the workflow execution. (pattern: <code>.*</code>) |
workflow_arn | string | The Amazon Resource Name (ARN) of the workflow. (pattern: <code>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})</code>) |
workflow_definition | string | The workflow definition content. (pattern: <code>.*</code>) |
workflow_status | string | The current status of the workflow. (READY, DELETING) |
workflow_version | string | The version identifier of the workflow. (pattern: <code>[a-z0-9]{32}</code>) |
| Name | Datatype | Description |
|---|---|---|
created_at | string (date-time) | The timestamp when the workflow was created, in ISO 8601 date-time format. |
description | string | The description of the workflow. (pattern: <code>.+</code>) |
modified_at | string (date-time) | The timestamp when the workflow was last modified, in ISO 8601 date-time format. |
name | string | The name of the workflow. (pattern: <code>[a-zA-Z0-9]+[a-zA-Z0-9.-_]*</code>) |
trigger_mode | string | The trigger mode for the workflow execution. (pattern: <code>.*</code>) |
workflow_arn | string | The Amazon Resource Name (ARN) of the workflow. (pattern: <code>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})</code>) |
workflow_status | string | The current status of the workflow. (READY, DELETING) |
workflow_version | string | The version identifier of the workflow. (pattern: <code>[a-z0-9]{32}</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_workflow | select | region | Retrieves detailed information about a workflow, including its configuration, status, and metadata. | |
list_workflows | select | region | Lists all workflows in your account, with optional pagination support. This operation returns summary information for workflows, showing only the most recently created version of each workflow. Amazon Managed Workflows for Apache Airflow Serverless maintains workflow metadata in a highly available, distributed storage system that enables efficient querying and filtering. The service implements proper access controls to ensure you can only view workflows that you have permissions to access, supporting both individual and team-based workflow management scenarios. | |
create_workflow | insert | region, DefinitionS3Location, RoleArn | 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. | |
update_workflow | update | region, WorkflowArn, DefinitionS3Location, RoleArn | Updates an existing workflow with new configuration settings. This operation allows you to modify the workflow definition, role, and other settings. When you update a workflow, Amazon Managed Workflows for Apache Airflow Serverless automatically creates a new version with the updated configuration and disables scheduling on all previous versions to ensure only one version is actively scheduled at a time. The update operation maintains workflow history while providing a clean transition to the new configuration. | |
delete_workflow | delete | region | Deletes a workflow and all its versions. This operation permanently removes the workflow and cannot be undone. Amazon Managed Workflows for Apache Airflow Serverless ensures that all associated resources are properly cleaned up, including stopping any running executions, removing scheduled triggers, and cleaning up execution history. The deletion process respects the multi-tenant isolation boundaries and ensures that no residual data or configurations remain that could affect other customers or workflows. | |
start_workflow_run | exec | region, WorkflowArn | Starts a new execution of a workflow. This operation creates a workflow run that executes the tasks that are defined in the workflow. Amazon Managed Workflows for Apache Airflow Serverless schedules the workflow execution across its managed Airflow environment, automatically scaling ECS worker tasks based on the workload. The service handles task isolation, dependency resolution, and provides comprehensive monitoring and logging throughout the execution lifecycle. | |
stop_workflow_run | exec | region, WorkflowArn, RunId | Stops a running workflow execution. This operation terminates all running tasks and prevents new tasks from starting. Amazon Managed Workflows for Apache Airflow Serverless gracefully shuts down the workflow execution by stopping task scheduling and terminating active ECS worker containers. The operation transitions the workflow run to a STOPPING state and then to STOPPED once all cleanup is complete. In-flight tasks may complete or be terminated depending on their current execution state. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_workflow
- list_workflows
Retrieves detailed information about a workflow, including its configuration, status, and metadata.
SELECT
code,
code_snapshotted_at,
created_at,
definition_s3_location,
description,
encryption_configuration,
engine_version,
logging_configuration,
modified_at,
name,
network_configuration,
role_arn,
schedule_configuration,
trigger_mode,
workflow_arn,
workflow_definition,
workflow_status,
workflow_version
FROM aws.mwaa_serverless.workflows
WHERE region = '{{ region }}' -- required
;
Lists all workflows in your account, with optional pagination support. This operation returns summary information for workflows, showing only the most recently created version of each workflow. Amazon Managed Workflows for Apache Airflow Serverless maintains workflow metadata in a highly available, distributed storage system that enables efficient querying and filtering. The service implements proper access controls to ensure you can only view workflows that you have permissions to access, supporting both individual and team-based workflow management scenarios.
SELECT
created_at,
description,
modified_at,
name,
trigger_mode,
workflow_arn,
workflow_status,
workflow_version
FROM aws.mwaa_serverless.workflows
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_workflow
- Manifest
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.
INSERT INTO aws.mwaa_serverless.workflows (
Name,
ClientToken,
DefinitionS3Location,
Code,
RoleArn,
Description,
EncryptionConfiguration,
LoggingConfiguration,
EngineVersion,
NetworkConfiguration,
Tags,
TriggerMode,
region
)
SELECT
'{{ Name }}',
'{{ ClientToken }}',
'{{ DefinitionS3Location }}' /* required */,
'{{ Code }}',
'{{ RoleArn }}' /* required */,
'{{ Description }}',
'{{ EncryptionConfiguration }}',
'{{ LoggingConfiguration }}',
{{ EngineVersion }},
'{{ NetworkConfiguration }}',
'{{ Tags }}',
'{{ TriggerMode }}',
'{{ region }}'
RETURNING
created_at,
is_latest_version,
revision_id,
warnings,
workflow_arn,
workflow_status,
workflow_version
;
# Description fields are for documentation purposes
- name: workflows
props:
- name: region
value: "{{ region }}"
description: Required parameter for the workflows resource.
- name: Name
value: "{{ Name }}"
description: |
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.
- name: ClientToken
value: "{{ ClientToken }}"
description: |
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This token prevents duplicate workflow creation requests.
- name: DefinitionS3Location
description: |
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.
value:
Bucket: "{{ Bucket }}"
ObjectKey: "{{ ObjectKey }}"
VersionId: "{{ VersionId }}"
- name: Code
description: |
The location of code artifacts in Amazon S3 for the workflow. The service copies the code from this location at the time of the request.
value:
S3Location:
Bucket: "{{ Bucket }}"
ObjectKey: "{{ ObjectKey }}"
VersionId: "{{ VersionId }}"
- name: RoleArn
value: "{{ RoleArn }}"
description: |
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.
- name: Description
value: "{{ Description }}"
description: |
An optional description of the workflow that you can use to provide additional context about the workflow's purpose and functionality.
- name: EncryptionConfiguration
description: |
The configuration for encrypting workflow data at rest and in transit. Specifies the encryption type and optional KMS key for customer-managed encryption.
value:
Type: "{{ Type }}"
KmsKeyId: "{{ KmsKeyId }}"
- name: LoggingConfiguration
description: |
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.
value:
LogGroupName: "{{ LogGroupName }}"
- name: EngineVersion
value: {{ EngineVersion }}
description: |
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.
- name: NetworkConfiguration
description: |
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.
value:
SecurityGroupIds:
- "{{ SecurityGroupIds }}"
SubnetIds:
- "{{ SubnetIds }}"
- name: Tags
value: "{{ Tags }}"
description: |
A map of tags to assign to the workflow resource. Tags are key-value pairs that are used for resource organization and cost allocation.
- name: TriggerMode
value: "{{ TriggerMode }}"
description: |
The trigger mode for the workflow execution.
UPDATE examples
- update_workflow
Updates an existing workflow with new configuration settings. This operation allows you to modify the workflow definition, role, and other settings. When you update a workflow, Amazon Managed Workflows for Apache Airflow Serverless automatically creates a new version with the updated configuration and disables scheduling on all previous versions to ensure only one version is actively scheduled at a time. The update operation maintains workflow history while providing a clean transition to the new configuration.
UPDATE aws.mwaa_serverless.workflows
SET
WorkflowArn = '{{ WorkflowArn }}',
DefinitionS3Location = '{{ DefinitionS3Location }}',
Code = '{{ Code }}',
RoleArn = '{{ RoleArn }}',
Description = '{{ Description }}',
LoggingConfiguration = '{{ LoggingConfiguration }}',
EngineVersion = {{ EngineVersion }},
NetworkConfiguration = '{{ NetworkConfiguration }}',
TriggerMode = '{{ TriggerMode }}'
WHERE
region = '{{ region }}' --required
AND WorkflowArn = '{{ WorkflowArn }}' --required
AND DefinitionS3Location = '{{ DefinitionS3Location }}' --required
AND RoleArn = '{{ RoleArn }}' --required
RETURNING
modified_at,
warnings,
workflow_arn,
workflow_version;
DELETE examples
- delete_workflow
Deletes a workflow and all its versions. This operation permanently removes the workflow and cannot be undone. Amazon Managed Workflows for Apache Airflow Serverless ensures that all associated resources are properly cleaned up, including stopping any running executions, removing scheduled triggers, and cleaning up execution history. The deletion process respects the multi-tenant isolation boundaries and ensures that no residual data or configurations remain that could affect other customers or workflows.
DELETE FROM aws.mwaa_serverless.workflows
WHERE region = '{{ region }}' --required
;
Lifecycle Methods
- start_workflow_run
- stop_workflow_run
Starts a new execution of a workflow. This operation creates a workflow run that executes the tasks that are defined in the workflow. Amazon Managed Workflows for Apache Airflow Serverless schedules the workflow execution across its managed Airflow environment, automatically scaling ECS worker tasks based on the workload. The service handles task isolation, dependency resolution, and provides comprehensive monitoring and logging throughout the execution lifecycle.
EXEC aws.mwaa_serverless.workflows.start_workflow_run
@region='{{ region }}' --required
@@json=
'{
"WorkflowArn": "{{ WorkflowArn }}",
"ClientToken": "{{ ClientToken }}",
"OverrideParameters": "{{ OverrideParameters }}",
"WorkflowVersion": "{{ WorkflowVersion }}"
}'
;
Stops a running workflow execution. This operation terminates all running tasks and prevents new tasks from starting. Amazon Managed Workflows for Apache Airflow Serverless gracefully shuts down the workflow execution by stopping task scheduling and terminating active ECS worker containers. The operation transitions the workflow run to a STOPPING state and then to STOPPED once all cleanup is complete. In-flight tasks may complete or be terminated depending on their current execution state.
EXEC aws.mwaa_serverless.workflows.stop_workflow_run
@region='{{ region }}' --required
@@json=
'{
"WorkflowArn": "{{ WorkflowArn }}",
"RunId": "{{ RunId }}"
}'
;