- Newest
- Most votes
- Most comments
The dependency conflict you're experiencing between Amazon MWAA (Managed Workflows for Apache Airflow) and SageMaker is a common challenge when working with Python dependencies across AWS services.
You're correct that MWAA is ending support for versions below 2.6.3, and your analysis of the dependency conflicts is accurate. The core issues are:
- For MWAA 2.10.3: The boto3 and attrs version constraints between MWAA and SageMaker are incompatible.
- For MWAA 2.9.2: Multiple conflicts exist with boto3, attrs, dill, and urllib3 versions.
Here are some potential solutions:
-
Use a virtual environment approach: Consider creating a Lambda Layer or using a custom container that includes the specific versions of dependencies you need. This isolates your SageMaker dependencies from the MWAA environment.
-
Pin specific versions: Create a requirements.txt file that explicitly pins compatible versions of all dependencies, including transitive ones. This might require finding a specific SageMaker version that works with the MWAA constraints.
-
Use AWS CDK to automate environment setup: You could use AWS CDK to provision your MWAA environment with specific configurations that help manage these dependencies.
-
Consider using the AWS SDK directly: Instead of using the SageMaker Python SDK within your DAGs, you could use boto3 directly to interact with SageMaker. This might avoid some of the dependency conflicts.
-
Contact AWS Support: Since this appears to be a compatibility issue between two AWS services, AWS Support might be able to provide specific guidance or workarounds.
The dependency conflicts you're experiencing are particularly challenging because they involve core libraries like boto3 and urllib3 that are used by multiple AWS services. As MWAA continues to update its supported Airflow versions, AWS may provide more guidance on managing these types of dependency conflicts.
Sources
Community | Automate your Apache Airflow Environments
error pip install -t python requests | AWS re:Post
get_environment - Boto3 1.38.27 documentation
Community | Automate the Provisioning of Your Apache Airflow Environments
answered a year ago
Relevant content
asked 6 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 7 months ago
