【发布时间】:2018-11-17 19:09:59
【问题描述】:
boto3 文档描述了删除作业的功能。见:https://boto3.readthedocs.io/en/latest/reference/services/iot.html#IoT.Client.delete_job
我写了一个 Lambda,可以成功地 create_job、cancel_job 和 list_job_executions_for_thing。 delete_job 函数不起作用。
使用 boto3 文档中的示例:
client=boto3.client('iot')
response = client.delete_job(
jobId='Upgrade00003',
force=True
)
给出以下错误:
{
"errorMessage": "'IoT' object has no attribute 'delete_job'",
"errorType": "AttributeError",
"stackTrace": [
[
"/var/task/lambda_function.py",
162,
"lambda_handler",
"response = client.delete_job("
],
[
"/var/runtime/botocore/client.py",
555,
"__getattr__",
"self.__class__.__name__, item)"
]
]
}
“iot:DeleteJob”也不会作为选项显示在 IAM 角色权限中。
delete_job boto3 功能不是 AWS 实现的吗?
【问题讨论】:
标签: python-3.x amazon-web-services aws-lambda boto3 aws-iot