简体   繁体   中英

AWS CloudTrail not logging CloudFront distribution ID after deployment

I have created a trail to log all the events happens in AWS, But the trail not logging the ID of CloudFront distribution after deployment successfully.

Here is a snippet of output trail logged on create distribution.

 (
    [EventId] => a6bd-8671102fd188
    [Username] => 7857RFR
    [EventTime] => 1534501513
    [CloudTrailEvent] => {}
    [EventName] => CreateDistribution
    [EventSource] => cloudfront.amazonaws.com
    [Resources] => Array
                    (
                    )

 )

In the above response, the event logged for cloudFront api call CreateDistribution but the resources array is empty and also after deployment successfully there is no new event logged by cloudTrail for distribution ID.

Any suggestion will be appreciated.

1> As per definition of "resources" in CloudTrail event "A list of resources accessed in the event. The field can contain the following information." So, when you create the distribution, you are not "accessing" the distribution as it's just created. You should look for the distribution id in the "responseElements" section.

2> What event you are expecting to appear in CloudTrail after the distribution has been created?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM