AWS077 - S3 Data should be versioned


Versioning in Amazon S3 is a means of keeping multiple variants of an object in the same bucket. You can use the S3 Versioning feature to preserve, retrieve, and restore every version of every object stored in your buckets. With versioning you can recover more easily from both unintended user actions and application failures.

Insecure Example

The following example will fail the AWS077 check.

resource "aws_s3_bucket" "bad_example" {


Secure Example

The following example will pass the AWS077 check.

resource "aws_s3_bucket" "good_example" {

	versioning {
		enabled = true