You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

为何EC2实例的SSM日志存在更早日期(2024-10-09)的记录?

为什么基于自定义AMI创建的EC2实例中存在更早日期的SSM日志条目?

我是AWS云运维(CloudOps)新手,操作流程如下:

  • 10月28日:
    • 运行Terraform代码创建EC2 ImageBuilder资源(组件、镜像构建流水线等);
    • 在AWS控制台运行该镜像构建流水线生成AMI。
  • 11月1日:
    • 运行Terraform代码基于上述AMI创建EC2实例。

首次通过RDP登录EC2实例后,查看SSM日志目录:

Directory of C:\ProgramData\Amazon\SSM\Logs

10/09/2024  02:12 AM    <DIR>          .
10/09/2024  02:12 AM    <DIR>          ..
11/01/2024  05:44 PM            43,858 amazon-ssm-agent.log
10/09/2024  02:12 AM            16,811 AmazonSSMAgent-update.txt
11/01/2024  03:44 PM    <DIR>          audits
11/01/2024  03:53 PM            85,597 errors.log
11/01/2024  05:55 PM           651,241 ssm-agent-worker.log
11/01/2024  04:06 PM           488,006 ssm-document-worker.log

有趣的是,多数日志包含三个日期的条目:

2024-10-09
2024-10-28
2024-11-01

显然10月28日是AMI创建时间,11月1日是EC2实例创建时间。但为何会存在更早日期(10-09)的日志条目?

10-09的日志内容与后续日期类似,例如在amazon-ssm-agent.log中:

2024-10-09 01:36:55 INFO Starting up windows agent
2024-10-09 01:36:55 INFO Waiting for system state
2024-10-09 01:36:56 INFO System is ready
2024-10-09 01:36:56 INFO Starting up agent subsystem
2024-10-09 01:36:56 INFO Getting IE proxy configuration for current user: The operation completed successfully.
2024-10-09 01:36:56 INFO Getting WinHTTP proxy default configuration: The operation completed successfully.
2024-10-09 01:36:56 INFO Proxy environment variables:
2024-10-09 01:36:56 INFO https_proxy: 
2024-10-09 01:36:56 INFO http_proxy: 
2024-10-09 01:36:56 INFO no_proxy: 
2024-10-09 01:36:56 INFO Checking if agent identity type OnPrem can be assumed
2024-10-09 01:36:56 INFO Checking if agent identity type EC2 can be assumed
2024-10-09 01:36:56 INFO Agent will take identity from EC2
2024-10-09 01:36:56 INFO [amazon-ssm-agent] Not using named pipe on windows

内容的提问来源于stack exchange,提问作者MikeO

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.16 13:51:19