When I delete an asset in AWS IoT SiteWise and try to recreate the asset, I get an error.
Short description
When you recreate an asset in AWS IoT SiteWise with the same Asset ID as a deleted asset, you get the following error message:
"ASSET ID is already used within this account. Submit CREATE_ASSET again with a unique ASSET ID at de_ResourceAlreadyExistsExceptionRes"
For Asset IDs, you must have a unique global ID for each asset. The IDs of deleted assets are reserved to prevent potential data issues, and therefore you can't reuse them.
Resolution
By default, AWS IoT SiteWise automatically generates a unique ID for your assets that is globally unique across your AWS Account. When you use the custom ID assignment feature, you manually assign an ID to your asset.
Follow these best practices for assets with custom IDs:
- Use the default behavior and let AWS generate the IDs for your assets.
- If you use a custom ID, then your custom ID must follow the UUID format.
- To prevent conflicts, monitor your asset ID names.
Note: It's a best practice to monitor your custom IDs. To find your custom IDs, use the DescribeAssetModel API.