【问题标题】:Spring AWS: Access denied error when deploying war on Elastic BeanstalkSpring AWS:在 Elastic Beanstalk 上部署战争时访问被拒绝错误
【发布时间】:2015-11-12 09:02:30
【问题描述】:

在 AWS EB 上使用 Spring AWS 部署战争时,我看到以下错误:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'embeddedServletContainerCustomizerBeanPostProcessor': Initialization of bean failed; 
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration': Initialization of bean failed;
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cache.annotation.ProxyCachingConfiguration': Injection of autowired dependencies failed;
nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: void org.springframework.cache.annotation.AbstractCachingConfiguration.setConfigurers(java.util.Collection);
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cloud.aws.cache.config.annotation.ElastiCacheCachingConfiguration': Injection of autowired dependencies failed;
nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.cloud.aws.core.env.stack.ListableStackResourceFactory org.springframework.cloud.aws.cache.config.annotation.ElastiCacheCachingConfiguration.stackResourceFactory;
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'stackResourceRegistryFactoryBean' defined in class path resource [org/springframework/cloud/aws/autoconfigure/context/ContextStackAutoConfiguration$StackAutoDetectConfiguration.class]: Bean instantiation via factory method failed;
nested exception is 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: User: arn:aws:sts::<id>:assumed-role/aws-elasticbeanstalk-ec2-role/<id> is not authorized to perform: cloudformation:DescribeStackResources (Service: AmazonCloudFormation; Status Code: 403; Error Code: AccessDenied; Request ID: <request-id>)

显示的用户名显然是在此过程中创建的临时用户。 不确定我需要提供哪些信息——请告诉我,我会补充。

谢谢!

【问题讨论】:

    标签: java spring amazon-web-services amazon-elastic-beanstalk


    【解决方案1】:

    这显然是由于 spring 配置文件中的问题。某些 xsd URL 无效,因此未使用提供的 aws 凭据。 修复 URL 解决了问题。

    【讨论】:

      猜你喜欢
      • 2014-10-30
      • 2017-09-01
      • 2017-04-12
      • 2015-02-04
      • 2021-10-07
      • 1970-01-01
      • 2015-09-07
      • 2014-05-06
      • 2013-04-09
      相关资源
      最近更新 更多