本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
CloudWatch 日志条目示例
本主题介绍示例日志条目。
传输会话日志条目示例
在此示例中,SFTP用户连接到 Transfer Family 服务器,上传文件,然后断开与会话的连接。
以下日志条目反映了连接到 Tran SFTP sfer Family 服务器的用户。
{ "role": "arn:aws:iam::500655546075:role/scooter-transfer-s3", "activity-type": "CONNECTED", "ciphers": "chacha20-poly1305@openssh.com,chacha20-poly1305@openssh.com", "client": "SSH-2.0-OpenSSH_7.4", "source-ip": "52.94.133.133", "resource-arn": "arn:aws:transfer:us-east-1:500655546075:server/s-3fe215d89f074ed2a", "home-dir": "/scooter-test/log-me", "user": "log-me", "kex": "ecdh-sha2-nistp256", "session-id": "9ca9a0e1cec6ad9d" }
以下日志条目反映了SFTP用户将文件上传到其 Amazon S3 存储桶的情况。
{ "mode": "CREATE|TRUNCATE|WRITE", "path": "/scooter-test/log-me/config-file", "activity-type": "OPEN", "resource-arn": "arn:aws:transfer:us-east-1:500655546075:server/s-3fe215d89f074ed2a", "session-id": "9ca9a0e1cec6ad9d" }
以下日志条目反映了SFTP用户与其SFTP会话断开连接的情况。首先,客户端关闭与存储桶的连接,然后断开会SFTP话。
{ "path": "/scooter-test/log-me/config-file", "activity-type": "CLOSE", "resource-arn": "arn:aws:transfer:us-east-1:500655546075:server/s-3fe215d89f074ed2a", "bytes-in": "121", "session-id": "9ca9a0e1cec6ad9d" } { "activity-type": "DISCONNECTED", "resource-arn": "arn:aws:transfer:us-east-1:500655546075:server/s-3fe215d89f074ed2a", "session-id": "9ca9a0e1cec6ad9d" }
SFTP连接器的日志条目示例
本节包含成功和不成功传输的示例日志。日志生成到名为的日志组/aws/transfer/
,其中 connector-id
connector-id
是您的SFTP连接器的标识符。
注意
SFTP连接器的日志条目仅在执行StartFileTransfer
命令时生成。
此日志条目适用于成功完成的传输。
{ "operation": "RETRIEVE", "timestamp": "2023-10-25T16:33:27.373720Z", "connector-id": "
connector-id
", "transfer-id": "transfer-id
", "file-transfer-id": "transfer-id
/file-transfer-id
", "url": "sftp://192.0.2.0", "file-path": "/remotebucket/remotefilepath", "status-code": "COMPLETED", "start-time": "2023-10-25T16:33:26.945481Z", "end-time": "2023-10-25T16:33:27.159823Z", "account-id": "480351544584", "connector-arn": "arn:aws:transfer:us-east-1:480351544584:connector/connector-id
", "local-directory-path": "/connectors-localbucket" }
此日志条目适用于超时但未成功完成的传输。
{ "operation": "RETRIEVE", "timestamp": "2023-10-25T22:33:47.625703Z", "connector-id": "
connector-id
", "transfer-id": "transfer-id
", "file-transfer-id": "transfer-id
/file-transfer-id
", "url": "sftp://192.0.2.0", "file-path": "/remotebucket/remotefilepath", "status-code": "FAILED", "failure-code": "TIMEOUT_ERROR", "failure-message": "Transfer request timeout.", "account-id": "480351544584", "connector-arn": "arn:aws:transfer:us-east-1:480351544584:connector/connector-id
", "local-directory-path": "/connectors-localbucket" }
前面日志示例中一些关键字段的描述。
-
timestamp
表示何时将日志添加到 CloudWatch。start-time
并end-time
对应于连接器实际开始和完成传输的时间。 -
transfer-id
是为每个start-file-transfer
请求分配的唯一标识符。如果用户在一次start-file-transfer
API调用中传递多个文件路径,则所有文件共享相同的路径transfer-id
。 -
file-transfer-id
是为每个传输的文件生成的唯一值。请注意,的初始file-transfer-id
部分与相同transfer-id
。
密钥交换算法失败的日志条目示例
本节包含密钥交换算法 (KEX) 失败的示例日志。这些是结构化ERRORS日志的日志流中的示例。
此日志条目是存在主机密钥类型错误的示例。
{ "activity-type": "KEX_FAILURE", "source-ip": "999.999.999.999", "resource-arn": "arn:aws:transfer:us-east-1:999999999999:server/s-999999999999999999", "message": "no matching host key type found", "kex": "ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-ed25519,ssh-rsa,ssh-dss" }
此日志条目是存在KEX不匹配的示例。
{ "activity-type": "KEX_FAILURE", "source-ip": "999.999.999.999", "resource-arn": "arn:aws:transfer:us-east-1:999999999999:server/s-999999999999999999", "message": "no matching key exchange method found", "kex": "diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group14-sha256" }