如果您发现某个用户已被入侵,或者您怀疑该用户已被入侵,您可能想知道该用户在特定时间段内进行的 API 调用。在设计访问管理策略时,了解用户的活动有助于了解事件的影响范围以及用户权限的覆盖范围。
SELECT metadata.uid, type_name, api.service.name, eventday, actor.user.uuid
FROM "amazon_security_lake_table_us_east_1_cloud_trail_mgmt_1_0"
WHERE eventday > '20231001' AND eventday < '20231118'
and actor.user.uuid like '%SCSyncUser%'
注意替换Account Id number and "AKIAY625JPUY55PBUEWT" 为你的账号以及 IAM user access keys。如果使用的不是美东一的日志,还需要注意替换表名称。
SELECT api.operation, api.service.name, src_endpoint.ip, severity, status
FROM "amazon_security_lake_table_us_east_1_cloud_trail_mgmt_1_0"
WHERE
accountid = '<Account Id number>'
AND actor.user.credential_uid = 'AKIAY625JPUY55PBUEWT'
AND eventday >= '20231008'
AND eventday <= '20231008'
GROUP BY api.operation, api.service.name, src_endpoint.ip, severity, status
ORDER BY src_endpoint.ip