如何将步进函数执行 ID 附加到 SageMaker 作业名称? [英] How to append stepfunction execution id to SageMaker job names?

本文介绍了如何将步进函数执行 ID 附加到 SageMaker 作业名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个创建 SageMaker 批量转换作业的步进函数状态机,定义是用 Terraform 编写的,我想将步进函数执行 ID 添加到批量转换作业名称中:

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:

在 stepfunction terraform 文件中:

in stepfunction terraform file:

  definition = templatefile("stepfuntion.json",
    {
      xxxx
)

在stepfuncion.json"中:

in the "stepfuntion.json":

{...
          "TransformJobName": "jobname-$$.Execution.Id",
  
          }
      },
        "End": true
      }
    }
  }

但是在 terraform apply 之后,它没有生成实际的 id,它给了我 jobname-$$.Execution.Id,有人可以帮忙吗?

But after terraform apply, it didn't generate the actual id, it gave me jobname-$$.Execution.Id, can anyone help with this please?

资源:https://docs.aws.amazon.com/step-functions/latest/dg/input-output-contextobject.html"要访问上下文对象,首先通过在末尾附加 .$ 来指定参数名称,就像选择带有路径的状态输入时所做的那样.然后,要访问上下文对象数据而不是输入,请在路径前面加上 $$.. 这告诉 AWS Step Functions 使用路径来选择上下文对象中的节点."

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?

推荐答案

您尝试使用 terraform 的 var 不知道

The var you are trying to use terraform doesn't know about it

jobname-$$.Execution.Id.

jobname-$$.Execution.Id.

这是 Step 函数特有的,在状态机中可用,但不适用于 terraform.

That's something specific to the Step function and available within state machine not available for terraform.

这篇关于如何将步进函数执行 ID 附加到 SageMaker 作业名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆