spring-attic / spring-cloud-aws

All development has moved to https://github.com/awspring/spring-cloud-aws Integration for Amazon Web Services APIs with Spring
https://awspring.io/
Apache License 2.0
589 stars 376 forks source link

Add ability to provide custom client configuration #725

Closed maciejwalkowiak closed 3 years ago

maciejwalkowiak commented 3 years ago

:loudspeaker: Type of change

:scroll: Description

One common request is to add simple way to provide custom ClientConfiguration for different integrations. This change enables users to define a bean of name com.amazonaws.ClientConfiguration.BEAN_NAME that would be by default set on all AWS clients and in addition to that, define ClientConfiguration per client.

Client-specific beans must have specific name, for example - SQS ClientConfiguration bean must be named - sqsClientConfiguration.

:bulb: Motivation and Context

Common request:

:green_heart: How did you test it?

Integration tests.

:pencil: Checklist

:crystal_ball: Next steps

eddumelendez commented 3 years ago

Currently, we have our own SpringCloudClientConfiguration which add a suffix to the user agent. By doing an injection of ClientConfiguration we will lose this. I think we can do something like RestTemplateBuilder and RestTemplateCustomizer and not lose this.

maciejwalkowiak commented 3 years ago

@eddumelendez suffix is still added: https://github.com/spring-cloud/spring-cloud-aws/pull/725/files#diff-06d076e20794983d503af739eef415c367243d9e21195c978fc8730d70209722L97

gauravbrills commented 2 years ago

@maciejwalkowiakis is there a plan to also add this to aws-paramstore as currently there isn't a way to customize this (specially in the case w need to pass custom proxy ) . Also even marking beans as primary still uses beans from the default configuration AwsParamStoreBootstrapConfiguration we have observed for ssmClient .