How to enable the API in AWS Managed Workflows for Apache Airflow?

Viewed 3713
2 Answers

I think MWAA provide a REST endpoint to use the CLI

https://$WEB_SERVER_HOSTNAME/aws_mwaa/cli

It's quite confusing because you fisrt need to create a cli-token using the awscli to then hit the endpoint using that token. You will need a policy to allow your awscli to request that token. Lastly there isn't support for all the commands, just a bunch.

Anyway it's all explained on the user guide https://docs.aws.amazon.com/mwaa/latest/userguide/amazon-mwaa-user-guide.pdf

By default, api.auth_backend configuration option is set to airflow.api.auth.backend.deny_all in MWAA environments. You need to override it to one of the authentication methods mentioned in the documentation as shown in the figure bellow:

enter image description here

Note: it is highly discouraged to use airflow.api.auth.backend.default as it'll leave your environment publicly accessible.

[2021/07/29] Edit: Based on this comment, AWS blocked access to the REST API.

Related