Example CloudWatch log entries - Amazon Transfer Family
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Example CloudWatch log entries

This topic presents example log entries.

Example transfer sessions log entries

In this example, an SFTP user connects to a Transfer Family server, uploads a file, then disconnects from the session.

The following log entry reflects an SFTP user connecting to a Transfer Family server.

{ "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" }

The following log entry reflects the SFTP user uploading a file into their Amazon S3 bucket.

{ "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" }

The following log entries reflect the SFTP user disconnecting from their SFTP session. First, the client closes the connection to the bucket, and then the client disconnects the SFTP session.

{ "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" }

Example log entries for SFTP connectors

This section contains example logs for both a successful and an unsuccessful transfer. Logs are generated to a log group named /aws/transfer/connector-id, where connector-id is the identifier for your SFTP connector.

Note

Log entries for SFTP connectors are only generated when you execute a StartFileTransfer command.

This log entry is for a transfer that completed successfully.

{ "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" }

This log entry is for a transfer that timed out, and thus was not completed successfully.

{ "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" }

Descriptions for some key fields in the previous log examples.

  • timestamp represents when the log is added to CloudWatch. start-time and end-time correspond to when the connector actually starts and finishes a transfer.

  • transfer-id is a unique identifier that is assigned for each start-file-transfer request. If the user passes multiple file paths in a single start-file-transfer API call, all the files share the same transfer-id.

  • file-transfer-id is a unique value generated for each file transferred. Note that the initial portion of the file-transfer-id is the same as transfer-id.

Example log entries for Key exchange algorithm failures

This section contains example logs where the Key exchange algorithm (KEX) failed. These are examples from the ERRORS log stream for structured logs.

This log entry is an example where there is a host key type error.

{ "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" }

This log entry is an example where there is a KEX mismatch.

{ "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" }