
Amazon ECS で、短い ARN から長い ARN へのサービスの更新が可能になりました
本記事は、2025 年 2 月 13 日にAWS公式サイトの What’s New with AWS? に掲載された英語記事を自動翻訳したものです。
ニュース内容
短い Amazon リソース名 (ARN) を使用する既存の Amazon Elastic Container Service (Amazon ECS) サービスを、サービスを再作成せずに長い ARN を使用するように更新できるようになりました。これにより、長時間実行される Amazon ECS サービスにタグを付けることができるため、コストをより適切に割り当て、可視性を向上させ、これらのサービスに対するきめ細かいリソースレベルのアクセス許可を定義できます。
2018 年以降、お客様は長い ARN 形式 (ARN にクラスター名を含む) を使用する Amazon ECS サービスにタグを付けることができましたが、古い短い ARN 形式で作成されたサービスにタグを付けたい場合は、サービスを削除して再作成する必要がありました。現在、ECS では、サービスを再作成せずに、古い短い ARN 形式で作成されたサービスにタグを付けることができます。
これを有効にするには、2 つの手順を完了する必要があります。
- 1/ タスクとサービスの長い Amazon リソース名 (ARN) 形式にアカウントをオプトインする
- 2/ TagResource API アクションを使用して、長い ARN 形式に移行するサービスにタグを付けます。
これらの手順を完了すると、ECS はサービスの ARN を長い ARN 形式に更新し、サービスにタグを付けます。長い ARN 形式を使用するようにサービスを更新すると、IAM でリソースベースのアクセスポリシーを定義し、コストと使用状況レポートとコストエクスプローラーでサービスのコストを詳細に監視できるようになります。
AWS コンソール、CLI、API を使用して、すべての AWS リージョンで短い ARN のサービスを長い ARN に更新できます。詳細については、ドキュメントをご覧ください。
原文
You can now update your existing Amazon Elastic Container Service (Amazon ECS) services that use a short Amazon Resource Name (ARN) to use a long ARN without needing to re-create the service. This enables you to tag your long-running Amazon ECS services, letting you better allocate cost, improve visibility, and define fine-grained resource-level permissions for these services.
Since 2018, customers have been able to tag Amazon ECS services that use the long ARN format (which includes the cluster name in the ARN) but if they wanted to tag services that were created with the old short ARN format, they had to delete and re-create the service. Now, ECS enables you to tag services that were created with the old short ARN format without needing to re-create the service. To enable this, you need to complete 2 steps: 1/opt-in your account to the long Amazon Resource Names (ARN) format for tasks and services and 2/tag the service you want to migrate to the long ARN format using the TagResource API action. Once you complete these steps, ECS updates the ARN of the service to the long ARN format and tags the service. Updating the service to use the long ARN format allows you to define resource-based access policies in IAM and granularly monitor the cost of your services in the Cost & Usage Report and Cost Explorer.
You can update your services with short ARNs to long ARNs in all AWS regions using the AWS Console, CLI, and API. To learn more, please read our documentation.
引用元:Amazon ECS now enables you to update services from short to long ARNs