Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Disable duplicate management events for Lambda & S3 Cloudtrail event selectors #452

Conversation

rjbaker
Copy link
Contributor

@rjbaker rjbaker commented May 14, 2024

Issue #, if available: #449

Description of changes:

Prevents duplicate management event selectors being created in the organisation Cloud Trail when Lambda & S3 event selectors are enabled via the global logging config.

Resulting CloudTrail event selector configuration:

aws cloudtrail get-event-selectors --trail-name AWSAccelerator-Organizations-CloudTrail
{
    "TrailARN": "arn:aws:cloudtrail:eu-west-2:account-id:trail/AWSAccelerator-Organizations-CloudTrail",
    "EventSelectors": [
        {
            "ReadWriteType": "All",
            "IncludeManagementEvents": false,
            "DataResources": [
                {
                    "Type": "AWS::Lambda::Function",
                    "Values": [
                        "arn:aws:lambda"
                    ]
                }
            ],
            "ExcludeManagementEventSources": []
        },
        {
            "ReadWriteType": "All",
            "IncludeManagementEvents": false,
            "DataResources": [
                {
                    "Type": "AWS::S3::Object",
                    "Values": [
                        "arn:aws:s3:::"
                    ]
                }
            ],
            "ExcludeManagementEventSources": []
        },
        {
            "ReadWriteType": "All",
            "IncludeManagementEvents": true,
            "DataResources": [],
            "ExcludeManagementEventSources": []
        }
    ]
}

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@rjbaker rjbaker changed the title Disable management events for Lambda & S3 Cloudtrail event selectors Disable duplicate management events for Lambda & S3 Cloudtrail event selectors May 14, 2024
@rjbaker rjbaker changed the title Disable duplicate management events for Lambda & S3 Cloudtrail event selectors fix: Disable duplicate management events for Lambda & S3 Cloudtrail event selectors May 14, 2024
@rjbaker rjbaker closed this Jul 2, 2024
@rjbaker rjbaker force-pushed the disable-duplicate-cloudtrail-events branch from 21cb076 to 13f3ebc Compare July 2, 2024 14:54
…tors

Prevents duplicate management event selectors being created in the
organisation Cloud Trail.

Signed-off-by: Richard Baker <[email protected]>
@rjbaker rjbaker reopened this Jul 2, 2024
@rjbaker
Copy link
Contributor Author

rjbaker commented Jul 2, 2024

Updated for compatibility with 1.8.0 release. Issue still persists as management events default to true in methods implementing AddEventSelectorOptions when no includeManagementEvents argument is supplied: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudtrail.AddEventSelectorOptions.html#includemanagementevents

@nagmesh nagmesh added the pending-release This issue will be resolved in an upcoming release label Oct 31, 2024
@nagmesh
Copy link
Contributor

nagmesh commented Oct 31, 2024

Hi @rjbaker , thank you for your contribution to the Landing Zone Accelerator!

I'm pleased to say this work has been integrated into the code base and will be available shortly in the next release. I'll close this PR in the meantime and update the associated issue once that release is publicly available.

Thank you for your support of the LZA!

@nagmesh nagmesh closed this Oct 31, 2024
@mbevc1
Copy link

mbevc1 commented Oct 31, 2024

Good news 🎉 . @nagmesh is there a roadmap or any future release dates you're aiming for?

@richardkeit
Copy link
Contributor

@mbevc1 - dare to say end of year

#320 (comment)

@mbevc1
Copy link

mbevc1 commented Nov 1, 2024

Thanks! 🤞

@mbevc1
Copy link

mbevc1 commented Nov 1, 2024

Would be nice if you could open a roadmap and move development to this repo at some point 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending-release This issue will be resolved in an upcoming release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants