Skip to content

Files

Latest commit

 

History

History
29 lines (19 loc) · 468 Bytes

AWS002.md

File metadata and controls

29 lines (19 loc) · 468 Bytes

Pattern: S3 Bucket does not have logging enabled

Issue: -

Description

Buckets should have logging enabled so that access can be audited.

Resolution: Add a logging block to the resource to enable access logging.

Examples

Example of incorrect code:

resource "aws_s3_bucket" "bad_example" {

}

Example of correct code:

resource "aws_s3_bucket" "good_example" {
	logging {
		target_bucket = "target-bucket"
	}
}