Last active
December 22, 2020 16:28
-
-
Save garystafford/8470ff86cb95a6d2fb85ae9828460051 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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