We are trying to install python package that can be shipped in plugins.zip for MWAA environment and added the reference in requirements.txt as described in the docs but we are still seeing the error file not found.
directory structure
├── README.md
├── dags
│ └── dummy.py
├── plugins
│ └── dummy-wheel-0.1.0-py3-none-any.whl
└── requirements.txt
The contents of requirements.txt
/usr/local/airflow/plugins/dummy-wheel-0.1.0-py3-none-any.whl
From here I have just created a zip file containing dummy-wheel-0.1.0-py3-none-any.whl
and push it to S3://<bucket_name>/plugins.zip
Followed instructions here https://aws.amazon.com/premiumsupport/knowledge-center/mwaa-install-custom-packages/
What am I missing?
You may utilize BashOperator to list the directory
/usr/local/airflow/plugins/
to verify whether the file is present there. While zipping, the whl file is supposed to be in the root path for it to be available in/usr/local/airflow/plugins/
. Whereas if zipping a folder (eg. plugins), the extracted path will vary accordingly (eg./usr/local/airflow/plugins/plugins/
).