- Newest
- Most votes
- Most comments
This "Forbidden" error when accessing the Apache Airflow UI in Amazon MWAA (Managed Workflows for Apache Airflow) typically occurs because your IAM role or user doesn't have the necessary permissions.
Here are some troubleshooting steps:
-
Check IAM permissions: Ensure your IAM role includes the "airflow:CreateWebLoginToken" permission. This is required to access the Airflow UI.
-
Verify role-based access: If you're using a custom IAM role with the default Apache Airflow Public role, you'll need to assign appropriate permissions in the Airflow UI. By default, a new role might not have the required permissions, resulting in a Forbidden error.
-
Check for expired web login tokens: The 403 Forbidden error can occur if your web login token has expired.
-
Assign proper Airflow RBAC role: You may need to:
- Access the Apache Airflow UI using an admin role
- Go to Security > List Users
- Find your Apache Airflow user (in the format "user/customUser")
- Edit the user record and add the appropriate role
- Save the changes
- Verify you're accessing the correct URL: Make sure you're using the correct webserver URL for your environment, which you can retrieve using the AWS CLI command:
aws mwaa get-environment --name your-environment-name | jq '.Environment.WebserverUrl'
After making these changes, try accessing the Airflow UI again. The IAM role should now have the proper permissions to access the Apache Airflow UI.
Sources
Troubleshoot Apache Airflow UI access issues in MWAA | AWS re:Post
Secure DAG access with role-based permissions in MWAA | AWS re:Post
Tutorial: Restricting an Amazon MWAA user's access to a subset of DAGs - Amazon Managed Workflows for Apache Airflow
answered a year ago
Relevant content
asked a year ago
asked a year ago
asked 5 years ago
asked 4 years ago
