AWS::IoT::LoggingConfigure logging. > If you already set the log function of AWS IoT Core , you can't deploy the Cloud Development Kit to change the logging settings. You can change the logging settings by either: > > - Importing the existing logging resource into your CloudFormation stack, such as with the [infrastructure as code generator (IaC generator)](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/generate-IaC.html) . > - Calling `aws iot set-v2-logging-options --disable-all-logs` before creating a new CloudFormation stack. This command disables all AWS IoT logging. As a result, no AWS IoT logs will be delivered to Amazon CloudWatch until you re-enable logging.
import { CfnLogging } from 'aws-cdk-lib/aws-iot';Or use the module namespace:
import * as iot from 'aws-cdk-lib/aws-iot';
// iot.CfnLoggingConfiguration passed to the constructor as CfnLoggingProps.
accountIdRequiredstringThe account ID.
defaultLogLevelRequiredstringThe default log level. Valid Values: `DEBUG | INFO | ERROR | WARN | DISABLED`
roleArnRequiredstring | IRoleRefThe role ARN used for the log.
eventConfigurationsOptionalIResolvable | IResolvable | EventConfigurationProperty[]Configurations for event-based logging that specifies which event types to log and their logging settings. Overrides account-level logging for the specified event
This L1 construct maps directly to the following CloudFormation resource type.
Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.
Subscribe to Newsletteraws-iotAWS::IoT::Logging