AWS Bedrock w/ Profile Authentication
Learn how to configure AWS Bedrock to use AWS Profiles for authentication with Cline, focusing on SSO/Federated roles for secure access.
Overview
Cline offers the option of utilizing AWS credentials or AWS profiles to access AWS Bedrock services. SSO/Federated roles are suggested over Legacy IAM configuration; this guide describes how to configure your environment so that Cline uses SSO roles for authentication.
Configuration Steps
-
Install the latest version of AWS CLI
- Follow the AWS docs to install your OS-specific version of AWS CLI
-
Configure IAM authentication with the AWS CLI
- If you do not already have AWS access through the IAM Identity Center, follow the IAM User Guide to set up IAM users and roles. Ensure you have a
PowerUserAccess
role. - If you have access to AWS through your employer, open your AWS access portal and find the appropriate account. Ensure you have
PowerUserAccess
permissions. - Open the
Access keys
link and note theSSO start URL
andSSO region
, which are needed in the next step
- If you do not already have AWS access through the IAM Identity Center, follow the IAM User Guide to set up IAM users and roles. Ensure you have a
-
Continue configuring your profile using the
aws configure sso
CLI wizard- Once configured, use the following command to authenticate the AWS CLI:
aws sso login --profile <AWS-profile-name>
- Note which profile name you attach to your AWS account, this is needed to configure Cline in the following steps
- Once configured, use the following command to authenticate the AWS CLI:
-
If you haven’t already done so, install VSCode and the Cline extension. Consult the Getting Started page for guidance.
-
Open the Cline extension, then click on the settings button ⚙️ to select your API Provider.
- From the API Provider dropdown, select AWS Bedrock
- Select the AWS Profile radio button, then enter the AWS Profile Name from step 3
- Select your AWS Region from the dropdown menu
- Selecting the cross-region inference checkbox is required for some models