CmdID / aws / aws macie2
aws macie2 describe-buckets
Retrieves (queries) statistical data and other information about one or more S3 buckets that Amazon Macie monitors and analyzes for an account. AWS CLI reference
1 example 4 options Its page in the AWS CLI reference
Examples
To query data about one or more S3 buckets that Amazon Macie monitors and analyzes for your account
The following describe-buckets example queries metadata for all S3 buckets whose names begin with amzn-s3-demo-bucket and are in the current AWS Region.
aws macie2 describe-buckets --criteria '{"bucketName":{"prefix":"amzn-s3-demo-bucket"}}'Identify--criteriaThe criteria to use to filter the query results.Its output, shortened
{
"buckets": [
{
"accountId": "123456789012",
"allowsUnencryptedObjectUploads": "FALSE",
"automatedDiscoveryMonitoringStatus": "MONITORED",
"bucketArn": "arn:aws:s3:::amzn-s3-demo-bucket1",
"bucketCreatedAt": "2020-05-18T19:54:00+00:00",
"bucketName": "amzn-s3-demo-bucket1",
"classifiableObjectCount": 13,
"classifiableSizeInBytes": 1592088,
"jobDetails": {
"isDefinedInJob": "TRUE",
"isMonitoredByJob": "TRUE",
"lastJobId": "08c81dc4a2f3377fae45c9ddaEXAMPLE",
"lastJobRunTime": "2024-08-19T14:55:30.270000+00:00"
},
"lastAutomatedDiscoveryTime": "2024-10-22T19:11:25.364000+00:00",
"lastUpdated": "2024-10-25T07:33:06.337000+00:00",
"objectCount": 13,
"objectCountByEncryptionType": {
"customerManaged": 0,
"kmsManaged": 2,
"s3Managed": 7,
"unencrypted": 4,
"unknown": 0
},
"publicAccess": {
"effectivePermission": "NOT_PUBLIC",
"permissionConfiguration": {
… 154 more linesFor more information, see Filtering your S3 bucket inventory in the Amazon Macie User Guide.
Options
--criteriaThe criteria to use to filter the query results.--max-resultsThe maximum number of items to include in each page of the response.--next-tokenThe nextToken string that specifies which page of results to return in a paginated response.--sort-criteriaThe criteria to use to sort the query results.