IoT GetStream request rejected for out of the range of data available.

0

Hi, I am new to IoT Core, and I am implementing MQTT-based file delivery. I created stream for the file located at S3 bucket. When I publish the request message using client to the topic $aws/things/mydevice/streams/stream12345/get/json, it publish a reject message in topic $aws/things/mydevice/streams/stream12345/rejected/json:

 {
  "code": "InvalidRequest",
  "o": "InvalidRequest",
  "message": "The data requested is out of the range of data available.",
  "m": "The data requested is out of the range of data available."
}

I have made sure that:

  1. My device environment can access such file in S3 ( I used curl <s3-object-url> and it displayed content`
  2. The stream has an role that has full IoT and S3 permissions (I know it's not recommended, but for testing, I enabled them both but still doesn't work)

Now then, I don't understand why it's out of reach. There are no questions in the forum and online, so I asked this for more info and guidance. I don't think documentation explain this well (in beginner's perspective)

Thank you for the help in advance!!!

질문됨 일 년 전248회 조회
1개 답변
2
수락된 답변

Hi. InvalidRequest is defined in the documentation as:

The request is generally identified as malformed. For more information, see the error message.

So it seems likely the payload you sent in the get is incorrect. Please review that: https://docs.aws.amazon.com/iot/latest/developerguide/mqtt-based-file-delivery-in-devices.html#mqtt-based-file-delivery-get-getstream

The AWS IoT Device SDK for Embedded C includes an OTA library that has an implementation of MQTT file streaming. It may be useful to review how it constructs a GetStream request: https://github.com/aws/ota-for-aws-iot-embedded-sdk/blob/main/source/ota_cbor.c#L238

If you are developing this in C for a device firmware update, I recommend you instead use the AWS IoT C SDK libraries.

profile pictureAWS
전문가
Greg_B
답변함 일 년 전
profile picture
전문가
검토됨 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠