> For the complete documentation index, see [llms.txt](https://help.aikido.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.aikido.dev/docs/docs-ja/mashinsukyan/aws/aws-ec2-virtual-machine-scanning-setup.md).

# AWS EC2 仮想マシンスキャンの設定

{% hint style="info" %}
この機能は以下で利用できます **Pro** および **Advanced** 有料プランのみ。 [お問い合わせください](https://www.aikido.dev/contact) 詳細については。
{% endhint %}

### 仮想マシンをスキャンする必要があるのはなぜですか？ <a href="#why-should-i-scan-my-virtual-machines" id="why-should-i-scan-my-virtual-machines"></a>

仮想マシンスキャンでは、Aikido が仮想マシンのディスクをスキャンし、脆弱なパッケージ、古いランタイム、リスクのあるライセンスを検出します。

### 開始するには <a href="#getting-started" id="getting-started"></a>

Amazon EC2 インスタンスのスキャンを有効にするには、まず AWS アカウントを Aikido に接続することから始めてください。これを行うには、 [この記事](/docs/docs-ja/kuraudosukyan/connect-your-cloud/aws/connect-aws-account-to-aikido.md).

クラウドが接続されると、詳細ページに「Virtual Machines」というタブが表示されます。

![AWS EC2 インスタンスの VM スキャンを有効にして、オープンソースの依存関係の問題を検出します。](/files/f42234c3ef92f6ea1595b67347a553627b0d6f08)

「Set Up VM Scanning」をクリックすると、次のページに移動します。

![IAM ロールとポリシー作成手順付きの AWS EC2 ボリュームスキャンのセットアップ。](/files/3307b92c22d38e14823976b274da7888add9828c)

このページでは、スキャン対象にしたい仮想マシンのアカウントに適用する必要がある AWS CloudFormation テンプレートを使って、仮想マシンスキャンを設定できます。CloudFormation テンプレートは、AWS アカウントへのアクセスを制限したロールを作成します。重要なのは **保持** ロールの権限をそのままにしておくことです。これは、Aikido がスキャンを実行するために必要な絶対最小限の権限だからです。

CloudFormation リソースが作成されると、AWS で作成されたロールの ARN が表示されます。それをコピーして、セットアップ画面の入力欄に追加してください。「保存」をクリックすると、Aikido は直ちにアカウント内の仮想マシンを検出してスキャンし始めます。<br>

### VM のグループ化 <a href="#getting-started" id="getting-started"></a>

スキャン効率を最適化するため、Aikido は特定の EC2 インスタンスをグループ化し、各グループから 1 台のインスタンスのみをスキャンします。グループ化は次のように機能します:

* **Auto Scaling Group（ASG）**：同じ AWS Auto Scaling Group にあるすべての EC2 インスタンスは、Aikido では 1 つの VM グループとして表示されます。VM グループ名は ASG 名と一致します。
* **Karpenter ノードプール**：同じ EKS クラスター内の同じ Karpenter ノードプールに属するすべての EC2 インスタンスは、まとめてグループ化されます。VM グループ名は、Karpenter が使用するインスタンス名のパターンと一致します。
* **グループ化なし**：ASG や Karpenter ノードプールの一部ではない EC2 インスタンスは、独立した VM として扱われ、個別にスキャンされます。

### スキャン対象の VM の管理 <a href="#managing-which-vms-are-scanned" id="managing-which-vms-are-scanned"></a>

Aikido は [VM スキャンの包含および除外モデルをサポートしています](/docs/docs-ja/mashinsukyan/aws/managing-which-vms-are-scanned.md).

### スキャン頻度

毎日、スキャン対象として有効になっているすべての VM の 10% が再スキャンされるため、平均すると各 VM は 10 日に 1 回スキャンされます。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.aikido.dev/docs/docs-ja/mashinsukyan/aws/aws-ec2-virtual-machine-scanning-setup.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
