Restart MWAA environment programmatically

0

Hi,

We use custom packages as dependencies of some of our PythonOperators. Therefore, when we update these packages, we'd like to reflect this update when used by a PythonOperator in MWAA.

The current solution today is to "restart" the MWAA in the UI (by simply editing anything in the MWAA environment configuration).

But we wondered if there was any solution in order to trigger this restart of the MWAA env programmatically, so it is possible to integrate this an extra step of a CodePipeline for instance.

Thanks

질문됨 3년 전5483회 조회
2개 답변
0

Hi!

You can call update-environment, either with the new S3 version ID for your new plugins/requirements.txt or with an additional configuration override, such as custom.lastupdate = "<current time>", as part of your CI/CD pipeline that will force MWAA to restart.

Thanks!

AWS
John_J
답변함 3년 전
  • Not sure how to use the configuration override. I tried aws mwaa update-environment --name dev custom.lastupdate = "<current time>" but got an error 'Unknown options: =, <current time>, custom.lastupdate'

0

Note that, as of Airflow 2.0, you do not need to package custom operators as plugins and should simply place them somewhere in your S3 dags folder. These will be synced automatically by MWAA to each container and no restart is required. See https://airflow.apache.org/docs/apache-airflow/stable/plugins.html .

AWS
John_J
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인