Spring Boot应用程序不在AWS Elastic Beanstalk中进行一次身份验证

WiscoRadio:

我有一个正在开发的适用于AWS的REST API Spring Boot应用程序。它是在本地计算机上开发的,并且通过该本地计算机,即使在本地计算机上且URL为本地主机,我们也能够提取实时AWS数据。我们已经完成了大部分开发工作,并准备将其迁移到云中。但是,现在我们创建了一个JAR,将其托管在AWS Elastic Beanstalk上,并调用了API URL,AWS现在为我们提供了500 Access Denied Error。

当前,我们的本地应用程序正在通过我们项目的application.properties文件中的变量进行身份验证。这些似乎不适用于云环境。我们还尝试将Elastic Beanstalk中的环境变量设置为与application.properties中相同的值,但是仍然返回500错误。

这是我们从AWS返回的确切错误

{
    "timestamp": "2019-07-02T20:23:31.400+0000",
    "status": 500,
    "error": "Internal Server Error",
    "message": "Access Denied (Service: S3, Status Code: 403, Request ID: 66CA2FE6CEE7A5D4)",
    "path": "/api/s3/buckets/list"
}

这是我放置安全密钥的application.properties文件

cloud.aws.credentials.accessKey=XXXXXXXXXXXXX
cloud.aws.credentials.secretKey=XXXXXXXXXXXXXXX
cloud.aws.region.static=us-east-1
Prasanth:

我认为Elastic Beanstalk可能没有读取/写入角色,因此它无法访问S3。在AWS中运行时,您不需要凭证,一切都取决于角色(权限)

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

使用AWS Elastic Beanstalk在AWS上部署Spring Boot应用程序

如何将Spring Boot应用程序大战部署到AWS Elastic Beanstalk?

AWS Elastic Beanstalk(单个实例):如何为Spring Boot应用程序启用HTTPS?

AWS CodePipeline将Spring Boot应用程序部署到Elastic BeansTalk

使用Elastic BeansTalk CLI部署Spring Boot应用程序

在Spring Boot应用程序中进行Spring Data Elastic搜索

将Spring Boot应用程序部署到Elastic Beanstalk时出现502 Bad Gateway

部署在Elastic Beanstalk Java环境上的Spring Boot应用程序返回502

AWS Elastic Beanstalk-配置我的Nginx设置以增加Java Spring Maven应用程序的超时

从AWS Elastic Beanstalk下载应用程序

使用graphql在Spring Boot中进行身份验证

使用 AWS Elastic Beanstalk 进行应用程序日志记录

Spring Boot应用程序中的LDAP身份验证

在带有Elastic Search 6.2.3的AWS EC2上运行Spring Boot 2.0.3应用程序

从Elastic Beanstalk获取正确的日志(Spring Boot)

JAR中的Spring Boot + Elastic Beanstalk .ebextensions

AWS Elastic Beanstalk-Go示例应用程序

Elastic Beanstalk AWS中的环境与应用程序

Windows身份验证(AD身份验证)到AWS Elastic Beanstalk

AWS Elastic Beanstalk上的Spring Boot并记录到文件

AWS Elastic Beanstalk:是否可以在单个git repo中包含多个Elastic Beanstalk应用程序?

在单个Web应用程序路径上进行spring-boot设置基本身份验证?

尝试访问Amazon Elastic Bean Stalk上的Spring Boot应用程序时出现错误404

通过 maven for Spring Boot 应用程序为 AWS Beanstalk 创建 .ebextensions 的正确方法是什么

创建Elastic Beanstalk应用程序失败

暂停Elastic Beanstalk应用程序环境?

使用 Logback 进行 AWS Elastic Beanstalk 应用程序日志记录

Spring Boot和Angular身份验证-如何保护应用程序的安全?

无法在Spring Boot应用程序上启用基本身份验证