Can't view task logs in Airflow web UI after changing secrets backend

0

After switching the alternate secrets backend to the Parameter store I was able to retrieve connections/variables from the SSM Parameter store, but the only issue was the task logs page in the Airflow webserver UI was stuck in a loading state. I can still view task logs from the Cloudwatch portal.

Enter image description here

Airflow config

secrets.backend	airflow.providers.amazon.aws.secrets.systems_manager.SystemsManagerParameterStoreBackend
secrets.backend_kwargs	{"connections_prefix" : "airflow/connections", "variables_prefix" : "airflow/variables"}

SystemsManager policy attached to execution role

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": "ssm:*",
            "Resource": "arn:aws:ssm:us-east-1:<account_id>:parameter/airflow*"
        }
    ]
}
1 Answer
0

Hello Sri

Configuring SSM with MWAA shouldn't effect the functionality of fetching the logs from Airflow UI in general. This issue can occur if you have really huge logs but slowness is rare unless your webserver is highly utilized.

Next step:

  1. Check webserver CPU and memory utilization - https://docs.aws.amazon.com/mwaa/latest/userguide/accessing-metrics-cw-container-queue-db.html

  2. You might know that Airflow UI fetches the logs from CloudWatch and you can consider checking the CloudTrail events for GetLogEvents from IAM user AmazonMWAA-airflow whether they are failing with some exception(s).

AWS
answered 13 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions