Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Is that skill safe to install?
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
Are you the author of Aws Bedrock?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/ashish7802-aws-bedrock)
# AWS Bedrock Runtime Skill
> **Verification Tier:** `code_example_tested` | **Last Verified:** 2026-11-18
> **Official Docs:** https://docs.aws.amazon.com/bedrock/latest/userguide/conversation-inference.html
## Overview
Amazon Bedrock provides managed access to foundation models (Anthropic Claude, Amazon Nova, Meta Llama, Mistral) inside AWS. The unified `Converse` and `ConverseStream` APIs eliminate model-specific JSON payload formatting differences across providers.
## Installation
```bash
npm install @aws-sdk/client-bedrock-runtime
pip install boto3
```
## Authentication
Use AWS IAM Roles (ECS Task Role, Lambda Execution Role, EKS IRSA, or SSO profiles) with AWS Signature Version 4. Grant least-privilege `bedrock:InvokeModel` and `bedrock:InvokeModelWithResponseStream` permissions scoped to specific model or inference profile ARNs. Never embed long-lived static `AWS_SECRET_ACCESS_KEY` values in code.
## Core Concepts
- **`ConverseCommand` / `ConverseStreamCommand`**: Unified message, system prompt, guardrail, and tool-calling contract across supported Bedrock models.
- **Cross-Region Inference Profiles**: Newer models often require inference profile IDs (e.g., `us.anthropic.claude-sonnet-4-20250514-v1:0`) rather than bare on-demand model IDs.
- **Bedrock Guardrails**: Apply server-side content filtering and PII redaction via `guardrailConfig`.
## Error Handling & Rate Limits
- Handle `ThrottlingException` (HTTP 429) and `ServiceUnavailableException` (HTTP 503) using AWS SDK adaptive retry mode (`retryMode: "adaptive"`, `maxAttempts: 5`).
- Check `response.stopReason` (`end_turn`, `tool_use`, `max_tokens`, `guardrail_intervened`).
## Security Best Practices
- Use VPC Interface Endpoints (AWS PrivateLink) to keep prompts off the public internet.
- Scope IAM policy resources to explicit model/inference-profile ARNs rather than `Resource: "*"`.
- Enable CloudWatch Model Invocation Logging only with PII-safe S3 buckets and KMS encryption.
## AI Pitfalls
- Using legacy `InvokeModelCommand` with brittle provider-specific JSON bodies instead of `ConverseCommand`.
- Passing bare foundation model IDs when the model requires a regional inference profile ID (`ValidationException`).
- Instantiating `new BedrockRuntimeClient()` inside a Lambda handler instead of reusing a module-scoped client.
## Production Checklist
- [ ] IAM role uses least-privilege model/inference-profile ARNs
- [ ] `ConverseCommand` / `ConverseStreamCommand` used with explicit `inferenceConfig.maxTokens`
- [ ] Adaptive retries enabled for `ThrottlingException`
- [ ] Region and inference profile IDs configured via environment variables
## References
- [Bedrock Converse API](https://docs.aws.amazon.com/bedrock/latest/userguide/conversation-inference.html)
- [AWS SDK v3 Bedrock Runtime](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock-runtime/)
## Related skills
- [`aws-lambda`](../aws-lambda/SKILL.md) — works well with
- [`aws-s3`](../aws-s3/SKILL.md) — works well with
- [`anthropic`](../anthropic/SKILL.md) — integrates with