Amazon Bedrock: AWS CLI profile (SSO)
Dline can use either AWS credentials or an AWS profile to access Amazon Bedrock. SSO / federated roles are recommended over legacy IAM configuration. This page shows how to set up your environment so that Dline authenticates with an SSO role.
-
Install the latest AWS CLI, following the AWS instructions for your operating system.
-
Configure IAM Identity Center authentication for the AWS CLI:
- If you do not yet access AWS through IAM Identity Center, follow the IAM Identity Center user guide to set up users and roles, and make sure you have a
PowerUserAccessrole. - If you access AWS through your employer, open your AWS access portal, find the right account, and confirm you have
PowerUserAccesspermissions. - Open the Access keys link and note the SSO start URL and SSO region for the next step.
- If you do not yet access AWS through IAM Identity Center, follow the IAM Identity Center user guide to set up users and roles, and make sure you have a
-
Finish configuring the profile with the
aws configure ssowizard, then sign in:Terminal window aws sso login --profile <AWS-profile-name>Note the profile name you attached to the account; you need it to configure Dline.
-
If VS Code and Dline are not installed yet, see Installing Dline first.
-
Open Dline and click the Settings button in the panel title bar:
- Set Provider to Amazon Bedrock.
- Choose AWS Profile as the authentication method and enter the profile name from step 3 under AWS Profile Name. Leave it empty to use the default profile.
- Select a region under AWS Region.
- Some models require Use cross-region inference to be checked.
Dline reads profile credentials from your AWS configuration, such as ~/.aws/credentials. When the SSO session expires, run aws sso login --profile <AWS-profile-name> again.