I have a mwaa airflow environment that is running. I have setup the logs. All the logs seem to run in cloud watch except for dag tasks.
When I create a simple pythonoperator dag script (a function that prints hello world) the tasks fails and does not show any task log. When I create a dummy operator dag it passes but there is no log.
I have a policy like below that allows logs for cloud stream.
"Action": [
"logs:CreateLogStream",
"logs:CreateLogGroup",
"logs:PutLogEvents",
"logs:GetLogEvents",
"logs:GetLogRecord",
"logs:GetLogGroupFields",
"logs:GetQueryResults"
],
"Resource": [
"arn:aws:logs:{your-region}:{your-account-id}:log-group:airflow-{your-environment-name}-*"
]
}
I have followed the aws troubleshooting but still cannot figure it out.