- Newest
- Most votes
- Most comments
It appears that you're experiencing an issue where your CloudWatch log export to S3 is completing successfully, but the S3 bucket remains empty or contains fewer logs than expected. This can be a confusing situation, as the export task reports success but doesn't produce the expected results. Here are a few potential reasons and solutions to consider:
-
Time range: Ensure that you've specified the correct time range for the export task. If the time range doesn't match the period when the logs were generated, the export might complete successfully but without transferring any data.
-
Log stream selection: Check if you've selected the correct log streams within the log group for export. If only specific streams are chosen, this could result in fewer logs being exported than expected.
-
S3 bucket permissions: Although you mentioned it's not a permission issue, double-check the S3 bucket policy to ensure it allows CloudWatch Logs to write objects. The policy should include permissions for both s3:GetBucketAcl and s3:PutObject actions.
-
Encryption: If your S3 bucket uses SSE-KMS encryption, make sure the KMS key policy allows CloudWatch Logs to use the key for encryption.
-
Export task size: There might be limitations on the size of data that can be exported in a single task. Try exporting smaller time ranges or fewer log streams at a time to see if this resolves the issue.
-
S3 object prefix: Verify that you're looking in the correct location within the S3 bucket. The exported logs might be placed in a subfolder based on the prefix specified in the export task.
-
CloudWatch Logs retention: Ensure that the logs haven't been deleted due to retention policies before the export task was initiated.
If the issue persists after checking these points, it would be advisable to contact AWS Support for further investigation, as there might be an underlying problem with the export process itself.
Sources
Exporting Cloudwatch log group To S3 is failing | AWS re:Post
Troubleshoot a failed export task in CloudWatch Logs | AWS re:Post
Relevant content
- asked 2 years ago
- asked 2 years ago
- AWS OFFICIALUpdated 2 years ago
