Skip to content

error while accessing airflow ui

0

Forbidden You don't have the permission to access the requested resource. It is either read-protected or not readable by the server.

getting this error when accessing aws airflow ui

asked a year ago221 views

1 Answer
0

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:

  1. Check IAM permissions: Ensure your IAM role includes the "airflow:CreateWebLoginToken" permission. This is required to access the Airflow UI.

  2. 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.

  3. Check for expired web login tokens: The 403 Forbidden error can occur if your web login token has expired.

  4. 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
  1. 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

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.