-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
aws-iot: How to attach an IoT Policy to a Thing Group #26166
Comments
Thanks for the report.
Do you have any document link about this? And, can you share your CDK code that returns the error? It sounds like a limit from cloudformation so we need to make sure it does support. |
Doc: |
My code: // Create thing groups // Create IoT Policy const publishersPolicy = new aws_iot.CfnPolicy(this, 'publishersPolicy', { //Attach policy to Group pubPolicyAttachment is throwing the error at deploy time. |
As far as I know, unfortunately CloudFormation |
Added a new feature request for it: here |
Hi @raziza , I have marked this appropriately to be taken up by the cloudfomation team. Please feel free to reach out to |
Linking related issue: #18872 |
After using the above code facing the below all permission are enabled and checked its perfectly without SDK policy will attach. |
When can I expect it to be implemented in CF and CDK? |
Describe the feature
IoT Core allows to attach an IoT Policy to a Thing Group, but 'CfnPolicyPrincipalAttachment' fails at deploy time if we the pass principal as CfnThingGroup..attrArn.
The error message is:
12:12:40 PM | CREATE_FAILED | AWS::IoT::PolicyPrincipalAttachment | quarPolicyAttachment
The given ARN does not represent a cert (Service: AWSIot; Status Code: 400; Error Code: InvalidRequestException; Request ID: 8018ecbf-38ff-4493-93c8-6e3a183abb0b; Proxy: null)****
Use Case
User wants to attach an IoT Policy to a Thing Group.
One common case is to create a Quarantine group used to isolate Things with unexpected behaviour.
Proposed Solution
CfnPolicyPrincipalAttachment to accept a Thing Group ARN for a Static Group.
Other Information
No response
Acknowledgements
CDK version used
aws-cdk@2.85.0
Environment details (OS name and version, etc.)
Clou9 on Linux
The text was updated successfully, but these errors were encountered: