MDAA TS Docs
    Preparing search index...

    Helper class for generating CloudTrail audit resources for use with S3 data events.

    Index

    Constructors

    Methods

    • Helper method which creates an S3 Data Events CloudTrail, using basic event selectors.

      For data events on any other resource type, use createDataEventCloudTrail. CloudTrail accepts either basic or advanced event selectors on a trail, never both, so the two styles are separate methods rather than one method with mutually exclusive args.

      Parameters

      • scope: Construct

        The CDK scope in which the Trail resource will be created.

      • destinationBucket: IBucket

        The destination bucket where the Trail will be written

      • encryptionKey: IKey

        The KMS CMK with which the trail data will be encrypted when written to S3

      • naming: IMdaaResourceNaming

        The MDAA Naming implementation which will be used to name the CloudTrail resources

      • trailName: string

        The name the CloudTrail. The full name will be generated by the MDAA Naming implementation

      • OptionalincludeManagementEvents: boolean

        Whether to include management events in the trail

      • OptionaleventSelectors: AuditEventSelector[]

        The set of bucket names and prefixes for which S3 data events will be captured. If not specified, the Trail will capture all S3 Data Events in the account.

      Returns Trail

      A CloudTrail which captures S3 Data Events.

    • Helper method which creates a CloudTrail capturing data events for any CloudTrail-supported resource type, using advanced event selectors.

      The L2 Trail construct does not expose advanced event selectors, so these are applied to the underlying CfnTrail via an escape hatch, leaving KMS wiring, nag suppressions, and the returned type identical to createCloudTrail.

      Parameters

      • scope: Construct

        The CDK scope in which the Trail resource will be created.

      • destinationBucket: IBucket

        The destination bucket where the Trail will be written

      • encryptionKey: IKey

        The KMS CMK with which the trail data will be encrypted when written to S3

      • naming: IMdaaResourceNaming

        The MDAA Naming implementation which will be used to name the CloudTrail resources

      • trailName: string

        The name the CloudTrail. The full name will be generated by the MDAA Naming implementation

      • dataEventSelectors: AuditDataEventSelector[]

        The resource types for which data events will be captured. One selector is rendered per entry.

      • OptionalincludeManagementEvents: boolean

        Whether to also capture management events. Advanced event selectors replace a trail's defaults entirely, so without this the trail captures no control plane events at all.

      Returns Trail

      A CloudTrail which captures the requested Data Events.

    • A helper method for generating a Glue table for querying CloudTrail audit events from an S3 bucket.

      Parameters

      • scope: Construct

        The scope in which the table will be created.

      • bucket: IBucket

        The bucket where the CloudTrail data is stored

      • database: IDatabase

        The database where the table will be created

      • accounts: string[]

        The accounts for which CloudTrail data has been produced in the bucket.

      • regions: string[]

        The regions for which CloudTrail data has been produced in the bucket.

      Returns S3Table

      A Glue Table which can be used to query CloudTrail data.