- Newest
- Most votes
- Most comments
My MWAA environment is private and it wont be able to read the constraint file from internet, could you please let me know the other way around?
answered 2 years ago
To resolve the issue of not being able to install the snowflake-connector-python package in Amazon Managed Workflows for Apache Airflow (MWAA) 2.10.1, there are a few steps you can take:
- Ensure you're using the correct constraint file: For MWAA 2.10.1, you need to include a constraint statement in your requirements.txt file. This ensures compatibility between the packages and the Apache Airflow version. Add the following line at the beginning of your requirements.txt file:
--constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.10.1/constraints-3.10.txt"
-
Specify package versions: It's a best practice to specify versions for all packages in your requirements.txt file. This helps prevent conflicts and ensures consistency. Update your file to include specific versions for each package.
-
Order of installation: The order of packages in the requirements.txt file can sometimes affect installation. Try moving the snowflake-related packages to the top of the list, right after the constraint statement.
-
Remove redundant packages: Since you're installing apache-airflow[snowflake], you may not need to separately specify snowflake-connector-python and snowflake-sqlalchemy, as they should be included as dependencies.
-
Test locally: Before deploying to MWAA, test your requirements file using the MWAA local runner. This can help identify any conflicts or issues before deployment.
-
Check CloudWatch Logs: After updating and deploying your requirements.txt file, check the CloudWatch Logs for the requirements installation process. This can provide more detailed error information if the installation is still failing.
-
Verify in Airflow UI: After a successful installation, you can verify the installed packages in the Airflow UI under the "Providers" section.
If you're still encountering issues after these steps, you may need to create a .zip archive of all dependencies and upload it to your S3 bucket, specifying the package location in your MWAA configuration.
Remember to redeploy your MWAA environment after making changes to the requirements.txt file for the changes to take effect.
Sources
Amazon MWAA frequently asked questions - Amazon Managed Workflows for Apache Airflow
Amazon MWAA best practices for managing Python dependencies | AWS Big Data Blog
answered 2 years ago
Relevant content
asked 3 years ago
asked 5 years ago
- AWS OFFICIALUpdated 7 months ago

My MWAA environment is private and it wont be able to read the constraint file from internet, could you please let me know the other way around?