[アップデート] Amazon Qに最適なEC2インスタンスタイプを質問できる様になりました #AWSreinvent

2023.11.29

しばたです。

本日発表されたAmazon Qですが既にいろいろなAWSサービスとのインテグレーションが発表されています。

その中で「Amazon Q offers help to optimize EC2 instance type selection」というタイトルでEC2インスタンスタイプの選択をお助けしてくれる新機能を見つけたので試してみました。

はじめに

ちょっと残念なお知らせになりますが、おそらく本機能は皆さんが期待する様なものでは無さそうだと先に伝えておきます。
Amazon Qはあくまでも「自然言語による問い合わせ」というのを念頭に置いておいてください。

確認してみた

AWSのアナウンスによればマネジメントコンソールでEC2を新規作成する場合と起動テンプレートを作成するときにこの機能が使えるとのことでした。

EC2の新規作成を開始し、インスタンスタイプ欄を見てもそれっぽいものは見当たりません...

そんな感じでしばらく気が付かなかったのですが、よくみると上部に「Get advice」というリンクが増えているのを見つけました。

これをクリックするとダイアログが表示され、作るインスタンスのユースケースやワークロードを選択式で選ぶ様促されます。

「Get instance type advice」ボタンをクリックするとマネジメントコンソール右側にあるAmazon Qに質問文が設定されてお勧めを回答してくれます。

具体的な質問文と回答は以下の通りです。

質問文

質問

What are the EC2 instance families that are based on Intel platform and are best suited for deploying Web/App Server workload type for Web Hosting use case? My highest preference is for lowest cost EC2 instance families.
Use the format below to create the final output: EC2 Instance Selection Assistant recommends Instance Families: Comma separated list of recommended Instance Families only goes here.
EC2 Instance Selection Assistant reasoning for recommendations: Bullet list of step-by-step reasoning for the EC2 Instance Selection Assistant recommendations goes here. Do not skip steps.

改行は私が追加で入れています。

選択式でテンプレ文章を埋めるだけのシンプルな仕組みです。
ただ、ダイアログで選べる選択肢自体は結構多いので質問内容自体の柔軟性は高いです。

Amazon Qの回答

回答

EC2 Instance Selection Assistant recommends Instance Families: M7i, C7i

EC2 Instance Selection Assistant reasoning for recommendations:

  1. M7i and C7i are the latest generation Intel-based EC2 instance families from AWS
  2. They provide the best performance and price ratio for deploying a web/app server workload for web hosting use case
  3. Being the latest generation instances, they ensure your application runs on the most powerful and cost-effective EC2 instances from AWS
  4. Other recommended Intel-based instance families for lower cost are M7i-flex and T3. C6i and M6i provide high availability but lower performance compared to M7i and C7i
  5. You can refer to the AWS documentation for more details on the capabilities and use cases of different EC2 instance families to select the one best suited for your specific needs

質問文に

Bullet list of step-by-step reasoning for the EC2 Instance Selection Assistant recommendations goes here. Do not skip steps.

の記述があるため箇条書きで理由まで説明してくれます。
内容も特に違和感はありませんね。

起動テンプレートの場合

起動テンプレートにも同様のインスタンスタイプ選択欄があり「Get advice」のリンクが増えています。

質問ダイアログおよび生成される質問文はEC2インスタンスの場合と同じ様です。

終わりに

以上となります。

確かにAmazon Qを使っているし有用な回答をもらえて便利な機能でした。
ただ...「本機能を試すまでのワクワク感を返して欲しい。」と思ったのも偽りの無い正直な気持ちです。

愚直な仕組みですが最小のコストで最大の結果を得ていると思いますし、実運用で使うのにちょうど良い塩梅だとも思います。

インスタンスタイプで悩むことがあれば気軽にAmazon Qに聞いてみてください。