- Newest
- Most votes
- Most comments
From the device perspective, delivering firmware using the AWS IoT Software Package Catalog is indeed very similar to handling a regular AWS IoT job. You can follow the general approach outlined in the jobs sample code, with a few considerations specific to firmware delivery:
-
Job Document: The job document for a firmware update will contain information specific to the software package, including the package name, version, and potentially a URL to download the firmware from an S3 bucket.
-
S3 Access: As you correctly noted, the device will need permissions to access the S3 bucket where the firmware is stored. This typically involves using AWS IoT credentials or other secure methods to authenticate and download the firmware.
-
Job Execution: The device should follow the standard job execution flow:
- Receive the job notification
- Download the job document
- Parse the document to extract firmware details
- Download the firmware from S3
- Install/update the firmware
- Update the job status (IN_PROGRESS, SUCCEEDED, or FAILED)
-
Reserved Named Shadow ($package): You're correct that if the $package shadow is managed by AWS IoT Core (which is the recommended approach), the device doesn't need to interact with it directly. The shadow will be automatically updated based on the job execution status.
-
Shadow Updates: If, for any reason, you decide to manage the $package shadow from the device side, you would indeed need to update it with the correct firmware version upon successful completion. This would require additional permissions for the device to publish to the shadow topics.
-
Error Handling: Implement robust error handling for scenarios such as download failures, installation issues, or version conflicts.
-
Version Verification: After updating, the device should verify that the new firmware version is correctly installed and functioning.
In summary, while the Software Package Catalog provides enhanced management capabilities on the AWS side, from the device's perspective, the process is largely similar to handling a standard IoT job. The main differences lie in the job document structure and potentially in how you handle the $package shadow if you choose to manage it from the device side.
Remember to thoroughly test your implementation, especially the error handling and recovery processes, to ensure reliable firmware updates across your device fleet.
Sources
Getting started with Software Package Catalog - AWS IoT Core
Preparing to use Software Package Catalog - AWS IoT Core
Preparing AWS IoT Jobs - AWS IoT Core
Relevant content
- asked a year ago
- AWS OFFICIALUpdated a year ago
