Disable Cloudformation in Spring Cloud AWS

一个人想着一个人 提交于 2019-12-19 13:02:47

问题


How can I disable the Cloudformation in a spring boot app that using spring cloud AWS?

I keep getting this error when running my app on amazon:

...
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.aws.core.env.stack.config.StackResourceRegistryFactoryBean]: Factory method 'stackResourceRegistryFactoryBean' threw exception; nested exception is com.amazonaws.AmazonServiceException: Stack for i-b5ce9e32 does not exist (Service: AmazonCloudFormation; Status Code: 400; Error Code: ValidationError; Request ID: 75b3076a-176d-11e6-90cc-b55a643dc6d6)
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189)
        at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
        ... 82 more
Caused by: com.amazonaws.AmazonServiceException: Stack for i-b5ce9e32 does not exist (Service: AmazonCloudFormation; Status Code: 400; Error Code: ValidationError; Request ID: 75b3076a-176d-11e6-90cc-b55a643dc6d6)
        at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:1389)
        at com.amazonaws.http.AmazonHttpClient.executeOneRequest(AmazonHttpClient.java:902)
        at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.ja
...

I doesn't want to use cloudformation. (At least for now.)


回答1:


I have the following line in my application.properties (spring boot) file

cloud.aws.stack.auto=false

Official documentation: 4.4. CloudFormation configuration in Spring Boot



来源:https://stackoverflow.com/questions/37161989/disable-cloudformation-in-spring-cloud-aws

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!