简体   繁体   中英

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? 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.

If this is not possible, is there any AWS service that I can use to make this happen?

Directly invoke cross region stepfn from a step function is not possible. But I think you can write a lambda like this

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM