Monitor workflow execution - AWS Transfer Family

Monitor workflow execution

Amazon CloudWatch monitors your AWS resources and the applications that you run in the AWS Cloud in real time. You can use Amazon CloudWatch to collect and track metrics, which are variables that you can measure for your workflows. You can view workflow metrics and consolidated logs by using Amazon CloudWatch.

CloudWatch logging for a workflow

CloudWatch provides consolidated auditing and logging for workflow progress and results.

View Amazon CloudWatch logs for workflows
  1. Open the Amazon CloudWatch console at https://console.aws.amazon.com/cloudwatch/.

  2. In the left navigation pane, choose Logs, then choose Log groups.

  3. On the Log groups page, on the navigation bar, choose the correct Region for your AWS Transfer Family server.

  4. Choose the log group that corresponds to your server.

    For example, if your server ID is s-1234567890abcdef0, your log group is /aws/transfer/s-1234567890abcdef0.

  5. On the log group details page for your server, the most recent log streams are displayed. There are two log streams for the user that you are exploring:

    • One for each Secure Shell (SSH) File Transfer Protocol (SFTP) session.

    • One for the workflow that is being executed for your server. The format for the log stream for the workflow is username.workflowID.uniqueStreamSuffix.

    For example, if your user is mary-major, you have the following log streams:

    mary-major-east.1234567890abcdef0 mary.w-abcdef01234567890.021345abcdef6789
    Note

    The 16-digit alphanumeric identifiers listed in this example are fictitious. The values that you see in Amazon CloudWatch are different.

The Log events page for mary-major-usa-east.1234567890abcdef0 displays the details for each user session, and the mary.w-abcdef01234567890.021345abcdef6789 log stream contains the details for the workflow.

The following is a sample log stream for mary.w-abcdef01234567890.021345abcdef6789, based on a workflow (w-abcdef01234567890) that contains a copy step.

{ "type": "ExecutionStarted", "details": { "input": { "initialFileLocation": { "bucket": "amzn-s3-demo-bucket", "key": "mary/workflowSteps2.json", "versionId": "version-id", "etag": "etag-id" } } }, "workflowId":"w-abcdef01234567890", "executionId":"execution-id", "transferDetails": { "serverId":"s-server-id", "username":"mary", "sessionId":"session-id" } }, { "type":"StepStarted", "details": { "input": { "fileLocation": { "backingStore":"S3", "bucket":"amzn-s3-demo-bucket", "key":"mary/workflowSteps2.json", "versionId":"version-id", "etag":"etag-id" } }, "stepType":"COPY", "stepName":"copyToShared" }, "workflowId":"w-abcdef01234567890", "executionId":"execution-id", "transferDetails": { "serverId":"s-server-id", "username":"mary", "sessionId":"session-id" } }, { "type":"StepCompleted", "details":{ "output":{}, "stepType":"COPY", "stepName":"copyToShared" }, "workflowId":"w-abcdef01234567890", "executionId":"execution-id", "transferDetails":{ "serverId":"server-id", "username":"mary", "sessionId":"session-id" } }, { "type":"ExecutionCompleted", "details": {}, "workflowId":"w-abcdef01234567890", "executionId":"execution-id", "transferDetails":{ "serverId":"s-server-id", "username":"mary", "sessionId":"session-id" } }

CloudWatch metrics for workflows

AWS Transfer Family provides several metrics for workflows. You can view metrics for how many workflows executions started, completed successfully, and failed in the previous minute. All of the CloudWatch metrics for Transfer Family are described in Using CloudWatch metrics for Transfer Family servers.