如何将stepfunction执行ID附加到SageMaker作业名称? [英] How to append stepfunction execution id to SageMaker job names?
问题描述
我有一个步进函数状态机,它创建了SageMaker批处理转换作业,定义是用Terraform编写的,我想将stepfunction执行ID添加到批处理转换作业名称中:
在stepfunction terraform文件中:
定义= templatefile("stepfuntion.json",{xxx)
在"stepfuntion.json"中:
{..."TransformJobName":"jobname-$$.Execution.Id",}},结束":是}}}
但是在terraform应用之后,它没有生成实际的ID,而是给了我 jobname-$$.Execution.Id
,有人可以帮忙吗?
资源: https://docs.aws.amazon.com/step-functions/latest/dg/input-output-contextobject.html 要访问上下文对象,首先要选择参数名称,方法是在末尾附加.$,就像选择带有路径的状态输入时一样.然后,要访问上下文对象数据而不是输入,请在路径前添加$$..这告诉AWS Step Functions使用该路径在上下文对象中选择一个节点.
有人可以告诉我我想念什么吗?
您尝试使用Terraform的var对此一无所知
jobname-$$.Execution.Id.
这是特定于步进"功能的东西,在状态机中可用,不适用于terraform.
I have a step function statemachine which creates SageMaker batch transform job, the definition is written in Terraform, I wanted to add the stepfunction execution id to the batch transform job names:
in stepfunction terraform file:
definition = templatefile("stepfuntion.json",
{
xxxx
)
in the "stepfuntion.json":
{...
"TransformJobName": "jobname-$$.Execution.Id",
}
},
"End": true
}
}
}
But after terraform apply, it didn't generate the actual id, it gave me jobname-$$.Execution.Id
, can anyone help with this please?
Resources: https://docs.aws.amazon.com/step-functions/latest/dg/input-output-contextobject.html "To access the context object, first specify the parameter name by appending .$ to the end, as you do when selecting state input with a path. Then, to access context object data instead of the input, prepend the path with $$.. This tells AWS Step Functions to use the path to select a node in the context object."
Can someone tell me what I'm missing please?
The var you are trying to use terraform doesn't know about it
jobname-$$.Execution.Id.
That's something specific to the Step function and available within state machine not available for terraform.
这篇关于如何将stepfunction执行ID附加到SageMaker作业名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!