The boto3 documentation describes a function to delete a job. See: https://boto3.readthedocs.io/en/latest/reference/services/iot.html#IoT.Client.delete_job
I have written a Lambda that can successfully create_job, cancel_job, and list_job_executions_for_thing. The delete_job function doesn't work.
Using the example from the boto3 documentation:
client=boto3.client('iot')
response = client.delete_job(
jobId='Upgrade00003',
force=True
)
Gives the following error:
{
"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" also does not show up as an option in the IAM Role permissions.
Is the delete_job boto3 function not implemented by AWS?