Skip to content

Conversation

@jiangbaojun
Copy link

@jiangbaojun jiangbaojun commented Oct 28, 2025

@tzolov Update autoconfiguration, meets the requirements of three connection methods: security key, profile, and IAM Role
DefaultCredentialsProvider.create() was deprecated, replace with DefaultCredentialsProvider.builder().build()

example configuration

spring:
  ai:
    bedrock:
      aws:
        profile:
          # (require) profile name
          name: my-profile-name
          # (optional) if not declared, use ~/.aws/credentials
          credentials-path: /develop/data/aws/credentials
          # (optional) if not declared, use ~/.aws/config
          configuration-path: /develop/data/aws/config

Signed-off-by: Baojun Jiang <jiangbaojun1001@163.com>
@ericbottard ericbottard self-assigned this Oct 29, 2025
Copy link
Member

@ericbottard ericbottard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jiangbaojun,

Thanks for your contribution!

Could you please update this PR with related tests (likely in BedrockAwsConnectionConfigurationIT) and documentation changes?

return providerBuilder.profileName(profile.getName()).build();
}
// IAM Role
return DefaultCredentialsProvider.builder().build();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use an else branch to make it clear that this is the 3rd exclusive case

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I will update later

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ericbottard,
I had added tests and updated the documentation

Signed-off-by: Baojun Jiang <jiangbaojun1001@163.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants