Reputation: 121
Is there a way to get logs/events from CloudTrail by using boto3 in python? How?
Upvotes: 3
Views: 8885
Reputation: 6333
Cloud trail events which you see in console can be queried using cloud trail boto3 api
However, it is advisable to enable logs and store in S3 while configuring cloud trail so that you can look for historical cloud trail logs.
Cloud trail logs will be available in S3 which can accessed/downloaded using S3 apis
Hope this helps !!!
Upvotes: 2