2017-05-04 83 views
2

我将消息发布到Amazon SQS队列。在启动时,我在日志中收到以下警告。亚马逊SQS传统配置文件格式警告

[http-nio-9090-exec-2][BasicProfileConfigLoader] The legacy profile format 
requires the 'profile ' prefix before the profile name. The latest code does 
not require such prefix, and will consider it as part of the profile name. 
Please remove the prefix if you are seeing this warning. 

我使用Amazon SQS以下版本与Maven:

<dependency> 
     <groupId>com.amazonaws</groupId> 
     <artifactId>aws-java-sdk-sqs</artifactId> 
     <version>1.11.125</version> 
    </dependency> 

我怎样才能摆脱这种警告?

回答

3

这很可能是指您的配置文件,其中包含您的aws凭证的一部分。如果这是你的机器上,将取决于你使用的是什么操作系统,但例如在我的Mac是在\用户\ myname.aws \ CONFIG

旧的格式是这样的(为例):

[profile <profilename>] 
region=us-east-1 
output=json 

,现在看起来应该是这样,而不是:

[<profilename>] 
region=us-east-1 
output=json 
+0

这解决了这个问题。通过从我的aws配置文件中删除“profile”一词,它从我的日志中删除了警告。在我的Windows 10机器上,aws配置位于C:\ Users \ MyName \ .aws \ config。 –