

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# CloudWatch 로그 항목 예
<a name="cw-example-logs"></a>

이 주제에서는 예제 로그 항목을 제공합니다.

**Topics**
+ [전송 세션 로그 항목의 예](#session-log-examples)
+ [SFTP 커넥터의 로그 항목 예](#example-sftp-connector-logs)
+ [VPC Lattice 커넥터에 대한 로그 항목 예제](#example-vpc-lattice-connector-logs)
+ [키 교환 알고리즘 실패에 대한 로그 항목 예제](#example-kex-logs)

## 전송 세션 로그 항목의 예
<a name="session-log-examples"></a>

이 예제에서 SFTP 사용자는 Transfer Family 서버에 연결하고 파일을 업로드한 다음 세션 연결을 해제합니다.

다음 로그 항목은 Transfer Family 서버에 연결하는 SFTP 사용자를 반영합니다.

```
{
   "role": "arn:aws:iam::500655546075:role/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": "/test/log-me",
   "ssh-public-key": "AAAAC3NzaC1lZDI1NTE5AAAAIA9OY0qV6XYVHaaOiWAcj2spDJVbgjrqDPY4pxd6GnHl",
   "ssh-public-key-fingerprint": "SHA256:BY3gNMHwTfjd4n2VuT4pTyLOk82zWZj4KEYEu7y4r/0",
   "ssh-public-key-type": "ssh-ed25519",
   "user": "log-me",
   "kex": "ecdh-sha2-nistp256",
   "session-id": "9ca9a0e1cec6ad9d"
}
```

다음 로그 항목은 Amazon S3 버킷에 파일을 업로드하는 SFTP 사용자를 반영합니다.

```
{
   "mode": "CREATE|TRUNCATE|WRITE",
   "path": "/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": "/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"
}
```

**참고**  
사용 가능한 활동 유형은 `AUTH_FAILURE`, , `CONNECTED`, `DISCONNECTED`, , `ERROR`, `EXIT_REASON`, `CLOSE`, `DELETE`, `CREATE_SYMLINK``MKDIR`, `OPEN`, `PARTIAL_CLOSE`, `RENAME`, `RMDIR`, `SETSTAT`입니다`TLS_RESUME_FAILURE`.

## SFTP 커넥터의 로그 항목 예
<a name="example-sftp-connector-logs"></a>

이 섹션에는 전송 성공 및 실패 모두에 대한 예제 로그가 포함되어 있습니다. 로그는 라는 로그 그룹에 생성됩니다. `/aws/transfer/connector-id`여기서 *connector-id*는 SFTP 커넥터의 식별자입니다. `StartFileTransfer` 또는 `StartDirectoryListing` 명령을 실행하면 SFTP 커넥터에 대한 로그 항목이 생성됩니다.

이 로그 항목은 성공적으로 완료된 전송을 위한 것입니다.

```
{
    "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:account-id:connector/connector-id",
    "local-directory-path": "/connectors-localbucket",
    "bytes": 514,
    "egress-type": "SERVICE_MANAGED"
}
```

이 로그 항목은 시간이 초과되어 성공적으로 완료되지 않은 전송을 위한 것입니다.

```
{
    "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:account-id:connector/connector-id",
    "local-directory-path": "/connectors-localbucket",
    "egress-type": "SERVICE_MANAGED"
}
```

이 로그 항목은 성공하는 SEND 작업을 위한 것입니다.

```
{
    "operation": "SEND",
    "timestamp": "2024-04-24T18:16:12.513207284Z",
    "connector-id": "connector-id",
    "transfer-id": "transfer-id",
    "file-transfer-id": "transfer-id/file-transfer-id",
    "url": "sftp://server-id.server.transfer.us-east-1.amazonaws.com",
    "file-path": "/amzn-s3-demo-bucket/my-test-folder/connector-metrics-us-east-1-2024-01-02.csv",
    "status-code": "COMPLETED",
    "start-time": "2024-04-24T18:16:12.295235884Z",
    "end-time": "2024-04-24T18:16:12.461840732Z",
    "account-id": "255443218509",
    "connector-arn": "arn:aws:transfer:us-east-1:account-id:connector/connector-id",
    "bytes": 275,
    "egress-type": "SERVICE_MANAGED"
}
```

이전 로그 예제의 일부 키 필드에 대한 설명입니다.
+ `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`.

## VPC Lattice 커넥터에 대한 로그 항목 예제
<a name="example-vpc-lattice-connector-logs"></a>

이 섹션에는 VPC Lattice 커넥터에 대한 예제 로그가 포함되어 있습니다. VPC Lattice 커넥터의 경우 로그에는 커넥터 구성 및 네트워크 설정에 대한 정보를 제공하는 추가 필드가 포함됩니다.

이 로그 항목은 성공적으로 완료된 VPC Lattice 커넥터 SEND 작업을 위한 것입니다.

```
{
  "operation": "SEND",
  "timestamp": "2025-09-05T14:20:19.577192454Z",
  "connector-id": "connector-id",
  "transfer-id": "transfer-id",
  "file-transfer-id": "transfer-id/file-transfer-id",
  "file-path": ""/amzn-s3-demo-bucket/my-test-folder/connector-vpc-lattice-us-east-1-2025-03-22.csv"",
  "status-code": "COMPLETED",
  "start-time": "2025-09-05T14:20:19.434072509Z",
  "end-time": "2025-09-05T14:20:19.481453346Z",
  "account-id": "account-id",
  "connector-arn": "arn:aws:transfer:us-east-1:account-id:connector/connector-id",
  "remote-directory-path": "/test-bucket/test-folder/",
  "bytes": 262,
  "egress-type": "VPC_LATTICE",
  "vpc-lattice-resource-configuration-arn": "arn:aws:vpc-lattice:us-east-1:account-id:resourceconfiguration/resource-configuration-arn-id,
  "vpc-lattice-port-number": 22
}
```

VPC Lattice 커넥터 로그에는 다음과 같은 추가 필드가 포함됩니다.
+ `egress-type` - 커넥터의 송신 구성 유형
+ `vpc-lattice-resource-configuration-arn` - 대상 SFTP 서버 위치를 정의하는 VPC Lattice 리소스 구성의 ARN
+ `vpc-lattice-port-number` - VPC Lattice를 통해 SFTP 서버에 연결하기 위한 포트 번호

## 키 교환 알고리즘 실패에 대한 로그 항목 예제
<a name="example-kex-logs"></a>

이 섹션에는 키 교환 알고리즘(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"
}
```