简体   繁体   English

使用 Amazon Cloudwatch 事件或 CloudTrail 将 AWS 配置日志获取到 S3

[英]Get AWS config logs to S3 using Amazon Cloudwatch events or CloudTrail

I am looking to move AWS config logs to S3.我希望将 AWS 配置日志移动到 S3。 Any input how can I do that using AWS CloudWatch or CloudTrail using Python.任何输入我如何使用 AWS CloudWatch 或 CloudTrail 使用 Python 来做到这一点。

When you setup AWS Config you have provide S3 bucket for its logs.当您设置AWS Config 时,您已经为其日志提供了 S3 存储桶 If done in console, the bucket can be created on the spot with the correct bucket policy.如果在控制台中完成,则可以使用正确的存储桶策略在现场创建存储桶。

For boto3 in python you have to create bucket first and setup a correct bucket policy as shown here:对于boto3中的 boto3,您必须首先创建存储桶并设置正确的存储桶策略,如下所示:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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