问题描述
我正在为Cloudwatch规则创建boto3,使用client.put_targets函数时出现以下错误。
raise error_class(parsed_response,operation_name)
botocore.exceptions.ClientError: An error occurred (ValidationException) when calling the PutTargets operation: Invalid InputTemplate for target GuardDuty : [Source: (String)"null is in region null"; line: 1,column: 8].
这是代码的样子
client.put_targets(Rule='GuardDutyAlarm',Targets=[{'Id': 'GuardDuty','Arn': 'arn:aws:sns:us-west-2:****:GuardDutyAlarmTeams','InputTransformer': {
'InputPathsMap': {'severity': '$.detail.severity','region': '$.region'},'InputTemplate': "<severity> is in region <region>"}}])
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)