Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Add ECS Task Metadata client

オープン
#3,136 コメント 5 件 リアクション 4 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
50/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
aws, ruby
領域
cloud

調査の方向性

まず、既存の Aws::EC2Metadata クライアントと ECS Task Metadata endpoint v4 のドキュメントを読みます。クライアントが EC2 instance ID の取得をどのようにサポートしているかを追跡し、次に ECS task metadata に対応するエントリポイントと、UpdateContainerInstancesState に必要な Cluster 値を定義します。クライアントが期待されるレスポンスに対するカバレッジとともにそのデータを公開できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

cross-sdk feature-request
Describe the feature

Similar to the existing Aws::EC2Metadata client class, it would be helpful to have a metadata client class that retrieves and presents data from the ECS Task Metadata endpoint described here: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-metadata-endpoint-v4.html

While I could retrieve the response from the ECS Task Metadata endpoint and parse the Cluster field from it, having a built-in method to retrieve this would be simpler and cleaner, and is in keeping with how I get the EC2 instance ID already.

Use Case

I want to use this client class to let an application running in ECS on EC2 retrieve the name of the ECS Cluster name it is a part of, for use when calling UpdateContainerInstancesState https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_UpdateContainerInstancesState.html
. This method requires passing in the cluster name, as well as the EC2 instance ID, to set the status to a value. I want to set the status to DRAINING to prevent ECS from placing a task on an EC2 instance that is in one of the Terminating states, but ECS is not aware of this. Because I can control when an EC2 instance is put into a Terminating state, I can also put the ECS container instance state to DRAINING at the same time.

Proposed Solution

Implement similar to the Aws::EC2Metadata client class.

Other Information

No response

Acknowledgements
  • I may be able to implement this feature request
  • This feature might incur a breaking change
SDK version used

3.165.0

Environment details (OS name and version, etc.)

Ruby 3.1.2 on Linux, e.g. ruby:3.1.2-slim-bullseye from docker hub

主要言語
Ruby
スター
3.7k
フォーク
1.2k
平均マージ
1日 15時間
マージ済み PR(30日)
26

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

aws/aws-sdk-ruby のほかの issue

aws/aws-sdk-ruby の issue をすべて見る

似ている issue

Ruby の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。