Skip to content

CloudWatch remote logging stalls after DescribeLogGroups call (AWS Batch Executor) #55756

Closed as not planned

Description

@sdg9670

Apache Airflow Provider(s)

amazon

Versions of Apache Airflow Providers

9.13.0

Apache Airflow version

3.0.6

Operating System

airflow docker

Deployment

Docker-Compose

Deployment details

No response

What happened

When using the AWS Batch Executor with CloudWatch remote logging enabled, the worker successfully calls DescribeLogGroups. After this initial call, the logging process halts completely. The worker never attempts to perform subsequent actions like CreateLogStream or PutLogEvents. As a result, the only relevant entry in CloudTrail is the DescribeLogGroups event; there are no logs for any other logging operations, indicating the process does not proceed to the next steps.

Worker logs

{
    "timestamp": "2025-09-17T07:47:47.141322Z",
    "level": "warning",
    "event": "Received message after logging system shutdown",
    "category": "WatchtowerWarning",
    "filename": "/home/airflow/.local/lib/python3.12/site-packages/watchtower/__init__.py",
    "lineno": 464,
    "logger": "py.warnings"
}

DescribeLogGroups Event logs

{
    "eventVersion": "1.11",
    "userIdentity": {
        "type": "AssumedRole",
        "principalId": "[REDACTED_PRINCIPAL_ID]",
        "arn": "arn:aws:sts::[REDACTED_ACCOUNT_ID]:assumed-role/[REDACTED_ROLE_NAME]",
        "accountId": "[REDACTED_ACCOUNT_ID]",
        "accessKeyId": "[REDACTED_ACCESS_KEY_ID]",
        "sessionContext": {
            "sessionIssuer": {
                "type": "Role",
                "principalId": "[REDACTED_ROLE_ID]",
                "arn": "arn:aws:iam::[REDACTED_ACCOUNT_ID]:role/[REDACTED_ROLE_NAME]",
                "accountId": "[REDACTED_ACCOUNT_ID]",
                "userName": "[REDACTED_ROLE_NAME]"
            },
            "attributes": {
                "creationDate": "2025-09-17T07:48:21Z",
                "mfaAuthenticated": "false"
            }
        },
        "inScopeOf": {
            "issuerType": "AWS::ECS::Task",
            "credentialsIssuedTo": "arn:aws:ecs:[REGION]:[REDACTED_ACCOUNT_ID]:task/[REDACTED_TASK_DEFINITION_NAME]/[REDACTED_TASK_ID]"
        }
    },
    "eventTime": "2025-09-17T07:50:14Z",
    "eventSource": "logs.amazonaws.com",
    "eventName": "DescribeLogGroups",
    "awsRegion": "[REGION]",
    "sourceIPAddress": "[REDACTED_IP_ADDRESS]",
    "userAgent": "Boto3/1.39.11 md/Botocore#1.39.11 ua/2.1 os/linux lang/python#3.12.11 md/pyimpl#CPython exec-env/AWS_ECS_FARGATE m/Z,D,b,C cfg/retry-mode#legacy Botocore/1.39.11 Airflow/3.0.6 AmPP/9.13.0 Caller/Unknown DagRunKey/00000000-0000-0000-0000-000000000000",
    "requestParameters": {
        "logGroupNamePrefix": "[REDACTED_LOG_GROUP_PREFIX]"
    },
    "responseElements": null,
    "requestID": "[REDACTED_REQUEST_ID]",
    "eventID": "[REDACTED_EVENT_ID]",
    "readOnly": true,
    "resources": [
        {
            "accountId": "[REDACTED_ACCOUNT_ID]",
            "type": "AWS::Logs::LogGroup",
            "ARN": "arn:aws:logs:[REGION]:[REDACTED_ACCOUNT_ID]:log-group:[REDACTED_LOG_GROUP_NAME]"
        }
    ],
    "eventType": "AwsApiCall",
    "apiVersion": "20140328",
    "managementEvent": true,
    "recipientAccountId": "[REDACTED_ACCOUNT_ID]",
    "tlsDetails": {
        "tlsVersion": "TLSv1.3",
        "cipherSuite": "TLS_AES_128_GCM_SHA256",
        "clientProvidedHostHeader": "logs.[REGION].amazonaws.com"
    }
}

What you think should happen instead

No response

How to reproduce

Configure the Airflow environment to use the AWSBatchExecutor.

Enable CloudWatch as the remote logging handler.

Trigger a DAG run to launch a new AWS Batch worker.

Check the CloudTrail logs for the IAM role associated with the worker.

You will observe that only the DescribeLogGroups API call is made, and no further log-related actions are executed.

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

  1. added
    kind:bug
    needs-triage
    on Sep 17, 2025
  2. added
    provider:amazon
    on Sep 17, 2025
  3. eladkal commented on Sep 30, 2025

    @eladkal
    Contributor
  4. removed
    needs-triage
    on Sep 30, 2025
  5. ashb commented on Jan 15, 2026

    @ashb
    Member

    @sdg9670 Are you still able to reproduce this on the latest versions please?

  6. github-actions commented on Jan 30, 2026

    @github-actions
    Contributor

    This issue has been automatically marked as stale because it has been open for 14 days with no response from the author. It will be closed in next 7 days if no further activity occurs from the issue author.

  7. added
    stale
    on Jan 30, 2026
  8. github-actions commented on Feb 9, 2026

    @github-actions
    Contributor

    This issue has been closed because it has not received response from the issue author.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:loggingarea:providerskind:bugpending-responseprovider:amazonstale

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions