Investigating file transfer service issues
This guide is for Integration Hub technical team members investigating a file in the Integration Hub file transfer service that has not reached its expected destination. It covers finding where the file stopped. For dead-letter queue (DLQ) messages, see Investigating and replaying file transfer DLQ messages.
Collect the file details
Before investigating, obtain the environment, username, object key or file name, upload timestamp with time zone, and the client’s protocol. Where possible, obtain the S3 object version ID. Search using the object key and version ID rather than just the file name, as different users can upload files with the same name.
Once you find a canonical event, use detail.metadata.correlationId as the
primary search key for the rest of the investigation. Search event-bus logs for
that value and Lambda logs for correlation_id. Record the identifiers below
alongside the exact S3 object versions.
Lifecycle identifiers
| Field | Meaning |
|---|---|
detail.data.fileId |
Stable logical file identifier, created at ingress and preserved in later events. |
detail.metadata.correlationId |
Groups all events and action requests for one file lifecycle. Currently equal to fileId, but a separate tracing concept. |
detail.metadata.causationId |
Top-level EventBridge id of the event that caused this event. FileReceived.v1 has no causation ID. |
detail.metadata.idempotencyKey |
Deterministic producer-operation identity that consumers must use to deduplicate retries. |
Top-level EventBridge id
|
Identifies one event envelope, not the logical file. Separate publications can have different IDs for the same operation. |
At ingress, the file-received adapter derives fileId and correlationId as a
deterministic UUID from the incoming bucket, key and exact S3 version ID. Its
idempotency key is bucket:key:versionId. Two uploads to the same key remain
distinct files.
AWS Lambda Powertools deduplicates retries of the same native EventBridge event ID. S3 can emit separate notifications for one object version; these have different EventBridge IDs but produce the same stable file identity. Delivery is at least once.
Trace the file through the service
Use the file’s object key, version ID and timestamp to work through these stages in order:
- AWS Transfer Family and incoming bucket: confirm that the AWS Transfer
Family server accepted the upload. Check the structured Transfer log group,
/aws/transfer/integration-hub-file-transfer. If staging has not completed, check for the expected object version inincoming; successful staging deletes that exact source version. - File received event: check the default EventBridge rule named
incoming-s3-object-createdand theintegration-hub-file-transfer-file-received-adapterLambda log group. This adapter converts the S3 notification into the canonicalFileReceived.v1event. - Staging: check the
integration-hub-file-transferEventBridge bus for theFileReceived.v1event and theintegration-hub-file-transfer-stageLambda log group. The stage function copies the exact object version fromincomingto theprocessingbucket, where it is prepared for scanning. - Malware scan: inspect the object in the
processingbucket and its GuardDuty Malware Protection tags. Check the default EventBridge rule namedguardduty-malware-scan-resultand theintegration-hub-file-transfer-file-scan-result-recorded-adapterLambda log group. The adapter publishesFileScanResultRecorded.v1after associating the scan result with the staged file. - Routing: check the
FileScanResultRecorded.v1event on theintegration-hub-file-transferEventBridge bus and theintegration-hub-file-transfer-routeLambda log group. The route function moves the exact processing-object version toclean,quarantineorinvestigationstorage. - Clean-file action: for a file in the
cleanbucket, check theFileRouted.v1event and thefile-action-execution-requested-adapterLambda log group. The adapter finds the most specific dispatch configuration for the object key and publishes aFileActionExecutionRequested.v1event when an action or notification is configured. See File action dispatch for matching, no-op and retry behaviour.
The EventBridge bus writes full event details to the CloudWatch log group:
/aws/vendedlogs/events/event-bus/integration-hub-file-transfer
This is useful when the Lambda logs show that an expected event was not received. EventBridge also retains an archive of file-transfer events for the configured log-retention period.
To reconstruct causality, start with FileReceived.v1 and find events whose
causationId matches the preceding EventBridge ID. Compare fileId,
correlationId and idempotencyKey when events appear duplicated: matching
values identify retries of the same logical operation, while different source
version IDs identify distinct uploads.
Staging and routing guarantees
The STAGE mover claims a leased DynamoDB operation record for the correlation
ID and STAGE. The table calls its partition key concurrencyId; its value is
the lifecycle’s correlationId. Existing records are checked against immutable
source fields before the operation can resume.
STAGE copies the exact incoming version to the same key in processing. Every
positive-size object uses multipart copy, including a one-byte object; a
legitimate zero-byte business object uses CopyObject. The mover preserves
user metadata, tags and supported content headers, adds reserved correlation
and copy-token metadata, and applies the processing bucket’s SSE-KMS key. It
verifies the exact destination version before deleting only the exact source
version.
When STAGE receipts are enabled, a receipt is created only after source
deletion. An incoming object is exempt as an existing receipt only when its key
ends in .receipt and that exact version has the tag Receipt=TRUE.
FileStagedForScanning.v1 retains the original fileId and correlationId,
records the FileReceived.v1 EventBridge ID as causationId, and includes both
exact S3 versions.
The GuardDuty adapter reads mft-correlation-id from the exact processing
version and requires the durable STAGE record to be COMPLETED before
publishing terminal scan outcomes as FileScanResultRecorded.v1.
The ROUTE mover claims a separate record for the correlation ID and ROUTE.
The canonical event’s detail.data.scanResultStatus selects the destination:
| Scan result | Route |
|---|---|
NO_THREATS_FOUND |
clean |
THREATS_FOUND |
quarantine |
UNSUPPORTED, ACCESS_DENIED or FAILED
|
investigation |
scanResultStatusMatchesTag preserves diagnostic provenance from the adapter.
A mismatch overrides the reported scan result and sends the object to
investigation. Do not change a GuardDuty result tag to force a route.
ROUTE copies and verifies the exact processing version with destination
SSE-KMS encryption before deleting that source version. Its FileRouted.v1
event has the idempotency key
route:{route}:{destinationBucket}:{key}:{destinationVersionId}.
A retry resumes the recorded multipart upload, destination version or later checkpoint instead of restarting the move. Idempotency records expire after 30 days in non-production environments and 400 days in production, matching event retention. For checkpoint interpretation and safe recovery, see Investigating and replaying file transfer DLQ messages.
Interpret the destination
| Destination | Meaning | Investigation focus |
|---|---|---|
clean |
GuardDuty recorded a clean scan result and the route completed. | Check FileRouted.v1, dispatch matching and the downstream action or notification. |
quarantine |
GuardDuty identified potential malware. | Treat the file as potentially malicious. Check the scan result and follow the security incident process. |
investigation |
The file could not be routed as clean or quarantined, for example because the scan result was unclear or unsupported. | Check GuardDuty scan details, the scan-result adapter and route Lambda logs. |
incoming or processing only |
The file has not yet completed a later stage. | Continue the trace from the first stage that does not have the expected event or log entry. |
Check service health
CloudWatch alarms cover errors, throttles and long-running invocations for the file-received adapter, scan-result adapter, stage, route and file-action adapter. They also cover failed EventBridge target invocations, GuardDuty scan failures and DynamoDB throttling. Use the alarm timestamp to narrow the log search and identify the affected stage.
The configured alarm definitions are in
locals-cloudwatch.tf.
Preserve investigation evidence
Record the environment, username, object key, object version ID, timestamps,
observed bucket location, fileId, correlationId, idempotencyKey, relevant
EventBridge event IDs and non-sensitive log messages. Do not place file content,
passwords, private keys or Secrets Manager values in tickets, Slack or logs.