Closed jdolan-chwy closed 1 year ago
For Secrets Manager and Parameter Store you need to configure bootstraps stage indeed. Look here https://docs.awspring.io/spring-cloud-aws/docs/3.0.0-RC1/reference/html/index.html#customizing-secretsmanagerclient
Got it, thank you!
Type: Bug
Component: Core / AutoConfiguration, Spring Boot 2.7.8, Spring Cloud AWS 3.0.0-RC
Describe the bug The documentation for 3.0.0 indicates that you can prevent Spring Cloud AWS from auto-configuring Credentials and Region by simply defining your own
@Bean
s for them:https://docs.awspring.io/spring-cloud-aws/docs/3.0.0-SNAPSHOT/reference/html/index.html#credentials
But I am finding this to not be the case. I have both
AwsCredentialsProvider
andAwsRegionProvider
beans defined in my own@Configuration
class. Other components within my application are using these beans without issue. But Spring Cloud AWS continues to auto-configure and therefore fails to bind to any AWS resources. Specifically, the secrets manager config import fails on startup Perhaps my beans are not initialized in time for Spring Cloud AWS to detect them? But.. can I influence that?Sample
Here is an approximation of my Configuration class:
For
application.yaml
, assuming the Spring Cloud AWS docs are correct, I should not need to set anything besides the endpoint, because that is the only property not covered by an explicit Provider interface (unlikeAwsCredentialsProvider
andAwsRegionProvider
):And on startup:
Are the docs accurate? Is this problem unique to
config: import..
because that happens at bootstrap? Is there a way around this?