A team runs Apache Airflow on Amazon MWAA and wants DAG tasks to create and monitor S3 objects and start Glue jobs using AWS-aware operators. What should the team do?
Show answer and explanation
Answer: A
MWAA integrates with AWS through the Amazon provider package, which supplies operators and hooks for services such as S3, Glue and Athena. Installing the package in the environment makes these operators available to DAGs, and the environment's execution role governs permissions. Generic operators can run arbitrary code but have no AWS-aware behavior, and Jinja macros only render template values rather than calling services.
Why the other options are wrong
- B. This is incorrect. MWAA tasks call AWS APIs through provider operators and the execution role's permissions, so AWS integration is supported.
- C. Restricting DAGs to generic operators removes the AWS-specific integration the team needs. Plain Python code could work, but it misses the purpose of the request.
- D. Jinja macros render template strings such as dates into a task. They do not provide service integration, and shelling out to the CLI is a workaround rather than a feature.