ECS Container logs cannot be displayed if the log group is in a different region

0

If I have a task definition where the log group is defined in a different region, the ECS logs UI shows an error when trying to view these logs:

There was an error while retrieving logs from log group: lxp-production. The specified log group does not exist.

The log group exists and logs are being stored as expected.

Could this be an IAM issue or an issue in the UI itself?

2 個答案
0

Hello.

Probably, but I think that in order to check the logs from the ECS console, they need to be output to the CloudWatch Logs log group in the same region.
We have confirmed that you can view log groups if you create them in the same region as your ECS cluster.
Therefore, I think that the UI side is probably set so that it cannot be obtained unless it is in the same region.

If you look at Google Chrome's developer tools, you can see that the following URL is being accessed.
In my environment, I have an ECS cluster in the Tokyo region, so I can see that I am accessing "ap-northeast-1".

https://logs.ap-northeast-1.amazonaws.com/
profile picture
專家
已回答 4 個月前
profile pictureAWS
專家
已審閱 4 個月前
0

Hi,

What you are trying to achieve is not possible due to Region Isolation:

All Regions currently have three or more Availability Zones. Regions themselves are isolated 
and independent from other Regions with a few exceptions noted later in this document 
(refer to Global single-Region operations). This separation between Regions limits service failures, 
when they occur, to a single Region. Other Regions’ normal operations are unaffected in this case. 
Additionally, the resources and data that you create in one Region do not exist in any other Region 
unless you explicitly use a replication or copy feature offered by an AWS service or replicate the resource yourself.

See https://docs.aws.amazon.com/whitepapers/latest/aws-fault-isolation-boundaries/regions.html

The idea is that each region must be able to operate without any dependence on any other region. Additionally, it has compliance requirements: lots of customers wants to be sure that 100% of their data (even logs) in contained in one single region and cannot be spread all around.

To match your needs, you may want to use the cross-region (and cross-account) CloudWatch console: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html

Best,

Didier

profile pictureAWS
專家
已回答 4 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南