Remote Execution Agents require a custom XCom backend to pass data between tasks. This guide covers configuring AWS S3, Azure Blob Storage, or GCP Cloud Storage as your XCom backend.
XCom (cross-communication) enables data exchange between Airflow tasks. By default, Airflow stores XCom values in the metadata database. With Remote Execution, the metadata database resides in the Astro orchestration plane while agents execute tasks in your infrastructure.
A custom XCom backend stores XCom data in object storage accessible to all agents in your execution plane. This allows tasks running on different agents to share data through a common storage location.
In Airflow 3, XCom values are stored externally in storage backends. The database only holds the location of each XCom value, and retrieving the actual XCom data requires a call to the execution API with a valid task token.
Currently, callbacks do not receive a task token, so they cannot retrieve XCom values from external backends. As a result, using XCom in callbacks is not supported at this time when using Remote Execution with custom XCom backends.
XCom triggerer support is enabled with Agent Client 1.5.0+. Triggers running on the agent can retrieve and push XCom values when using a compatible client version.
All XCom backend configurations use the XComObjectStorageBackend class from the Common IO provider. Choose your cloud provider below for specific configuration instructions.
The Remote Execution Agent image must include these Python packages:
apache-airflow-providers-amazonapache-airflow-providers-common-ios3fsCreate an S3 bucket for XCom storage with the following recommended settings:
Create an IAM role with permissions to read and write to your XCom bucket. Attach this policy to the role:
Configure the trust relationship to allow your Kubernetes service accounts to assume the role. See AWS IRSA documentation for details.
Update your agent’s values.yaml file with the XCom backend configuration:
Replace:
<connection-id>: Airflow connection ID for S3 (use aws_default or create a custom connection)<bucket-name>: Your S3 bucket name<path-to-xcom>: Path prefix for XCom objects (e.g., xcom)<AWS_ACCOUNT_ID>: Your AWS account ID<IAM_ROLE_NAME>: IAM role name created aboveUpdate your Helm release:
The AIRFLOW__COMMON_IO__XCOM_OBJECTSTORAGE_PATH parameter defines where XCom objects are stored:
s3:// for AWS, abfs:// for Azure, gs:// for GCPThe AIRFLOW__COMMON_IO__XCOM_OBJECTSTORAGE_THRESHOLD parameter controls when XCom values are stored in object storage:
0: Always store in object storage (recommended for Remote Execution)>0: Store in object storage only if value size exceeds threshold in bytesSet this to 0 to ensure all XCom values are accessible to remote agents.
The AIRFLOW__COMMON_IO__XCOM_OBJECTSTORAGE_COMPRESSION parameter controls compression:
zip: Compress XCom values (recommended)None: No compressionCompression reduces storage costs and transfer time for large XCom values.
After applying your configuration, verify XCom backend functionality:
After configuring XCom backend: