Hi Amiracle,
Thank you so much for providing that solution.
I followed your approach and was able to fix most of the issues but "Most Recent Modifications - Latest 10" is still not working out.
Below is the query:
(index="main" OR (index="main" OR index="default") OR index="default") sourcetype="aws:cloudtrail"
| lookup all_eventName eventName OUTPUTNEW function
| search function="S3 Data Event"
| spath output=bucketName path="requestParameters.bucketName"
| spath output=objectName path=requestParameters.key
| spath output=userName path=userIdentity.sessionContext.sessionIssuer.userName
| eval error=if(errorCode=="success",0, 1)
| lookup unauthorized_errorCode errorCode OUTPUT Unauthorized
| eval Unauthorized=if(Unauthorized=="true", 1, 0)
| stats count by region, aws_account_id, bucketName, objectName, userName, eventName, userAgent, sourceIPAddress,Unauthorized, error, readOnly,_time
| search (aws_account_id="") (region="")
| search readOnly=false (eventName="DeleteObject" OR eventName="PutObject" OR eventName="PostObject")
| sort - _time limit=10
| eval _time=strftime(_time, "%m/%d/%Y %H:%M:%S")
| table bucketName, objectName, userName, eventName, sourceIPAddress, userAgent, _time
| rename bucketName as BucketName, objectName as ObjectName, userName as UserName, eventName as EventName, sourceIPAddress as "Source IP Address", userAgent as UserAgent, _time as Time
The other tab "S3 - Traffic Analysis" is not working at all.
... View more