【问题标题】:Disable Cloudformation in Spring Cloud AWS在 Spring Cloud AWS 中禁用 Cloudformation
【发布时间】:2016-09-06 19:35:52
【问题描述】:

如何在使用 Spring Cloud AWS 的 Spring Boot 应用中禁用 Cloudformation?

在亚马逊上运行我的应用时,我不断收到此错误:

...
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
...

我不想使用 cloudformation。 (至少现在是这样。)

【问题讨论】:

    标签: java spring amazon-web-services spring-cloud spring-cloud-aws


    【解决方案1】:

    我的application.properties (spring boot) 文件中有以下行

    cloud.aws.stack.auto=false
    

    官方文档:4.4. CloudFormation configuration in Spring Boot

    【讨论】:

    • 非常感谢!第二行不是必需的。
    • @LakatosGyula 确实,我刚刚发现它是用于本地测试的。将其移至本地测试配置文件
    猜你喜欢
    • 1970-01-01
    • 2017-03-12
    • 1970-01-01
    • 2017-01-07
    • 2021-04-28
    • 2018-11-18
    • 2020-09-06
    • 2020-04-21
    • 1970-01-01
    相关资源
    最近更新 更多