Cline - 中文版 Docs
  • Cline Documentation
  • 入门指南
    • 快速开始
    • What is Cline?
  • Basics
    • Cline - 中文版胜算 说明文档
      • Cline 和模型上下文协议 (MCP) 服务器:提升 AI 能力
      • Interactive blocks
        • OpenAPI
      • Integrations
        • Cloud Provider Integration
        • Security Concerns
      • .clineignore 功能支持
  • Cline - 中文版胜算 说明文档
    • 什么是Cline - 胜算云增强版
    • 对于新程序员
    • 安装 Cline-胜算云增强版
    • 安装 Dev Essentials
    • 我们最喜欢的技术栈
    • 上下文管理
    • 型号选择指南
  • Getting Started
    • What is Cline?
    • For New Coders
    • Installing Cline
    • Installing Dev Essentials
    • Our Favorite Tech Stack
    • Context Management
    • Model Selection Guide
  • 提高提示技巧
    • 提示工程指南
    • Cline-胜算云增强版 内存库
  • Improving Your Prompting Skills
    • Prompt Engineering Guide
    • Cline Memory Bank
  • 探索 Cline 的工具
    • Cline-胜算云增强版 工具指南
  • 检查站
  • 计划与行动模式:有效人工智能发展指南
  • 新建任务工具
  • Remote Browser 支持
  • Exploring Cline's Tools
    • Cline Tools Guide
    • Checkpoints
    • Plan & Act Modes: A Guide to Effective AI Development
    • New Task Tool
  • Remote Browser Support
  • 企业解决方案
    • 安全问题
  • 云提供商集成
  • MCP 服务器
  • 自定义说明
  • Security Concerns
    • Security Concerns
  • Cloud Provider Integration
  • MCP Servers
  • Custom Instructions
  • MCP服务器
    • MCP概述
    • MCP市场
  • 从 GitHub 添加 MCP 服务器
  • 配置 MCP 服务器
  • 连接到远程服务器
  • MCP 传输机制
  • MCP 服务器开发协议
  • MCP Servers
    • MCP Overview
  • MCP Marketplace
  • Adding MCP Servers from GitHub
  • Configuring MCP Servers
  • Connecting to a Remote Server
  • MCP Transport Mechanisms
  • MCP Server Development Protocol
  • 自定义模型配置
    • 带有凭证身份验证的 AWS Bedrock
    • 带配置文件身份验证的 AWS Bedrock
    • GCP Vertex AI
  • LiteLLM 和 Cline-胜算云增强版(使用 Codestral)
  • Custom Model Configs
    • AWS Bedrock w/ Credentials Authentication
  • AWS Bedrock w/ Profile Authentication
  • GCP Vertex AI
  • LiteLLM & Cline (using Codestral)
  • 本地运行模型
    • 请先阅读
    • Ollama
    • LM 工作室
  • Ollama
  • LM Studio
  • Running Models Locally
  • More Info
    • Telemetry
    • 遥测
Powered by GitBook
On this page
  1. Custom Model Configs

AWS Bedrock w/ Credentials Authentication

PreviousLiteLLM 和 Cline-胜算云增强版(使用 Codestral)NextAWS Bedrock w/ Profile Authentication

Last updated 2 months ago

Overview

  • AWS Bedrock: A fully managed service that offers access to leading generative AI models (e.g., Anthropic Claude, Amazon Titan) through AWS. .

  • Cline: A VS Code extension that acts as a coding assistant by integrating with AI models—empowering developers to generate code, debug, and analyze data.

  • Enterprise Focus: This guide is tailored for organizations with established AWS environments (using IAM roles, AWS SSO, AWS Organizations, etc.) to ensure secure and compliant usage.


Step 1: Prepare Your AWS Environment

1.1 Create or Use an IAM Role/User

  1. Sign in to the AWS Management Console:

  2. Access IAM:

    • Search for IAM (Identity and Access Management) in the AWS Console.

    • Either create a new IAM user or use your enterprise’s AWS SSO to assume a dedicated role for Bedrock access.

1.2 Attach the Required Policies

  1. Attach the Managed Policy:

    • Attach the AmazonBedrockFullAccess managed policy to your user/role.

  2. Confirm Additional Permissions:

    • Ensure your policy includes permissions for model invocation (e.g., bedrock:InvokeModel and bedrock:InvokeModelWithResponseStream), model listing, and AWS Marketplace actions (like aws-marketplace:Subscribe).

    • Enterprise Tip: Apply least-privilege practices by scoping resource ARNs and using to restrict access where necessary.


Step 2: Verify Regional and Model Access

2.1 Choose and Confirm a Region

  1. Verify Model Access:

    • In the AWS Bedrock console, confirm that the models your team requires (e.g., Anthropic Claude, Amazon Titan) are marked as “Access granted.”

2.2 Set Up AWS Marketplace Subscriptions (if needed)

  1. Subscribe to Third-Party Models:

    • Navigate to the AWS Bedrock console and locate the model subscription section.

    • For models from third-party providers (e.g., Anthropic), accept the terms to subscribe.

  2. Enterprise Tip:

    • Model subscriptions are often managed centrally. Confirm with your cloud team if a standard subscription process is in place.


Step 3: Configure the Cline VS Code Extension

3.1 Install and Open Cline

  1. Install the Cline Extension:

    • Open VS Code.

    • Go to the Extensions Marketplace (Ctrl+Shift+X or Cmd+Shift+X).

    • Search for Cline and install it.

3.2 Configure Cline Settings

  1. Open Cline Settings:

    • Click on the settings ⚙️ to select your API Provider.

  2. Select AWS Bedrock as the API Provider:

    • From the API Provider dropdown, choose AWS Bedrock.

  3. Enter Your AWS Credentials:

    • Input your Access Key and Secret Key (or use temporary credentials if using AWS SSO).

    • Specify the correct AWS Region (e.g., us-east-1 or your enterprise-approved region).

  4. Select a Model:

    • Choose an on-demand model (e.g., anthropic.claude-3-5-sonnet-20241022-v2:0).

  5. Save and Test:

    • Click Done/Save to apply your settings.

    • Test the integration by sending a simple prompt (e.g., “Generate a Python function to check if a number is prime.”).


Step 4: Security, Monitoring, and Best Practices

  1. Secure Access:

    • Prefer AWS SSO/federated roles over long-lived IAM credentials.

  2. Enhance Network Security:

  3. Monitor and Log Activity:

    • Enable AWS CloudTrail to log Bedrock API calls.

    • Use CloudWatch to monitor metrics like invocation count, latency, and token usage.

    • Set up alerts for abnormal activity.

  4. Handle Errors and Manage Costs:

    • Implement exponential backoff for throttling errors.

  5. Regular Audits and Compliance:

    • Periodically review IAM roles and CloudTrail logs.

    • Follow internal data privacy and governance policies.


Conclusion

By following these steps, your enterprise team can securely integrate AWS Bedrock with the Cline VS Code extension to accelerate development:

  1. Prepare Your AWS Environment: Create or use a secure IAM role/user, attach the AmazonBedrockFullAccess policy, and ensure necessary permissions.

  2. Verify Region and Model Access: Confirm that your selected region supports your required models and subscribe via AWS Marketplace if needed.

  3. Configure Cline in VS Code: Install and set up Cline with your AWS credentials and choose an appropriate model.

  4. Implement Security and Monitoring: Use best practices for IAM, network security, monitoring, and cost management.


This guide will be updated as AWS Bedrock and Cline evolve. Always refer to the latest documentation and internal policies for up-to-date practices.

Select a Region: AWS Bedrock is available in multiple regions (e.g., US East, Europe, Asia Pacific). Choose the region that meets your latency and compliance needs.

Note: Some advanced models might require an if not available on-demand.

Install VS Code: Download from the .

Consider setting up to securely connect to Bedrock.

Use AWS Cost Explorer and set billing alerts to track usage.

For further details, consult the and coordinate with your internal cloud team. Happy coding!

Learn more about AWS Bedrock
AWS Console
AWS IAM User Guide
View AmazonBedrockFullAccess Policy Details
Service Control Policies (SCPs)
AWS Global Infrastructure
Inference Profile
AWS Marketplace
VS Code website
AWS IAM Best Practices
AWS PrivateLink
AWS Cost Management
AWS Bedrock Documentation