> For the complete documentation index, see [llms.txt](https://docs.keeper.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.keeper.io/keeperpam/jp/privileged-access-manager/just-in-time-access-jit/keeper-privileged-cloud/using-privileged-cloud-to-generate-aws-sts-credentials.md).

# 特権クラウドによるAWS STS認証情報の生成

常設特権をなくし、AWSで使用するプログラム用の認証情報を取得

<figure><img src="https://859776093-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPL6k1aGsLiFiiJ3Y7zCl%2Fuploads%2Fgit-blob-a1fe9103aecfd174fcf6807e53aad394d8803efc%2Fimage%20(513).png?alt=media" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
本機能は、2026年11月のボルトバージョン18.8で利用可能になります。
{% endhint %}

### 概要 <a href="#overview" id="overview"></a>

Keeper特権クラウドでは、有効期間の短いAWS Security Token Service (STS) 認証情報により、開発者やDevOpsチームがAWSの昇格権限にジャストインタイムでアクセスできるようにします。常設特権を排除することは、侵害された認証情報の影響を抑え、不正アクセスのリスクを低減する重要なセキュリティ対策です。

開発者は、AWS CLI、スクリプト、Terraform、AWS SDKなどの既存のツールとワークフローを、ほとんど手間をかけずに引き続き使用できます。KeeperPAMゲートウェイがアクセスキーID、シークレットアクセスキー、セッショントークンからなる一時的な認証情報を生成し、Keeperがボルトを通じて安全に配信します。

本機能は、JITの一時アカウントと既存のAWSユーザーのどちらにも対応しています。

### セットアップ <a href="#setup" id="setup"></a>

* [AWS環境のセットアップ](https://docs.keeper.io/keeperpam/jp/privileged-access-manager/getting-started/pam-configuration/aws-environment-setup.md)に従ってPAM構成をセットアップし、対応するKeeperPAMゲートウェイを接続します。
* [**PAMクラウド**](https://docs.keeper.io/keeperpam/jp/privileged-access-manager/getting-started/pam-resources/pam-cloud.md)レコードを作成し、[セットアップ手順](https://docs.keeper.io/keeperpam/jp/privileged-access-manager/just-in-time-access-jit/keeper-privileged-cloud/configure-and-elevate-access-for-a-pam-cloud-resource.md)に従ってJITポリシーとワークフローポリシーを構成します。
* 一時アカウントを使用するには、レコードのJIT設定で **\[接続用に一時アカウントを作成]** をオンにし、アカウントに付与される権限を確認します。
* アクセス昇格を要求できるユーザーに、**PAMクラウド**レコードを閲覧のみの権限で共有します。

<figure><img src="https://859776093-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPL6k1aGsLiFiiJ3Y7zCl%2Fuploads%2Fgit-blob-baaef6db7540a2ad128dd0a7eb88cd792030236a%2FScreenshot%202026-10-30%20at%203.12.12%E2%80%AFPM.png?alt=media" alt="一時アカウントの作成と認証情報の生成に関するPAMクラウドリソースレコードのJIT設定"><figcaption><p>このレコードは、クラウドリソースで認証情報を生成する際に一時アカウントを使用するよう設定されています。</p></figcaption></figure>

<figure><img src="https://859776093-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPL6k1aGsLiFiiJ3Y7zCl%2Fuploads%2Fgit-blob-38d1180b514e2eaefbd0f23da404c021e4636620%2FScreenshot%202026-10-30%20at%203.19.12%E2%80%AFPM.png?alt=media" alt="認証情報の生成ボタンが表示されたPAMクラウドリソースレコード"><figcaption><p>レコードのJIT設定を保存すると、<strong>[認証情報を生成]</strong>ボタンを使用できるようになります。</p></figcaption></figure>

### 認証情報の生成 <a href="#generating-credentials" id="generating-credentials"></a>

昇格アクセスを受け取る資格のあるユーザーは、以下の手順で認証情報を生成します。

{% stepper %}
{% step %}

#### レコードを開く <a href="#open-the-record" id="open-the-record"></a>

**\[認証情報を生成]** をクリックします。
{% endstep %}

{% step %}

#### 最大15秒間待機 <a href="#wait-for-up-to-15-seconds" id="wait-for-up-to-15-seconds"></a>

認証情報が生成されると、ワンタイム共有のモーダルに表示されます。
{% endstep %}

{% step %}

#### 認証情報を保存 <a href="#save-the-credentials" id="save-the-credentials"></a>

認証情報はPAMユーザーレコードとして保存できます。STS認証情報をコピーして、適切な場所に貼り付けることもできます。
{% endstep %}
{% endstepper %}

ワークフローが有効な場合、認証情報はワークフローの終了時に自動的に失効します。

{% hint style="warning" %}
認証情報をコピーまたは保存する前にモーダルを閉じると、ワンタイム共有のため、認証情報を再表示できません。
{% endhint %}

<figure><img src="https://859776093-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPL6k1aGsLiFiiJ3Y7zCl%2Fuploads%2Fgit-blob-8e2933c0774b3822e195307eaae42abafaa0599b%2FScreenshot%202026-10-30%20at%203.16.49%E2%80%AFPM.png?alt=media" alt="ワンタイム共有のモーダルに表示された生成済みの認証情報"><figcaption><p>ユーザーアカウントが作成され、STS認証情報が生成されると、ワンタイムのモーダルで共有されます。</p></figcaption></figure>

<figure><img src="https://859776093-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPL6k1aGsLiFiiJ3Y7zCl%2Fuploads%2Fgit-blob-8bcf6a7a5359e265db6a583fd73d7d65f53d64b8%2FScreenshot%202026-10-30%20at%203.17.13%E2%80%AFPM.png?alt=media" alt="生成された認証情報をPAMユーザーレコードとして保存できるモーダル"><figcaption><p>認証情報は、アプリケーションフォルダ内の任意のサブフォルダにPAMユーザーレコードとして保存できます。</p></figcaption></figure>

### バックグラウンドでの処理 <a href="#what-happens-behind-the-scenes" id="what-happens-behind-the-scenes"></a>

{% stepper %}
{% step %}

#### 任意: 一時ユーザーアカウントを作成 <a href="#optional-an-ephemeral-user-account-is-created" id="optional-an-ephemeral-user-account-is-created"></a>

一時アカウントの場合、KeeperPAMゲートウェイはJIT設定の権限を持つ新しいユーザーをAWSに作成します。既存ユーザーの場合は、この手順をスキップします。どちらの場合も、そのユーザーがJITのロールまたはグループをまだ持っていなければ、KeeperPAMゲートウェイが追加します。
{% endstep %}

{% step %}

#### 一時アクセスキーを作成 <a href="#a-temporary-access-key-is-created" id="a-temporary-access-key-is-created"></a>

KeeperPAMゲートウェイは、ユーザーのアカウントに一時アクセスキー (トークン) を作成します。アクセスキーがないと、AWSはコンソールのログインリンクを発行しません。
{% endstep %}

{% step %}

#### AWSでSTS認証情報を生成 <a href="#sts-credentials-are-generated-in-aws" id="sts-credentials-are-generated-in-aws"></a>

KeeperPAMゲートウェイは、このアクセスキーを使用してAWSからSTS認証情報を取得します。
{% endstep %}

{% step %}

#### ワンタイムのモーダルを表示 <a href="#a-one-time-modal-is-shown" id="a-one-time-modal-is-shown"></a>

KeeperPAMゲートウェイは、STS認証情報を新しいレコードに格納し、ユーザーに共有します。一時アカウントの場合、このレコードには新しいAWSアカウントのパスワードも含まれます。
{% endstep %}
{% endstepper %}

認証情報は、JIT設定で指定した昇格時間が経過すると失効します。指定していない場合は1時間後に失効します。AWSが受け付ける期間は15分から36時間までで、この範囲外の値は最も近い上限または下限に調整されます。

ワークフローが終了すると、認証情報は有効期限前でも使用できなくなります。

<figure><img src="https://859776093-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPL6k1aGsLiFiiJ3Y7zCl%2Fuploads%2Fgit-blob-074147ce0f602544732193fa61ef6404334cba17%2FScreenshot%202026-10-30%20at%203.21.04%E2%80%AFPM.png?alt=media" alt="認証情報の生成後に、新しく作成された一時ユーザーが表示されたAWSコンソール"><figcaption><p>この例では、認証情報が要求された時点で、AWS IAMに一時ユーザーアカウントが作成されています。</p></figcaption></figure>

### STS認証情報レコードのフィールド <a href="#fields-in-the-sts-credential-record" id="fields-in-the-sts-credential-record"></a>

| フィールド                         | 説明                                                              |
| ----------------------------- | --------------------------------------------------------------- |
| Title                         | `Temporary AWS access token - <username>`                       |
| Login                         | AWSのユーザー名                                                       |
| Password                      | 一時アカウントのAWSコンソールのパスワード。既存ユーザーの場合は空                              |
| `privatePEMKey` (シークレットフィールド) | JSON形式のSTS認証情報 (`accessKeyId`、`secretAccessKey`、`sessionToken`) |
| Provider                      | `aws`                                                           |
| Notes                         | 認証情報の有効期限                                                       |

<figure><img src="https://859776093-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPL6k1aGsLiFiiJ3Y7zCl%2Fuploads%2Fgit-blob-d976f0b9f9a80852a8d1375dc27345bb8405afa9%2FScreenshot%202026-10-30%20at%203.17.35%E2%80%AFPM.png?alt=media" alt=""><figcaption></figcaption></figure>

AWS CLIで認証情報を使用するには、環境変数として設定します。

```sh
export AWS_ACCESS_KEY_ID=<accessKeyId>
export AWS_SECRET_ACCESS_KEY=<secretAccessKey>
export AWS_SESSION_TOKEN=<sessionToken>

# Confirms which AWS user you're acting as
aws sts get-caller-identity
```

### ワークフロー終了時 <a href="#when-the-workflow-ends" id="when-the-workflow-ends"></a>

ゲートウェイが作成したものを削除します。

* **一時ユーザー:** AWSからユーザーが削除され、アクセスキーと権限も一緒に削除されます。
* **既存ユーザー:** ゲートウェイは、作成したアクセスキーを削除し、追加したJITのロールまたはグループを取り除きます。ユーザーアカウント、もともとあった他のアクセスキー、ワークフロー開始前から持っていた権限はそのまま残ります。

### トラブルシューティング <a href="#troubleshooting" id="troubleshooting"></a>

#### ユーザーにすでに2つのアクセスキーがある <a href="#the-user-already-has-two-access-keys" id="the-user-already-has-two-access-keys"></a>

AWSでは、1ユーザーにつきアクセスキーは2つまでです。既存ユーザーがすでに2つ持っている場合、ゲートウェイは一時アクセスキーを追加できません。そのため、認証情報の生成は以下のエラーで失敗します。

> Can't issue session credentials: this launch credential's AWS user is already at the maximum of 2 access keys, so a temporary access key can't be created. Remove an unused access key on that IAM user and try again.

解決するには、AWSでユーザーのアクセスキーを1つ削除し (IAM > ユーザー > 対象ユーザーを選択 > セキュリティ認証情報 > アクセスキー)、もう一度実行します。削除する前に、そのキーに依存しているものがないことを確認してください。AWSは無効化したキーも上限に数えるため、キーを無効化するだけでは解決しません。

一時ユーザーでは、この問題は発生しません。アクセスキーがない状態から開始されるためです。

#### "No elevation group or role found for the resource." <a href="#no-elevation-group-or-role-found-for-the-resource" id="no-elevation-group-or-role-found-for-the-resource"></a>

レコードのJIT設定にAWSのロールまたはグループが設定されていません。ロールまたはグループを追加してから、もう一度認証情報を生成してください。


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.keeper.io/keeperpam/jp/privileged-access-manager/just-in-time-access-jit/keeper-privileged-cloud/using-privileged-cloud-to-generate-aws-sts-credentials.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
