Aws lambda 通过cloudformation yaml添加带有错误操作的IoT规则
我正在尝试使用以下文件添加带有错误操作的iot规则 yaml提取物:Aws lambda 通过cloudformation yaml添加带有错误操作的IoT规则,aws-lambda,yaml,amazon-cloudformation,aws-iot,Aws Lambda,Yaml,Amazon Cloudformation,Aws Iot,我正在尝试使用以下文件添加带有错误操作的iot规则 yaml提取物: DaIoTRule: Type: AWS::IoT::TopicRule Properties: RuleName: sda TopicRulePayload: RuleDisabled: false Sql: SELECT *, topic(2) AS source FROM 'topic/sensors/+' Actions:
DaIoTRule:
Type: AWS::IoT::TopicRule
Properties:
RuleName: sda
TopicRulePayload:
RuleDisabled: false
Sql: SELECT *, topic(2) AS source FROM 'topic/sensors/+'
Actions:
- Lambda:
FunctionArn: !GetAtt LambdaFunction.Arn
ErrorAction:
S3:
RoleArn: !GetAtt DAIoTRuleErrorActionIamRole.Arn
Bucket: iot-message-dump
Key: "errors/${topic()}/${timestamp()}"
但我一直在犯这样的错误:
{
"StackId": "arn:aws:cloudformation:us-east-1:961234632786:stack/wx-da-lambda/91423s00-4e97-11ea-aedd-0ee829hbc650",
"EventId": "DAIoTRule-CREATE_FAILED-2020-02-17T06:51:38.299Z",
"StackName": "da-lambda",
"LogicalResourceId": "DaIoTRule",
"PhysicalResourceId": "",
"ResourceType": "AWS::IoT::TopicRule",
"Timestamp": "2020-02-17T06:51:38.299Z",
"ResourceStatus": "CREATE_FAILED",
"ResourceStatusReason": "Encountered unsupported property bucket"
}
我创建了这个yaml作为参考
有人能指出我做错了什么吗?CloudFormation使用
BucketName
属性而不是Bucket
来执行S3操作(包括错误操作)
看