Я вызываю пошаговую функцию из лямбда-функции в цикле.Однако я получаю исключение ExecutionAlreadyExistsException.Что я тут не так делаю?
[Fact]
public async void ActualSchedulingEngineStepFunctionCallTest()
{
var amazonStepFunctionsConfig = new AmazonStepFunctionsConfig { RegionEndpoint = RegionEndpoint.USWest2 };
using (var amazonStepFunctionsClient = new AmazonStepFunctionsClient(awsAccessKeyId, awsSecretAccessKey, amazonStepFunctionsConfig))
{
var input = new Input
{
ID = "24232323232323232",
Status = 1,
Type = "Interim"
};
var jsonData1 = JsonConvert.SerializeObject(input);
var startExecutionRequest = new StartExecutionRequest
{
Input = jsonData1,
Name = "SchedulingEngine",
StateMachineArn = "arn:aws:states:us-west-2:<SomeNumber>:stateMachine:SchedulingEngine"
};
var taskStartExecutionResponse = await amazonStepFunctionsClient.StartExecutionAsync(startExecutionRequest);
Assert.Equal(HttpStatusCode.OK, taskStartExecutionResponse.HttpStatusCode);
}
}
Трассировка стека:
Amazon.StepFunctions.Model.ExecutionAlreadyExistsException : Execution Already Exists: 'arn:aws:states:us-west-2:<SomeNumber>:execution:SchedulingEngine:SchedulingEngine'
---- Amazon.Runtime.Internal.HttpErrorResponseException : Exception of type 'Amazon.Runtime.Internal.HttpErrorResponseException' was thrown.