Skip to content

Files

Latest commit

 

History

History
31 lines (20 loc) · 770 Bytes

AWS001.md

File metadata and controls

31 lines (20 loc) · 770 Bytes

Pattern: S3 Bucket has an ACL defined which allows public access

Issue: -

Description

S3 bucket permissions should be set to deny public access unless explicitly required.

Granting write access publicly with public-read-write is especially dangerous as you will be billed for any uploaded files.

Additionally, you should not use the authenticated-read canned ACL, as this provides read access to any authenticated AWS user, not just AWS users within your organisation.

Resolution: Apply a more restrictive bucket ACL.

Examples

Example of incorrect code:

resource "aws_s3_bucket" "bad_example" {
	acl = "public-read"
}

Example of correct code:

resource "aws_s3_bucket" "good_example" {
	acl = "private"
}