プロンプトライブラリ

AWSのプロンプト

AWS 作業向けのプロンプト:最小権限の IAM ポリシー作成、アーキテクチャのレビュー、請求書からのコスト削減点の発見。

プロンプト本体は、作成・テストした言語である英語です。これらのページの説明と案内文は翻訳されています。

  • iam
  • security
  • least privilege
97/100 · 147 トークン

最小権限の IAM ポリシー

ワークロードに必要なアクションとリソースだけを許可する IAM ポリシーを書きます。

使う場面: ワイルドカードのポリシーを置き換えるとき、または新しい Lambda 関数やサービスロールの最初のポリシーを書くとき。

prompt
You are an AWS security engineer writing IAM policies.

## Task
Draft an IAM identity policy that allows exactly the access described below.

## Requirements
- Never use "*" as an action or as a whole resource.
- Scope every statement to the ARNs named in the description.
- Add a condition key wherever the description restricts access by tag, prefix, or encryption.
- Use one statement per service with a Sid that names its purpose.
- Do not grant any action the description does not require.

## Output format
Return the policy document as one fenced JSON block, followed by a table with the columns Sid, Why it is needed, and What it does not allow.

## Input
<access>
{{access}}
</access>

変数

{{access}}
ワークロードが行う必要のあること。リソース名または ARN を含めます。

入力例

access: a Lambda function reads objects under the reports/ prefix of the bucket acme-data and writes items to the DynamoDB table Orders.

出力例

```json
{ "Version": "2012-10-17", "Statement": [ { "Sid": "ReadReports", "Effect": "Allow", "Action": "s3:GetObject", "Resource": "arn:aws:s3:::acme-data/reports/*" } ] }
```
| Sid | Why it is needed | What it does not allow |
|---|---|---|
| ReadReports | Reads report files | Listing the bucket or reading other prefixes |

例示です。期待される形を示すために書いたもので、モデルが生成したものではありません。

  • architecture
  • well-architected
  • review
100/100 · 162 トークン

AWS アーキテクチャレビュー

信頼性、セキュリティ、コスト、運用の観点でアーキテクチャをレビューし、優先順位付きの指摘を返します。

使う場面: 設計レビューの前、または自分で構築していないワークロードを引き継ぐとき。

prompt
You are an AWS solutions architect reviewing a workload design.

## Task
Review the architecture described below for reliability, security, cost, and operational risks.

## Requirements
- Report only risks that follow from the description; do not assume components it does not mention.
- Rank each finding as high, medium, or low, and state the failure it leads to.
- Give one concrete change for every high finding, naming the AWS service or setting.
- List the questions you need answered where the description is not specific enough to judge.

## Output format
Return markdown with three sections: Findings (a table with the columns Area, Severity, Risk, and Recommended change), Open questions (bulleted list), and Top 3 actions (numbered list).

## Input
<architecture>
{{architecture}}
</architecture>

変数

{{architecture}}
コンポーネント、接続の仕方、使用するリージョンとゾーン、想定される負荷。

入力例

architecture: one EC2 instance in a single zone running an API, an RDS MySQL instance without Multi-AZ, and an S3 bucket for uploads.

出力例

## Findings
| Area | Severity | Risk | Recommended change |
|---|---|---|---|
| Reliability | High | A zone failure takes the API offline | Run 2 instances in an Auto Scaling group across 2 zones behind an Application Load Balancer |

例示です。期待される形を示すために書いたもので、モデルが生成したものではありません。

自分用に調整する

要件を自分の基準に合わせて編集し、結果をチェックしましょう。プロンプトアナライザーは入力に合わせて再採点し、オプティマイザーは要件を落とさずに冗長な表現を削り、セキュリティスキャナーはモデルに送る前に秘密情報や個人データを検出します。

その他のカテゴリ