Skip to content

Conversation

@jiangbaojun
Copy link
Contributor

@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

@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
Contributor 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
Contributor 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

@jiangbaojun jiangbaojun marked this pull request as draft October 31, 2025 04:39
@jiangbaojun jiangbaojun marked this pull request as ready for review October 31, 2025 04:39
@jiangbaojun jiangbaojun closed this Nov 6, 2025
@jiangbaojun jiangbaojun force-pushed the bedrock_connection_config branch from 359eb28 to e464266 Compare November 6, 2025 01:05
@jiangbaojun jiangbaojun reopened this Nov 6, 2025
@jiangbaojun
Copy link
Contributor Author

@ericbottard I've finished updating. Could you review it at your convenience?

@ericbottard ericbottard changed the title Add bedrock profile autoconfiguration support and replace deprecated (R) Add bedrock profile autoconfiguration support and replace deprecated Nov 12, 2025
@jiangbaojun
Copy link
Contributor Author

@ericbottard I saw you prefixed the title with (R). What does it mean? Is there anything I can do?

@ericbottard
Copy link
Member

@ericbottard I saw you prefixed the title with (R). What does it mean? Is there anything I can do?

Hi @jiangbaojun,
sorry for the confusion. This is a marker to let us remember that this PR was (almost) ready to merge, but as we were in the middle of initiating boot 4.0 support in main, this has been put on hold. Expect this to appear in 2.0.0.M1 soon!

@ericbottard
Copy link
Member

Merged to main as 552263d

@ericbottard ericbottard added this to the 2.0.0.M1 milestone Nov 20, 2025
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