How to login from cloud9 using astro cli to managed apache airflow on aws?

i m using cloud9 and want to write code in cloud9, link it to managed aws apache airflow.

inside cloud9 managed to create airflow login token with a command

aws mwaa create-cli-token --name myapache-airflow-de-project > token-airflow-cluster.txt

it creates the login token:

"CliToken": "SOmestuff",
"WebServerHostname": "some1111.us-east1.airflow.amazonaws.com"

installed astro cli on cloud9 but suspect it works only with astronomer.io based airflow clusters.

however i m trying to login using

"astro login --token-link somestuff"

it gives

You are logging into Astro via an OAuth token
This token will expire in 24 hours and will not refresh

Error: cannot retrieve userinfo: API error (401): Unauthorized

since it says “logging into astro” - this means astro cli does not work with aws managed airflow? it cant even login to there?

Hi @erjan,

astro login command is used to Authenticate to Astro Cloud UI or Astronomer Software and thereafter further interact with Astro Airflow deployments, You can read about it here - astro login | Astronomer Documentation

However, you can use Astro CLI to run a local Airflow Environment - Run your Astro project in a local Airflow environment | Astronomer Documentation