AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::IoT::Policy

CfnPolicy

Use the `AWS::IoT::Policy` resource to declare an AWS IoT policy. For more information about working with AWS IoT policies, see [Authorization](https://docs.aws.amazon.com/iot/latest/developerguide/authorization.html) in the *AWS IoT Developer Guide* .

Import

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

Or use the module namespace:

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

Properties

Configuration passed to the constructor as CfnPolicyProps.

policyDocumentRequired
any

The JSON document that describes the policy.

policyNameOptional
string

The policy name.

tagsOptional
CfnTag[]

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