AWS transfer: Document CloudWatch workflow log delivery and IAM permissions
Summary
Adds documentation for two CloudWatch workflow log delivery mechanisms: structured log destinations and logging roles. Includes required IAM logs permissions for structured log destinations and updates log stream naming guidance.
Security assessment
The change documents audit logging configuration and the IAM permissions needed to create structured log destinations, which supports least-privilege and logging best practices. It does not reference a specific vulnerability, incident, or CVE.
Evidence
To configure a structured log destination, the IAM policy for the principal that creates the workflow must contain the following permissions:
Diff
diff --git a/transfer/latest/userguide/cloudwatch-workflows.md b/transfer/latest/userguide/cloudwatch-workflows.md index 21db40b..a4d84b9 100644 --- a//transfer/latest/userguide/cloudwatch-workflows.md +++ b//transfer/latest/userguide/cloudwatch-workflows.md @@ -10,0 +11,29 @@ CloudWatch provides consolidated auditing and logging for workflow progress and +AWS Transfer Family provides two ways to deliver managed workflow execution logs to Amazon CloudWatch: + + * **A log group that you specify (structured log destination)** – You specify a CloudWatch Logs log group as a structured log destination for the workflow, and Transfer Family delivers the workflow execution logs to that log group for you. This option does not require a logging role. To use it, provide the Amazon Resource Name (ARN) of a log group in the `StructuredLogDestinations` parameter when you create the workflow (see [StructuredLogDestinations](https://docs.aws.amazon.com/transfer/latest/APIReference/API_CreateWorkflow.html#TransferFamily-CreateWorkflow-request-StructuredLogDestinations) in the _AWS Transfer Family API Reference_). The log group must be in the same AWS account and AWS Region as the workflow. + +To configure a structured log destination, the IAM policy for the principal that creates the workflow must contain the following permissions: + + * `logs:CreateLogDelivery` + + * `logs:DeleteLogDelivery` + + * `logs:DescribeLogGroups` + + * `logs:DescribeResourcePolicies` + + * `logs:GetLogDelivery` + + * `logs:ListLogDeliveries` + + * `logs:PutResourcePolicy` + + * `logs:UpdateLogDelivery` + + * **A logging role** – You attach an IAM logging role to the server that the workflow is attached to. Transfer Family assumes the role to write the workflow execution logs to a log group named `/aws/transfer/`server-id``. For details, see [Configure CloudWatch logging role](./configure-cw-logging-role.html). + + + + +Both mechanisms write the same workflow execution log content in the same JSON format. The difference is only where the logs are delivered: to the log group that you specify, or to the `/aws/transfer/`server-id`` log group on the server by way of the logging role. + @@ -19 +48,5 @@ CloudWatch provides consolidated auditing and logging for workflow progress and - 4. Choose the log group that corresponds to your server. + 4. Choose the log group that contains your workflow logs. + + * If the workflow uses a structured log destination, choose the log group whose ARN you specified in the `StructuredLogDestinations` parameter of the workflow. + + * If the workflow uses a logging role on the server, 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`. @@ -21 +54 @@ CloudWatch provides consolidated auditing and logging for workflow progress and -For example, if your server ID is `s-1234567890abcdef0`, your log group is `/aws/transfer/s-1234567890abcdef0`. + 5. On the log group details page, the most recent log streams are displayed. The log stream name for the workflow depends on which logging mechanism the workflow uses: @@ -23 +56 @@ For example, if your server ID is `s-1234567890abcdef0`, your log group is `/aws - 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: + * For a structured log destination, the workflow log stream is named ``workflowID`/`executionID``. For example: @@ -25 +58 @@ For example, if your server ID is `s-1234567890abcdef0`, your log group is `/aws - * One for each Secure Shell (SSH) File Transfer Protocol (SFTP) session. + w-abcdef01234567890/021345abcdef6789 @@ -27 +60 @@ For example, if your server ID is `s-1234567890abcdef0`, your log group is `/aws - * 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 a logging role, the server log group contains two log streams for the user that you are exploring: one for each Secure Shell (SSH) File Transfer Protocol (SFTP) session, and one for the workflow that is being executed. The format for the workflow log stream is ``username`.`workflowID`.`uniqueStreamSuffix``. @@ -41 +74 @@ The 16-digit alphanumeric identifiers listed in this example are fictitious. The -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 **Log events** page for a workflow log stream contains the details for the workflow execution. If the workflow uses a logging role, the `mary-major-usa-east.1234567890abcdef0` stream displays the details for each user session, and the `mary.w-abcdef01234567890.021345abcdef6789` stream contains the details for the workflow. If the workflow uses a structured log destination, the `w-abcdef01234567890/021345abcdef6789` stream contains the details for the workflow.