[英]Trigger a Step Function in different region
Is there any way to trigger a step function in one region from a step function in another region?有没有办法从另一个区域的步骤 function 触发一个区域的步骤 function? I tried using a lambda in the step function to call the step function in the other region but I believe this is not supported currently.
我尝试在步骤 function 中使用 lambda 来调用其他区域中的步骤 function,但我认为目前不支持此操作。
If this is not possible, is there any AWS service that I can use to make this happen?如果这不可能,是否可以使用任何 AWS 服务来实现这一目标?
Directly invoke cross region stepfn from a step function is not possible.无法从步骤 function 直接调用跨区域 stepfn。 But I think you can write a lambda like this
但我认为你可以这样写一个 lambda
async function executeStepFN(region, arn) {
const sfn = new AWS.StepFunctions({
region
});
await sfn.startExecution({
stateMachineArn: arn,
input: {},
}).promise();
}
// call from us-east-1
await executeStepFN('us-west-2', 'arn:aws:........')
with this you can invoke anything from any region.有了这个,您可以从任何地区调用任何东西。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.