I have a problem regarding the filtering things by attribute name and attribute value via aws cli.
I have two different environments and I am able to use the following cli commands in one of from them succesfully as below:
aws iot list-things
aws iot list-things --attribute-name attName --attribute-value attValue
But the problem is that altough there are data on both environments, I get an empty array when I use the second cli command above. I am suspicious about the iam policy settings of two different environments but so far I am able to list all things in both environments. Which iam policy or what configuration can affect the filtering of iot core things? Any help would be appreciated. Thanks.
Ok I have found the problem. The reason is that in one environment, all thing types are set as non-searchable. Therefore it is not possible to list non-searchable things. I recreated the things with type value as "searchable" and now I am able to list things.