agentleFS
Ghost7802Ghost7802/awesome-api-skills/skills/aws-bedrock/SKILL.md

aws-bedrock

Skill13 starsChanged 27 days agoMITView on GitHub

Verification Tier: code_example_tested | Last Verified: 2026-11-18 Official Docs: https://docs.aws.amazon.com/bedrock/latest/userguide/conversation-inference.html

  • Installs packages

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use AWS IAM Roles (ECS Task Role, Lambda Execution Role, EKS IRSA, or SSO profiles) with AWS Signature Version 4.

    line 16
  2. Very specific:

    Check response.stopReason (end_turn, tool_use, max_tokens, guardrail_intervened).

    line 25
  3. Distinctive:

    Use VPC Interface Endpoints (AWS PrivateLink) to keep prompts off the public internet.

    line 28

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

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

Related skills

  • aws-lambda — works well with
  • aws-s3 — works well with
  • anthropic — integrates with

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.