Classification:
compliance
Set up the cloudtrail integration.
Ensure that AWS CloudTrail logs are encrypted.
Encrypting AWS CloudTrail logs with a KMS encryption key helps protect your data and ensures only certain IAM users can access these logs.
Follow the Enabling Log File Encryption docs to enable SSE-KMS encryption for CloudTrail log files.
Create a new policy configuration file that enables CloudTrail encrypting and decrypting permissions.
Run create-key
using the policy file path.
create-key.sh
aws kms create-key
--policy new-policy-file.json
Run create-alias
with a newly created alias name and the target-key-id
as the KMS key returned in step 2.
create-alias.sh
aws kms create-alias
--alias-name alias/CloudTrailKSM
--target-key-id 12345678-abcd-1a2b-1234-012345678901
Run update-trail
on the trail name you wish to update and the KMS key returned in step 2.
update-trail.sh
aws cloudtrail update-trail
--name MyGlobalTrail
--kms-key-id 12345678-abcd-1a2b-1234-012345678901