This module:
- creates an Amazon Managed Airflow Environment to execute DAGs created by other modules
- creates an IAM Role (the MWAA Execution Role) with least privilege permissions
- Optionally creates an S3 Bucket to store DAG artifacts
When deploying an MWAA environemnt, an S3 bucket is used to store supporting files such as requirements
, plugins
and dags
. This module will create a bucket if not one provided in the parameter dag-bucket-name
. IDF does support multiple MWAA modules in a single deployment, but due to the nature of how MWAA is managed at AWS, MWAA modules CANNOT SHARE the buckets that store the requirements
, plugins
or dags
. EACH MWAA module deployed requires a separate bucket for these artifacts.
In other words, if the dag-bucket-name
is MY_AWESOME_BUCKET_NAME
then ONLY ONE MWAA module can refer to that bucket to store dags
(as well as plugins
and requirements
). So, pick a unique bucket per MWAA module deployment.
NA
dataFiles
: User can optionally providefilePath
reference to a custom airflow requirements.txt file(available locally/remote) and should make sure to provide the value of the filepath as an environment variable underParameters
. Following is the reference implementation using dataFiles:solution-id
: a unique identifier for this deployment (must be used withsolution-description
)solution-name
: a unique name for this deployment (must be used withsolution-id
)solution-version
: a unique version for this deployment
The parameters (solution-*)
will resolve a custom text that is used as a description of the stack if populated.
name: mwaa
path: modules/orchestration/mwaa/
dataFiles:
- filePath: data/mwaa/requirements/requirements-emr-serverless.txt
parameters:
- name: custom-requirements-path
value: data/mwaa/requirements/requirements-emr-serverless.txt
vpc-id
: VPC Id where the MWAA Environment will be deployedprivate-subnet-ids
: List of Private Subnets Ids where the MWAA Environment will be deployed
dag-bucket-name
: name of the S3 Bucket to configure the MWAA Environment to monitor for DAG artifacts. An S3 Bucket is created if none is provideddag-path
: path in the S3 Bucket to configure the MWAA Environment to monitor for DAG artifacts. Defaults todags
if none is providedenvironment-class
: the MWAA Environement Instance Class. Defaults tomw1.small
if none is providedmax-workers
: the Maximum number of workers to configure the MWAA Environment to allow. Defaults to25
if none is providedairflow-version
: The Airflow version you would want to set in the module. It is defaulted to2.5.1
mwaa-requirements-file
- Support for customized requiremements file installed on MWAA- ANY file referenced MUST be located
modules/core/mwaa/requirements/*.txt
and be python requirements compliant - in if not provided, default is
requirements.txt
- ANY file referenced MUST be located
DagBucketName
: name of the S3 Bucket configured to store MWAA Environment DAG artifactsDagPath
: name of the path in the S3 Bucket configured to store MWAA Environment DAG artifactsMwaaExecRoleArn
: ARN of the MWAA Execution Role created by the Stack
{
"DagBucketName": "some-bucket",
"DagPath": "dags",
"MwaaExecRoleArn": "arn:::::"
}