Skip to Content

Batch Operations and Storage Lens

S3 Batch Operations for bulk changes to existing objects, and S3 Storage Lens for organization-wide storage metrics, dashboards and recommendations.

S3 Batch Operations

S3 Batch Operations: S3 Inventory lists the objects, Athena filters the list into a manifest, and a Batch Operations job runs one operation on every object in it, retrying failures, tracking progress and writing a completion report S3 Batch Operations: S3 Inventory lists the objects, Athena filters the list into a manifest, and a Batch Operations job runs one operation on every object in it, retrying failures, tracking progress and writing a completion report

One job, millions of objects.

S3 Batch Operations performs bulk operations on existing objects with a single request. For example:

  • modify object metadata and properties;
  • copy objects between buckets;
  • encrypt unencrypted objects (or change their encryption);
  • modify ACLs and tags;
  • restore objects from S3 Glacier;
  • invoke a Lambda function to do a custom action on each object;
  • replicate existing objects (S3 Batch Replication).

How it works:

  1. A job has a list of objects (the manifest), the action to perform and optional parameters.
  2. The manifest is an S3 Inventory report or a CSV file. A common pattern is to get the full list from S3 Inventory and filter it with Athena (for example, "all unencrypted objects").
  3. S3 Batch Operations runs the job: it retries failures, tracks progress, sends completion notifications and writes a completion report.

S3 Storage Lens

S3 Storage Lens helps understand, analyse and optimize storage across a whole AWS Organization.

  • Discover anomalies, find cost savings, and check data protection best practices, with usage and activity metrics.
  • Aggregate data for the organization, specific accounts, Regions, buckets or prefixes.
  • A default dashboard, or custom dashboards.
  • Export metrics daily to an S3 bucket in CSV or Parquet format.

The default dashboard

  • Shows summarized insights and trends, for both free and advanced metrics.
  • Shows multi-Region and multi-account data.
  • Preconfigured by Amazon S3. It can't be deleted, but it can be disabled.

Metrics

  • Summary: general insights, such as StorageBytes and ObjectCount. Find the fastest-growing (or unused) buckets and prefixes.
  • Cost optimization: such as NonCurrentVersionStorageBytes and IncompleteMultipartUploadStorageBytes. Find buckets with incomplete multipart uploads older than 7 days, or objects that could move to a cheaper class.
  • Data protection: such as VersioningEnabledBucketCount, MFADeleteEnabledBucketCount, SSEKMSEnabledBucketCount, CrossRegionReplicationRuleCount. Find buckets that don't follow best practices.
  • Access management: Object Ownership settings in use.
  • Event: which buckets have S3 Event Notifications.
  • Performance: which buckets have Transfer Acceleration.
  • Activity: how storage is requested: AllRequests, GetRequests, PutRequests, BytesDownloaded.
  • Detailed status codes: 200OKStatusCount, 403ForbiddenErrorCount, 404NotFoundErrorCount.

Free vs advanced

  • Free metrics: available to every customer automatically; about 28 usage metrics; data kept for queries for 14 days.
  • Advanced metrics and recommendations (paid):
    • more metrics: activity, advanced cost optimization, advanced data protection, status codes;
    • CloudWatch publishing, so the metrics can be used in CloudWatch at no extra charge;
    • prefix aggregation, metrics at prefix level;
    • data kept for 15 months.

Real-world examples

  • A company discovers 40 million unencrypted objects from before 2023. An S3 Inventory report filtered with Athena feeds a Batch Operations job that re-encrypts them all with SSE-KMS.
  • A FinOps team opens the Storage Lens dashboard and finds 3 TB of incomplete multipart uploads across 50 accounts, then adds lifecycle rules to clean them up.

Exam tips

  • "Encrypt all existing unencrypted objects", "change tags on millions of objects" → S3 Batch Operations (with S3 Inventory as the list).
  • "Restore many objects from Glacier at once" → Batch Operations.
  • "Replicate existing objects" → S3 Batch Replication.
  • "Organization-wide view of S3 usage, cost savings and data protection" → S3 Storage Lens.
  • "Keep Storage Lens metrics 15 months", "publish to CloudWatch" → advanced metrics.

Common traps

  • "Write a script to loop over millions of objects." Batch Operations does it with retries and a report.
  • "Storage Lens free metrics keep a year of history." Free data is queryable for 14 days; advanced for 15 months.

Hands-on lab: the Storage Lens dashboard

Goal: open the default Storage Lens dashboard and read what it says about your account.

Costs money

The default dashboard with free metrics costs nothing. Don't upgrade to advanced metrics for this lab. Any Region works.

Open the default dashboard

S3 → Storage Lens → Dashboards → default-account-dashboard. It may show data from the last day only if your account is new: Storage Lens updates daily.

Explore

Look at Total storage, Object count and the trend charts. Open the Cost optimization and Data protection tabs to see which of your buckets have versioning or encryption turned on.

Expected result: an account-wide picture of your S3 storage, without any setup.

Clean up: nothing to delete.

AWS documentation

On this page

Open notes

Spotted a mistake?

These notes are open source. Suggest a fix, or star the repo if they helped you.

Suggest an edit

For AI agents: llms.txt · llms-full.txt