Cloudwatch failedinvocation 错误没有可用的日志 [英] Cloudwatch failedinvocation error no logs available

查看:31
本文介绍了Cloudwatch failedinvocation 错误没有可用的日志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我设置了一个 Cloudwatch 规则事件,其中一个 ECS 任务定义在上一个任务定义完成时启动.

I have set up a Cloudwatch rule event where an ECS task definition is started when a previous task definition is completed.

我可以看到事件触发了任务定义,但它失败了.

I can see the event triggers the task definition however it fails.

此故障的唯一可见性是在规则指标中,我在其中看到了指标 failedinnvocations.

The only visibility of this failure is in the rule metrics, where I see the metric failedinnvocations.

问题,是否有任何日志可以查看触发器失败的原因?

Question, are there any logs to see why the trigger failed?

我可以通过管理控制台手动设置规则,一切正常.

I can manually set up the rule via the management console and everything works fine.

当我通过 cloudformation 模板设置规则时出现错误.

The error occurs when I set up the rule via a cloudformation template.

我已经比较了这两个规则,除了角色之外,两者都是相同的.但是,这两个角色具有相同的权限.

I have compared the two rules and both are identical, except the role. However, both roles have the same permissions.

推荐答案

如果规则已成功触发,但目标上的调用失败,您应该在 AWS CloudTrail 内的 Event History 中看到 API 调用的跟踪查看 errorCodeerrorMessage 属性:

If the rule has been successfully triggered, but the invocation on the target failed, you should see a trace of the API call in the Event History inside the AWS CloudTrail looking at the errorCode and errorMessage properties:

{
   [..]
   "errorCode": "InvalidInputException",
   "errorMessage": "Artifacts type is required",
   [..]
}

这篇关于Cloudwatch failedinvocation 错误没有可用的日志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆