Skip to main content

aws.s3

Supported Platform

  • aws

Description

AWS S3 Cloud Object Storage

Amazon Simple Storage Service (Amazon S3) is an object storage service

Fields

IDTYPEDESCRIPTION
buckets[]aws.s3.bucketlist of s3 buckets across the account

Examples

Return a list of AWS S3 buckets and the value for specified fields

aws.s3.buckets {
arn
name
policy
tags
acl
owner
public
cors
location
versioning
logging
staticWebsiteHosting
defaultLock
replication
encryption
publicAccessBlock
exists
}

Return a list of AWS S3 buckets that are public and return the values for the arn name location tags and publicAccessBlock

aws.s3.buckets.where( public == true ) {
arn
name
location
tags
publicAccessBlock
}

Checks whether S3 buckets have cross-region replication enabled

aws.s3.buckets.all(
replication['Rules'] { _['Status'] == "Enabled" }
)

Checks that all buckets are encrypted with kms

aws.s3.buckets.all(
encryption['Rules'] { _['ApplyServerSideEncryptionByDefault']['KMSMasterKeyID'] == /^arn:aws:kms:.*/}
)

References