0

I am a newbie to Airflow. I am working on a project , where i need to execute a php script in Airflow worker node.I am using S3 bucket to fetch the said scripts , but when i trigger them using bash command , I get php command not found error.Also there is no operator to execute php scripts like the PythonOperator

{things I've tried so far but didn't work}:

  1. tried installing php compiler/interpreter -> you need root privileges error
  2. tried the same using sudo -> sudo command not found error

P.S. tbh I very close to punching my monitor , plwease help!!

  • 1
    I have no idea about MWAA, but in the meantime, you could launch an Amazon Lambda from Airflow... – Javier Lopez Tomas Sep 02 '21 at 11:55
  • MWAA doesn't provide a PHP runtime. As its a fully managed service I guess its not possible to install custom runtimes (only python packages). As @Javier says you could setup a PHP runtime for Lambda (see https://aws.amazon.com/blogs/apn/aws-lambda-custom-runtime-for-php-a-practical-example/) and trigger the lambda function via Python / boto3 () from within your DAG. Or convert your PHP script to Python right away... – dovregubben Oct 22 '21 at 13:50

0 Answers0