AWS::IoT::Logging
Configure logging.
Note
If you already set the log function of AWS IoT Core, you can't deploy the AWS Cloud Development Kit (AWS CDK) to change the logging settings. You can change the logging settings by either:
-
Importing a role into your AWS CloudFormation stack, such as with the infrastructure as code generator (IaC generator).
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::IoT::Logging", "Properties" : { "AccountId" :
String
, "DefaultLogLevel" :String
, "RoleArn" :String
} }
YAML
Type: AWS::IoT::Logging Properties: AccountId:
String
DefaultLogLevel:String
RoleArn:String
Properties
AccountId
-
The account ID.
Required: Yes
Type: String
Pattern:
^[0-9]{12}$
Minimum:
12
Maximum:
12
Update requires: Replacement
DefaultLogLevel
-
The default log level. Valid Values:
DEBUG | INFO | ERROR | WARN | DISABLED
Required: Yes
Type: String
Allowed values:
ERROR | WARN | INFO | DEBUG | DISABLED
Update requires: No interruption
RoleArn
-
The role ARN used for the log.
Required: Yes
Type: String
Minimum:
20
Maximum:
2048
Update requires: No interruption
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Ref
function, Ref
returns the log ID. For example:
{"Ref": "Log-12345"}