Hello,
To create a IoT Rule I see this documentation
But If I wanted to create and Action and Error Action with IoT Rule, Is there any possibility to do that?
Thanks and Regards
Syam
Hello,
To create a IoT Rule I see this documentation
But If I wanted to create and Action and Error Action with IoT Rule, Is there any possibility to do that?
Thanks and Regards
Syam
Here it is
{
“AWSTemplateFormatVersion”:“2010-09-09”,
“Resources”:{
“MyTopicRule”:{
“Type”:“AWS::IoT::TopicRule”,
“Properties”:{
“RuleName”:{
“Ref”:“NameParameter”
},
“TopicRulePayload”:{
“RuleDisabled”:“true”,
“Sql”:“SELECT temp FROM ‘SomeTopic’ WHERE temp > 60”,
“Actions”:[
{
“S3”:{
“BucketName”:{
“Ref”:“MyBucket”
},
“RoleArn”:{
“Fn::GetAtt”:[
“MyRole”,
“Arn”
]
},
“Key”:“MyKey.txt”
}
}
]
},
“MyBucket”:{
“Type”:“AWS::S3::Bucket”,
“Properties”:{
}
},
"MyRole":{
"Type":"AWS::IAM::Role",
"Properties":{
"AssumeRolePolicyDocument":{
"Version":"2012-10-17",
"Statement":[
{
"Effect":"Allow",
"Principal":{
"Service":[
"iot.amazonaws.com"
]
},
"Action":[
"sts:AssumeRole"
]
}
]
}
}
}
},
"Parameters":{
"NameParameter":{
"Type":"String"
}
}
}
}
}