无法为地形中的ECS容器配置AWS CloudWatch日志



我无法为地形中的ECS容器配置AWS CloudWatch日志。我得到:

CannotStartContainerError: Error response from daemon: failed to initialize logging driver: failed to create Cloudwatch log stream: RequestError: send request failed caused by: Post https://logs.ue-west-1.amazonaws.com/: dial tcp: lookup logs.ue-west-1.am

我的容器定义:

[{
"essential": false,
"memory": 500,
"name": "client",
"cpu": 500,
"image": "some_image",
"portMappings": [
{
"containerPort": 3000,
"hostPort": 3000
}
],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "example-production-client",
"awslogs-stream-prefix": "example-production-client",
"awslogs-region": "ue-west-1"
}
}
}]

我的地形定义看起来像:

resource "aws_cloudwatch_log_group" "example-production-client" {
name = "example-production-client"
tags = {
Environment = "production"
}
}
resource "aws_cloudwatch_log_stream" "example-production-client" {
name           = "example-production-client"
log_group_name = aws_cloudwatch_log_group.example-production-client.name
}

我在这里错过了什么?你也有同样的经历吗?

似乎您键入了不正确的区域,请将该区域更改为"us-west-1";或";eu-west-1"-

"awslogs-region": "eu-west-1"

相关内容

  • 没有找到相关文章

最新更新