in modules/monitoring/monitor_pipeline_create.py [0:0]
def example_create_data_pipeline():
"""
An example on obtaining YAML CF template from the data pipeline definition
"""
sts = boto3.client("sts")
account = sts.get_caller_identity().get("Account")
region = sts.meta.region_name
sm_role = "${SagerMakerRoleArn}"
workflow_execution_role = "${WorkflowExecutionRoleArn}"
data_pipeline_name = "${DataPipelineName}"
yaml_rep = create_monitor_pipeline(
account=account,
region=region,
sm_role=sm_role,
workflow_execution_role=workflow_execution_role,
data_pipeline_name=data_pipeline_name,
dump_yaml_file=None,
)
with open("/tmp/my_monitor_pipeline.yaml", "w") as fout:
fout.write(yaml_rep)