无效令牌错误 Asing AWS 日志

Invalid Token Error Asing AWS logs

我已经为此奋斗了几个小时,这让我抓狂。我安装了日志代理并正确设置了它。

我可以通过这个命令访问实例。 eb ssh

然而,当我 运行 命令 sudo service awslogs restart 时,我得到了奇怪的错误,比如

 2017-06-12 16:31:41,899 - cwlogs.push.publisher - WARNING - 31909 -   
 Thread-7 - Caught exception: An error occurred 
 (UnrecognizedClientException) when calling the PutLogEvents operation: 
 The security token included in the request is invalid.

 2017-06-12 16:31:41,899 - cwlogs.threads - ERROR - 31909 - Thread-7 - 
 Exception caught in <EventBatchPublisher(Thread-7, started daemon 
 140242458298112)>

 Traceback (most recent call last):

我多次更改凭据,均无济于事。

此外,我在 awslogs.log 文件中收到此错误:

2017-06-12 16:31:40,862 - cwlogs.push.reader -
WARNING - 31909 - Thread-8 - Fall back to previous event time: 
{'timestamp': 1497246644000, 'start_position': 7142L, 'end_position': 
7246L}, previousEventTime: 1497246644000, reason: timestamp could not 
be parsed from message.

我正在使用以下格式:

[/var/log/tomcat8/catalina.out]
datetime_format = %d-%b-%Y %H:%M:%S
file = /var/log/tomcat8/catalina.out
buffer_duration = 5000
log_stream_name = {instance_id}
initial_position = start_of_file
log_group_name = Catalina

我们将不胜感激。

请将 "sudo" 附加到 "aws configure" 命令。