Amazon IoT jobs API operations - Amazon IoT Core
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Amazon IoT jobs API operations

Amazon IoT Jobs API can be used for either of the following categories:

  • Administrative tasks such as management and control of jobs. This is the control plane.

  • Devices carrying out those jobs. This is the data plane, which permits you to send and receive data.

Job management and control uses an HTTPS protocol API. Devices can use either an MQTT or an HTTPS protocol API. The control plane API is designed for a low volume of calls typical when creating and tracking jobs. It usually opens a connection for a single request, and then closes the connection after the response is received. The data plane HTTPS and MQTT API permit long polling. These API operations are designed for large amounts of traffic that can scale to millions of devices.

Each Amazon IoT Jobs HTTPS API has a corresponding command that permits you to call the API from the Amazon Command Line Interface (Amazon CLI). The commands are lowercase, with hyphens between the words that make up the name of the API. For example, you can invoke the CreateJob API on the CLI by typing:

aws iot create-job ...

If an error occurs during an operation, you get an error response that contains information about the error.

Contains information about an error that occurred during an Amazon IoT Jobs service operation.

The following example shows the syntax of this operation:

{ "code": "ErrorCode", "message": "string", "clientToken": "string", "timestamp": timestamp, "executionState": JobExecutionState }

The following is a description of this ErrorResponse:


ErrorCode can be set to:


The request was sent to a topic in the Amazon IoT Jobs namespace that doesn't map to any API operation.


The contents of the request couldn't be interpreted as valid UTF-8-encoded JSON.


The contents of the request were not valid. For example, this code is returned when an UpdateJobExecution request contains invalid status details. The message contains details about the error.


An update attempted to change the job execution to a state that is not valid because of the job execution's current state. For example, an attempt to change a request in state SUCCEEDED to state IN_PROGRESS. In this case, the body of the error message also contains the executionState field.


The JobExecution specified by the request topic doesn't exist.


The expected version specified in the request doesn't match the version of the job execution in the Amazon IoT Jobs service. In this case, the body of the error message also contains the executionState field.


There was an internal error during the processing of the request.


The request was throttled.


Occurs when a command to describe a job is performed on a job that is in a terminal state.


An error message string.


An arbitrary string used to correlate a request with its reply.


The time, in seconds since the epoch.


A JobExecutionState object. This field is included only when the code field has the value InvalidStateTransition or VersionMismatch. This makes it unnecessary in these cases to perform a separate DescribeJobExecution request to obtain the current job execution status data.