Configure your CloudTrail settings to provide greater visibility for XDR monitoring.
NoteThe steps contained in these instructions were valid as of November 2023.
|
ImportantThe CloudTrail SNS topic must be on the same account and in the same region as
the CloudTrail you want to monitor.
|
Procedure
- Sign in to your AWS account and access the CloudTrail console.
- If you are creating a new trail, click Create a trail
and perform the following steps.
- Configure the Trail Attributes and click Next.
- Under Events select the following event
types:
-
Management events
-
Data events
-
- Configure Management events.
-
Select Read.
-
Select Write.
-
Ensure Exclude AWS KMS events and Exclude Amazon RDS Data API events are not selected.
-
- Under Data events, set Data event type to S3.
- For Log selector template, select Log all events.
- Under Additional settings, ensure Log file validation is enabled.
- Enable SNS notification delivery, and select
New.
Note
Setting up the SNS notification delivery is required for Cloud Detections for AWS CloudTrail. You are required to provide the SNS topic ARN when deploying or updating the stack. - Click Next.
- Review the configuration and click Create trail.
- If you are editing a trail, click Trails in the
navigation pane and perform the following steps.
- Click the name of the trail you want to edit.
- In Management events, click
Edit and configure the settings.
-
Select Read.
-
Select Write.
-
Ensure Exclude AWS KMS events and Exclude Amazon RDS Data API events are not selected.
-
- Click Save changes.
- In Data events, click
Edit and configure the settings.
-
For Data event source, select S3.
-
For Log selector template, select Log all events.
-
- Click Save changes.
- In General details, click Edit.
- Under Additional settings, ensure Log file validation is enabled.
- Enable SNS notification delivery.
-
Select New to create a new SNS topic.
-
Select Existing to use an existing SNS topic.
Note
Setting up the SNS notification delivery is required for Cloud Detections for AWS CloudTrail. You are required to provide the SNS topic ARN when deploying or updating the stack. -
- Click Save changes.
- Click Update trail to save changes.
- Copy the CloudTrail ARN and SNS Topic ARN.Use one of the following steps to find the CloudTrail ARN and SNS Topic ARN. You must provide this information when deploying or updating a stack to enable the Cloud Detections for AWS CloudTrail feature.
-
Locate the information in the CloudTrail console:
-
Click Trails in the navigation pane, and select the CloudTrail you want to monitor.
-
The CloudTrail ARN appears as part of the location path:.Copy the full ARN starting with
arn:aws:...
and including the trail name.../trail-name
. -
The SNS Topic ARN is located under SNS notification delivery under the General details section.
-
-
Use the AWS Command Line Interface to access the information:
-
Run the command aws cloudtrail describe-trails.
-
Locate the CloudTrail you want to monitor.
-
Copy the data from the following fields:
-
SnsTopicARN
: The SNS Topic ARN -
TrailARN
: The CloudTrail ARN
-
-
-
Use the AWS SDK to call DescribeTrails:
-
Run the AWS SDK.
-
Locate the CloudTrail you want to monitor in the response.
-
Copy the data from the following fields:
-
SnsTopicARN
: The SNS Topic ARN -
TrailARN
: The CloudTrail ARN
-
-
-