Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions custom-agents/aws-operation-review/SYSTEM_PROMPT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ You are an AWS Operations Review Specialist focused on assessing AWS services ag

## Goal

Perform comprehensive operational reviews of AWS services (EKS clusters, RDS instances, Aurora clusters) to identify gaps in security, reliability, performance, cost optimization, and operational excellence — aligned with AWS best practices and the Well-Architected Framework.
Perform comprehensive operational reviews of AWS services (EKS clusters, RDS instances, Aurora clusters, Bedrock workloads) to identify gaps in security, reliability, performance, cost optimization, and operational excellence — aligned with AWS best practices and the Well-Architected Framework.

## Approach

1. Identify which AWS service the user wants reviewed (EKS, RDS, or Aurora).
1. Identify which AWS service the user wants reviewed (EKS, RDS, Aurora, or Bedrock).
2. Load the appropriate skill for the service:
- For EKS clusters: use the `eks-operation-review` skill methodology
- For RDS/Aurora databases: use the `rds-operation-review` skill methodology
- For Bedrock workloads: use the `bedrock-operation-review` skill methodology
3. Follow the skill's structured assessment framework to evaluate the resource.
4. For each finding, assess severity (critical, high, medium, low) based on security exposure, blast radius, and operational risk.
5. Generate actionable recommendations with clear remediation steps.
Expand Down Expand Up @@ -39,10 +40,19 @@ Before creating new recommendations, list existing recommendations and update an
### 2. Report Artifact
Generate a shareable report artifact as a Markdown document.

**Artifact naming:** `<service>-review-<resource-name>-<YYYY-MM-DD>.md`
Examples: `eks-review-prod-cluster-2026-06-21.md`, `rds-review-orders-db-2026-06-21.md`
**Defer to the selected skill's report schema.** Each operation-review skill defines
its own artifact naming and report structure (including its own pillars/categories) in
its Step "Generate Report" section — follow that schema exactly when a skill is loaded.
For example, the `bedrock-operation-review` skill organizes findings by its five
pillars (Security, Performance, Service Quotas, Cost Optimization, Resilience), not the
generic categories below. Do not force a skill's findings into the generic category set.

**Report structure:**
**Artifact naming:** use the naming defined by the selected skill. If the skill does not
specify one, fall back to `<service>-review-<resource-name>-<YYYY-MM-DD>.md`.
Examples: `eks-review-prod-cluster-2026-06-21.md`, `rds-review-orders-db-2026-06-21.md`, `bedrock-review-1234567890-us-east-1-2026-08-21.md`

**Report structure (fallback):** use the following only when the selected skill does not
define its own report structure. When it does, the skill's structure takes precedence.

```markdown
# <Service> Operational Review — <resource-name>
Expand All @@ -54,7 +64,8 @@ Account: <account-id> | Region: <region> | Date: <YYYY-MM-DD>
- Top 3 critical/high priority items

## Findings by Category
For each category (Security, Reliability, Performance, Cost, Operational Excellence):
For each category or pillar defined by the selected skill (fallback categories:
Security, Reliability, Performance, Cost, Operational Excellence):

| # | Finding | Severity | Current State | Recommendation |
|---|---------|----------|---------------|----------------|
Expand Down
1 change: 1 addition & 0 deletions llms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Skills can be used with these AWS DevOps Agent types:
- [Bedrock Adoption Readiness Skill](skills/bedrock-adoption-readiness/SKILL.md): Assesses an AWS account's readiness to run Amazon Bedrock at production scale across IAM governance, data retention (ZDR), quota and capacity headroom, and operational observability, covering both the standard Bedrock and bedrock-mantle (OpenAI-compatible) surfaces with multi-region discovery
- [Analytics OpenSearch Expertise Skill](skills/analytics-opensearch-expertise/SKILL.md): Performs read-only health assessments of Amazon OpenSearch Service domains through 24 deterministic checks across cluster health, storage and shards, performance, security, and cost optimization, producing a structured findings report with prioritized remediation guidance
- [AI/ML Access Diagnostics Skill](skills/aiml-access-diagnostics/SKILL.md): Diagnoses IAM and access failures for Amazon Bedrock and SageMaker calls by tracing the authorization chain from caller identity through iam:PassRole, role trust policy, role permissions, resource policies, and SCPs to identify which hop denied the call
- [Bedrock Operation Review Skill](skills/bedrock-operation-review/SKILL.md): Performs comprehensive Amazon Bedrock operational reviews aligned with the AWS Well-Architected Framework and Bedrock best practices across five pillars — security, performance, service quotas, cost optimization, and resilience — using control-plane and CloudWatch APIs only (no model invocations or prompt/response content read)
- [AgentCore Observability Setup Skill](skills/agentcore-observability-setup/SKILL.md): Validates and bootstraps Amazon Bedrock AgentCore observability across runtime agents, Memory and Gateway resources, built-in tools, and agents hosted outside the runtime, verifying telemetry wiring via read-only CloudWatch, X-Ray, and AgentCore APIs and prescribing exact remediation for gaps it cannot directly read

## Key Concepts
Expand Down
8 changes: 8 additions & 0 deletions skills/bedrock-operation-review/.skilleval.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
audit:
ignore:
- STR-016 # README alongside SKILL.md is intentional
# Whitelist documentation/blog domains for best practices reference (won't trigger SEC-002)
safe_domains:
- aws.amazon.com
- docs.aws.amazon.com
- repost.aws
17 changes: 17 additions & 0 deletions skills/bedrock-operation-review/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Changelog

## [1.0.0] - 2026-09-11
### Added
- Initial release adapted from AWS Support Specialist skill
- Comprehensive Amazon Bedrock operational review aligned with the AWS Well-Architected Framework and Bedrock best practices
- Five review pillars: Security, Performance, Service Quotas, Cost Optimization, and Resilience
- Resource discovery across foundation models (catalog reference only), guardrails, inference profiles, prompt routers, provisioned throughput, custom models, agents, knowledge bases, data sources, and Prompt Management (metadata only)
- Inactive-region detection based on account-owned resources and `AWS/Bedrock` metrics (the foundation-model catalog is not treated as an activity signal)
- CloudWatch metric collection and threshold-based classification (Normal/Warning/Critical) in the `AWS/Bedrock` namespace
- Service quota utilization analysis (RPM/TPM including CRIS) via Service Quotas API
- Cost optimization checks: prompt caching, model distillation, batch inference, provisioned throughput, intelligent prompt routing, and self-managed EC2 GPU utilization
- Cross-Region Inference (CRIS) adoption analysis for resilience
- Severity-ranked findings (CRITICAL, HIGH, MEDIUM, LOW, INFO) and a shareable Markdown report artifact
- AWS-API-only data collection (Bedrock, Bedrock Agent, CloudWatch, Service Quotas, EC2) with no data-plane model invocations and no prompt/response content read
- Reference files: best-practices checklist and CloudWatch metric thresholds
- Evaluation test cases (5 functional evals, 6 trigger queries)
156 changes: 156 additions & 0 deletions skills/bedrock-operation-review/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
# Bedrock Operational Review — AWS DevOps Agent Skill

A comprehensive Amazon Bedrock operational review skill for [AWS DevOps Agent](https://docs.aws.amazon.com/devopsagent/latest/userguide/about-aws-devops-agent.html). Conducts best-practices assessments aligned with the [Amazon Bedrock User Guide](https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-bedrock.html) and the [AWS Well-Architected Framework](https://docs.aws.amazon.com/wellarchitected/latest/framework/welcome.html). Generates a shareable report artifact for the review.

## What It Does

When activated via Chat, this skill instructs the DevOps Agent to:

1. Discover Bedrock resources in the configured account/regions — foundation models, guardrails, inference profiles, prompt routers, provisioned throughput, custom models, model customization jobs, agents, knowledge bases, data sources, and prompts.
2. Collect CloudWatch metrics from the `AWS/Bedrock` namespace (also `CWAgent` namespaces) for invocations, latency, throttling, errors, token usage, guardrail interventions, and prompt-cache activity.
3. Pull service quota values from Service Quotas and compare against observed usage.
4. Analyze against five pillars — **Security, Performance, Service Quotas, Cost Optimization, Resilience** — plus check-specific guidance.
5. Generate a shareable report artifact, named `bedrock-review-<account-id>-<region>-<YYYY-MM-DD>.md`.

All data is gathered through native AWS APIs (`bedrock`, `bedrockagent`, `cloudwatch`, `servicequotas`, `ec2`). The skill performs **no data-plane model invocations** and reads no prompt or response content. It does not depend on Kubernetes, EKS, or any internal tooling.

## Agent Types

This skill is intended for the following agent types (selected in the Operator Web App at upload time):

- **On-demand** — conversational invocation in Chat ("review my Bedrock account", "Bedrock health check").
- **Evaluation** — proactive operational improvement recommendations.

Select **Generic** instead if you want the skill available to all agent types.

## Prerequisites

### 1. An AWS DevOps Agent Space with the target AWS account

You need an existing [Agent Space](https://docs.aws.amazon.com/devopsagent/latest/userguide/getting-started-with-aws-devops-agent-creating-an-agent-space.html) with the target AWS account configured as a cloud source.

### 2. IAM permissions for the DevOps Agent's primary cloud-source role

The Agent Space's IAM role must have read access to Bedrock, Bedrock Agent, CloudWatch, Service Quotas, and EC2 APIs. Verify these are present in your account before running the review:

- `bedrock:ListFoundationModels`, `bedrock:ListGuardrails`, `bedrock:GetGuardrail`
- `bedrock:GetModelInvocationLoggingConfiguration`
- `bedrock:ListInferenceProfiles`, `bedrock:GetInferenceProfile`
- `bedrock:ListPromptRouters`, `bedrock:GetPromptRouter`
- `bedrock:ListProvisionedModelThroughputs`, `bedrock:GetProvisionedModelThroughput`
- `bedrock:ListCustomModels`, `bedrock:GetCustomModel`
- `bedrock:ListModelCustomizationJobs`, `bedrock:GetModelCustomizationJob`
- `bedrock:ListAgents`, `bedrock:GetAgent`, `bedrock:ListAgentAliases` (Bedrock Agent control plane)
- `bedrock:ListKnowledgeBases`, `bedrock:GetKnowledgeBase`, `bedrock:ListDataSources`, `bedrock:GetDataSource`
- `bedrock:ListPrompts` (metadata only; the skill does not call `GetPrompt`, so prompt template content is never read)
- `cloudwatch:ListMetrics`, `cloudwatch:GetMetricData`, `cloudwatch:GetMetricStatistics`
- `servicequotas:GetServiceQuota`, `servicequotas:ListServiceQuotas`
- `ec2:DescribeInstances`

The skill operates entirely in **read-only** mode: it never calls `Create*`, `Update*`, `Delete*`, or any `InvokeModel*` (data-plane) APIs.

### 3. Model invocation activity (recommended)

Most CloudWatch-based checks (latency, throttling, prompt caching, guardrail signals, cross-region inference, model versions) rely on `AWS/Bedrock` metrics, which only exist for models that have been invoked in the analysis window. Reviewing an account with no recent Bedrock traffic still produces a configuration report, but metric-driven findings will be empty.

### 4. (Conditional) CloudWatch Agent for EC2 GPU utilization

The EC2 GPU utilization check (self-managed P4/P5/P5en/P6 instances) requires the **CloudWatch Agent** installed with the **NVIDIA DCGM plugin** enabled, publishing `nvidia_smi_utilization_gpu` and `nvidia_smi_memory_util` to the `CWAgent` namespace. Without it, GPU signals cannot be evaluated. This check is optional and only applies to accounts running self-managed GPU training/inference.

## Uploading to AWS DevOps Agent

> Reference: [Uploading a skill](https://docs.aws.amazon.com/devopsagent/latest/userguide/about-aws-devops-agent-devops-agent-skills.html#uploading-a-skill)

### 1. Package the skill

Build the zip from **inside** the skill directory so `SKILL.md` sits at the archive
root (not nested under a `bedrock-operation-review/` parent), and exclude
development-only files:

```bash
cd skills/bedrock-operation-review
zip -r ../bedrock-operation-review.zip . \
-x 'README.md' 'CHANGELOG.md' '.skilleval.yaml' '.skilleval.yml' 'evals/*'
```

The resulting `bedrock-operation-review.zip` contains `SKILL.md` at the root:

```
SKILL.md # frontmatter + skill instructions (required)
references/
├── best-practices-checklist.md
└── metrics-thresholds.md
```

`README.md`, `CHANGELOG.md`, `.skilleval.yaml`, and `evals/` are development-only files
excluded from the upload — they keep the zip small and are not needed at runtime.

Constraints (enforced at upload time):

- Total zip size ≤ **6 MB**.
- `SKILL.md` is required and must include `name` and `description` frontmatter.
- A `scripts/` directory is **not** allowed — uploads containing scripts are rejected.

### 2. Upload via the Operator Web App

1. Navigate to the **Skills** page in your Agent Space Operator Web App.
2. Click **Add skill** → **Upload skill**.
3. Drag and drop `bedrock-operation-review.zip` (or browse to it).
4. Select agent types: **On-demand** and **Evaluation** (or leave **Generic** to make it available to all agent types).
5. Review the validation results.
6. Click **Upload**.

## Usage

In the DevOps Agent Chat, use natural language:

- *"Run a Bedrock operational review for all regions."*
- *"Review my Bedrock account `123456789012` in `us-east-1` for best practices."*
- *"Audit Bedrock security and cost optimization."*
- *"Check my Bedrock service quota utilization and throttling."*
- *"ORR for our Bedrock workloads."*

The agent will:

- Collect all data automatically (no prompts for confirmation).
- Use only AWS APIs — no model invocations, no prompt/response content read.
- Generate a report artifact named `bedrock-review-<account-id>-<region>-<YYYY-MM-DD>.md`.

## Skill Contents

```
bedrock-operation-review/
├── SKILL.md # main skill instructions (with frontmatter)
├── README.md # this file
├── references/
│ ├── best-practices-checklist.md # checklist mapped to Bedrock best practices
│ └── metrics-thresholds.md # CloudWatch metric thresholds & severity rules
└── evals/ # evaluation data (not included in upload zip)
```

## Best-Practices Pillars Covered

| # | Pillar | Checks | Reference |
|---|--------|--------|-----------|
| 1 | Security | Guardrails, Guardrail Signals, Model Invocation Logging, Knowledge Base config & encryption, VPC config for customization jobs, IAM fine-grained access, KB logging, Prompt injection, Model access | [Bedrock security](https://docs.aws.amazon.com/bedrock/latest/userguide/security.html) |
| 2 | Performance | Latency & Throttling, Agent Performance, Invoked Model Versions, Data Automation, Service Tier | [Monitoring Bedrock](https://docs.aws.amazon.com/bedrock/latest/userguide/monitoring.html) |
| 3 | Service Quotas | Model Quotas, Guardrail Service Quotas | [Bedrock quotas](https://docs.aws.amazon.com/bedrock/latest/userguide/quotas.html) |
| 4 | Cost Optimization | Application Inference Profiles, Custom Model Distillation, Prompt Caching, Prompt Management, Intelligent Prompt Routing, Provisioned Throughput, Batch Inference, EC2 GPU Utilization | [Bedrock pricing](https://aws.amazon.com/bedrock/pricing/) |
| 5 | Resilience | Cross-Region Inference (CRIS) | [Cross-region inference](https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference.html) |

## Severity Definitions

| Severity | Definition | SLA |
|----------|------------|-----|
| CRITICAL | Immediate risk to availability, security, or data integrity | 24–48 hours |
| HIGH | Significant gap that could lead to incidents | 1 week |
| MEDIUM | Notable improvement opportunity | 30 days |
| LOW | Minor optimization or hardening | When convenient |
| INFO | Observation, no action required | N/A |

## Non-production disclaimer

> ⚠️ This skill is sample code, not intended for production use without additional review
> and testing. Validate in a non-production environment first. Proposed IAM policies are
> suggestions derived from observed evidence — review and narrow them before applying, and
> never apply an IAM change you have not read.
Loading