Hello i want to delete things and policies created in AWS IoT.
While deleting thing i got this error =>
The action failed because the input is not valid. Cannot delete. Thing Arduino is still attached to one or more principals
While deleting certificate i got this error => The action failed because the resource conflicts with the precondition of the action. Certificate policies must be detached before deletion
While deleting policy i got this error => Failed to delete policy. The policy cannot be deleted as the policy is attached to one or more principals (name=policyyun)
can anyone help? Thanks.
I am assuming the thing is created and it is attached to certificate along with the policy. Following is the order to follow while doing cleanup of thing. This will prevent DeleteConflictException due to associations.
ForceDelete=true
in #4)Note: You can get the array of principals(cert ARNs) associated with thing using ListThingPrincipals
p.s. The bold texts are APIs in most of the AWS IOT SDK bundles
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With