AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::IoT::PolicyPrincipalAttachment

CfnPolicyPrincipalAttachment

Use the `AWS::IoT::PolicyPrincipalAttachment` resource to attach an AWS IoT policy to a principal (an X.509 certificate or other credential). For information about working with AWS IoT policies and principals, see [Authorization](https://docs.aws.amazon.com/iot/latest/developerguide/authorization.html) in the *AWS IoT Developer Guide* .

Import

import { CfnPolicyPrincipalAttachment } from 'aws-cdk-lib/aws-iot';

Or use the module namespace:

import * as iot from 'aws-cdk-lib/aws-iot';
// iot.CfnPolicyPrincipalAttachment

Properties

Configuration passed to the constructor as CfnPolicyPrincipalAttachmentProps.

policyNameRequired
string

The name of the AWS IoT policy.

principalRequired
string

The principal, which can be a certificate ARN (as returned from the `CreateCertificate` operation) or an Amazon Cognito ID.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter