AWS-EnableCloudTrailKmsEncryption - Amazon Systems Manager Automation runbook reference
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).



This runbook updates the configuration of one or more Amazon CloudTrail trails to use Amazon Key Management Service (Amazon KMS) encryption.

Run this Automation (console)

Document type





Linux, macOS, Windows


  • AutomationAssumeRole

    Type: String

    Description: (Optional) The Amazon Resource Name (ARN) of the Amazon Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook.

  • KMSKeyId

    Type: String

    Description: (Required) The key ID of the of the customer managed key you want to use to encrypt the trail you specify in the TrailName parameter. The value can be an alias name prefixed by "alias/", a fully specified ARN to an alias, or a fully specified ARN to a key.

  • TrailNames

    Type: StringList

    Description: (Required) A comma separated list of the trails you want to update to be encrypted.

Required IAM permissions

The AutomationAssumeRole parameter requires the following actions to use the runbook successfully.

  • cloudtrail:UpdateTrail

  • kms:DescribeKey

  • kms:ListKeys

Document Steps

  • aws:executeScript - Enables Amazon KMS encryption on the trails you specify in the TrailName parameter.