Disable Spring Cloud AWS autoconfiguration for local development
I've solved this for tests using the surefire plugin:
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.21.0</version> <configuration> <classpathDependencyExcludes> <classpathDependencyExcludes>org.springframework.cloud:spring-cloud-aws-autoconfigure</classpathDependencyExcludes> </classpathDependencyExcludes> </configuration></plugin>
Local development was solved setting the following variables as VM parameters or in the Spring Cloud Config Server:
cloud.aws.region.auto=falsecloud.aws.region.static=us-east-1
You can use any value for cloud.aws.region.static
, but there has to be one.
I read both solutions in different places and thought it might help someone in the future to see them combined here.