I have recently created MWAA environment and tried creating and running a dag. The Dag fails but I dont see any logs. The logging level for Task logs was set to INFO and I should be able to see some logs
here is the error I get
*** Unable to read remote logs from Cloudwatch (log_group: airflow-MyAirflowEnvironment-Task, log_stream: dag_id=file_copy_dag/run_id=manual__2024-04-18T16_36_29.859714+00_00/task_id=start_task/attempt=1.log)
*** An error occurred (ResourceNotFoundException) when calling the GetLogEvents operation: The specified log stream does not exist.
*** Could not read served logs: Request URL is missing an 'http://' or 'https://' protocol.
when I check cloudwatch the log group exist but the log stream doesn't have an logs
I have just had the same issue. Try attaching the following statement to the policy for the Execution Role used in MyAirflowEnvironment:
{
"Effect": "Allow",
"Action": [
"logs:*"
],
"Resource": [
"*"
]
}