Noa*_*oam 5 amazon-web-services boto3 aws-step-functions
我正在尝试执行具有使用活动资源的任务的步骤函数。
运行我的代码后,我想返回一个SendTaskSuccess或SendTaskFailure
回到阶跃函数。
我偶尔收到以下错误(不到 10 秒后):
An error occurred (TaskTimedOut) when calling the SendTaskFailure operation: Task Timed Out: 'arn:aws:states:us-east-1:<....>'
Run Code Online (Sandbox Code Playgroud)
我在哪里禁用TaskTimeOut?或者我如何增加它?
更多信息
这是步骤功能代码
{
"Comment": "orchestrator-state-machine",
"StartAt": "get_data_from_lambda",
"States": {
"get_data_from_lambda": {
"Type": "Pass",
"Next": "start_task"
},
"start_task": {
"Type": "Task",
"Resource": "arn:aws:states:us-east-1:<...>",
"End": true
}
}
}
Run Code Online (Sandbox Code Playgroud)
发送成功代码
self._client = boto3.client('stepfunctions', self._region, config=Config(connect_timeout=65,read_timeout=70,region_name=self._region))
...
def task_success(self, token, result):
self.logger.info(str(token))
try:
self._client.send_task_success(taskToken=token, output=result)
self.logger.info("sending success back to step function")
except Exception as e:
self.logger.error("did not send success to step function: {0}".format(str(e)))
return True
Run Code Online (Sandbox Code Playgroud)
请求详细信息
{
'Error': {
'Message': "Task Timed Out: 'arn:aws:states:us-east-1:<....>t'",
'Code': 'TaskTimedOut'
},
'ResponseMetadata': {
'RequestId': 'b******d-755a-****-9cef-ad*******a4c',
'HTTPStatusCode': 400,
'HTTPHeaders': {
'x-amzn-requestid': 'b******d-755a-****-9cef-ad*******a4c',
'content-type': 'application/x-amz-json-1.0',
'content-length': '154'
},
'RetryAttempts': 0
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4021 次 |
| 最近记录: |