github.com/khulnasoft-lab/defsec@v1.0.5-0.20230827010352-5e9f46893d95/avd_docs/aws/cloudtrail/AVD-AWS-0163/CloudFormation.md (about)

     1  
     2  Enable access logging on the bucket
     3  
     4  ```yaml---
     5  Resources:
     6    GoodExampleTrail:
     7      Type: AWS::CloudTrail::Trail
     8      Properties:
     9        IsLogging: true
    10        S3BucketName: "my-bucket"
    11        TrailName: "Cloudtrail"
    12    GoodExampleBucket:
    13      Type: AWS::S3::Bucket
    14      Properties:
    15        BucketName: "my-bucket"
    16        LoggingConfiguration:
    17          DestinationBucketName: logging-bucket
    18          LogFilePrefix: accesslogs/
    19  
    20  ```
    21  
    22