简体   繁体   English

AWS ECS 服务错误:必须启用任务长 arn 格式才能使用 ECS 托管标签启动服务任务

[英]AWS ECS service error: Task long arn format must be enabled for launching service tasks with ECS managed tags

I have a ECS service running in a cluster which has 1 task.我有一个运行在有 1 个任务的集群中的 ECS 服务。 Upon task update, the service suddenly died with error: 'service my_service_name failed to launch a task with (error Task long arn format must be enabled for launching service tasks with ECS managed tags.)'任务更新时,该服务突然'service my_service_name failed to launch a task with (error Task long arn format must be enabled for launching service tasks with ECS managed tags.)'并出现错误: 'service my_service_name failed to launch a task with (error Task long arn format must be enabled for launching service tasks with ECS managed tags.)'

Current running tasks are automatically drained and the above message shows up every 6 hours in the "Events" tab of the service.当前正在运行的任务会自动耗尽,并且上述消息每 6 小时在服务的“事件”选项卡中显示一次。 Any changes done to the service config does not repair the issue.对服务配置所做的任何更改都不会修复问题。 Rolling back the task update also doesn't change anything.回滚任务更新也不会改变任何东西。

I believe I'm already using the long ARN format.我相信我已经在使用长 ARN 格式了。 Looking for help.寻求帮助。

This turned out to be a AWS bug acknowledged by them now.结果证明这是他们现在承认的 AWS 错误。 It was supposed to manifest after Jan 1 2020 but appeared early because of a workflow fault in AWS.它应该在 2020 年 1 月 1 日之后出现,但由于 AWS 中的工作流故障而提前出现。

The resources were created by an IAM user who was later deleted and hence the issue appears.资源是由后来被删除的 IAM 用户创建的,因此出现了问题。

我只是从我的任务 JSON 输入中删除了以下内容:propagateTags、enableECSManagedTags

It seems like you are Tagging Your Amazon ECS Resources but you did not opt-in to this feature so you have to opt-in and I thin you are using regular expression in deployment so if your deployment mechanism uses regular expressions to parse the old format ARNs or task IDs, this may be a breaking change.似乎您正在标记您的 Amazon ECS 资源,但您没有选择加入此功能,因此您必须选择加入,我认为您在部署中使用正则表达式,因此如果您的部署机制使用正则表达式来解析旧格式ARN 或任务 ID,这可能是一个重大更改。

Starting today you can opt in to a new Amazon Resource Name (ARN) and resource ID format for Amazon ECS tasks, container instances, and services.从今天开始,您可以为 Amazon ECS 任务、容器实例和服务选择新的 Amazon 资源名称 (ARN) 和资源 ID 格式。 The new format enables the enhanced ability to tag resources in your cluster, as well as tracking the cost of services and tasks running in your cluster.新格式增强了标记集群中资源的能力,以及跟踪集群中运行的服务和任务的成本。

In most cases, you don't need to change your system beyond opting in to the new format.在大多数情况下,除了选择使用新格式之外,您无需更改系统。 However, if your deployment mechanism uses regular expressions to parse the old format ARNs or task IDs, this may be a breaking change.但是,如果您的部署机制使用正则表达式来解析旧格式的 ARN 或任务 ID,这可能是一个重大更改。 It may also be a breaking change if you were storing the old format ARNs and IDs in a fixed-width database field or data structure.如果您将旧格式的 ARN 和 ID 存储在固定宽度的数据库字段或数据结构中,这也可能是一个重大变化。

After you have opted in, any new ECS services or tasks have the new ARN and ID format.在您选择加入后,任何新的 ECS 服务或任务都具有新的 ARN 和 ID 格式。 Existing resources do not receive the new format.现有资源不会接收新格式。 If you decide to opt out, any new resources that you later create then use the old format.如果您决定退出,您以后创建的任何新资源都将使用旧格式。

You can check this AWS compute blog to migrate to new ARN.您可以查看此 AWS 计算博客以迁移到新的 ARN。

migrating-your-amazon-ecs-deployment-to-the-new-arn-and-resource-id-format-2 将您的亚马逊 ecs-deployment-migrating-to-the-new-arn-and-resource-id-format-2

Tagging Your Amazon ECS Resources标记您的 Amazon ECS 资源

To help you manage your Amazon ECS tasks, services, task definitions, clusters, and container instances, you can optionally assign your own metadata to each resource in the form of tags.为了帮助您管理 Amazon ECS 任务、服务、任务定义、集群和容器实例,您可以选择以标签的形式将自己的元数据分配给每个资源。 This topic describes tags and shows you how to create them.本主题描述标签并向您展示如何创建它们。

Important重要的

To use this feature, it requires that you opt-in to the new Amazon Resource Name (ARN) and resource identifier (ID) formats.要使用此功能,您需要选择使用新的 Amazon 资源名称 (ARN) 和资源标识符 (ID) 格式。 For more information, see Amazon Resource Names (ARNs) and IDs .有关更多信息,请参阅Amazon 资源名称 (ARN) 和 ID

ecs-using-tags ecs 使用标签

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM