Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
export WEB_SERVER_HOSTNAME="<your_airflow_web_server.us-east-1.airflow.amazonaws.com>"
export ENVIRONMENT_NAME=$(aws mwaa list-environments | jq -r '.Environments | .[]')
export DAG_NAME=spark_pi_example
aws mwaa create-cli-token --name "${ENVIRONMENT_NAME}" | \
export CLI_TOKEN=$(jq -r .CliToken)
curl --request POST "https://${WEB_SERVER_HOSTNAME}/aws_mwaa/cli" \
--header "Authorization: Bearer ${CLI_TOKEN}" \
--header "Content-Type: text/plain" \
--data-raw "trigger_dag ${DAG_NAME}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment