- Newest
- Most votes
- Most comments
AWS IoT does not support tagging IoT Things for access control yet nor do IoT policies support conditionals, you may consider storing the metadata in Thing Attributes say companyId that can be retrieved by MQTT messages handling
Hey,
Hope you're keeping well.
AWS IoT Core doesn’t currently support resource tagging for IoT Things in a way that can be used directly in IAM condition keys like aws:ResourceTag. IoT policies also don’t have conditional logic based on Thing attributes, so you can’t natively enforce this using tags in the same way you might with S3 or Kinesis. A common pattern is to use a naming convention for Thing names or MQTT topics that embeds the companyId, and then scope the IoT policy’s iot:Publish, iot:Subscribe, etc. actions to arn:aws:iot:region:account:topic/companyId/* using ${cognito-identity.amazonaws.com:sub} or custom claims from Cognito in policy variables.
Thanks and regards,
Taz
