S3 Pricing Deep Dive

The pricing of Amazon S3 has many facets to it. This article explores many of these factors in detail to give you a thorough understanding of all that you should know from a costing perspective when you choose to store your data in S3.

But first, a quick review of S3 storage classes.

S3 Storage Classes

Amazon S3 offers a range of storage classes designed for different use cases:

S3 STANDARD

  • For general-purpose storage of active, frequently accessed data.
  • Millisecond access to data.
  • Data stored in at least 3 AZs.

S3 INTELLIGENT-TIERING

  • For data with unknown or changing access patterns.
  • Millisecond access to data.
  • Data stored in at least 3 AZs.
  • You pay an additional monitoring fee per object.
  • Mandatory minimum storage duration applies.

S3 STANDARD-INFREQUENT ACCESS (S3 STANDARD-IA)

  • For long-lived, but less frequently accessed data.
  • Millisecond access to data.
  • Data stored in at least 3 AZs.
  • A retrieval fee applies per GB of data retrieved.
  • Mandatory minimum storage duration.
  • Mandatory minimum object size.

S3 ONE ZONE-INFREQUENT ACCESS (S3 ONE ZONE-IA)

  • For easily re-creatable and less frequently accessed data.
  • Millisecond access to data.
  • Data is stored only in 1 AZ.
  • A retrieval fee applies per GB of data retrieved.
  • Mandatory minimum storage duration.
  • Mandatory minimum object size.

S3 GLACIER

  • For archive data.
  • Data retrieval time: minutes to hours.
  • Data stored in at least 3 AZs.
  • A retrieval fee applies per GB of data retrieved.
  • Mandatory minimum storage duration.

S3 GLACIER DEEP ARCHIVE

  • For long-term archive data.
  • Data retrieval time is in hours.
  • Data stored in at least 3 AZs.
  • A retrieval fee applies per GB of data retrieved.
  • Mandatory minimum storage duration.

S3 Cost Factors

The cost of data stored in S3 is determined by the following factors:

STORAGE (GB)

  • The more you store in S3, the more you pay.
  • However, the pricing is tiered, so the cost per GB goes down as you store more and more.
  • With AWS Organizations consolidated billing turned on, the cost tiering applies to all accounts in your organization combined.

STORAGE OVERHEAD

  • For every object stored in Glacier or Deep Archive, S3 stores 8 KB of data in S3 standard as metadata (object name, etc) to support object list operations.
  • Additionally, for every object stored in Glacier or Deep Archive, S3 stores 32 KB of data for indexing the object. This extra data is necessary to identify and restore your object.
    • This is stored alongside the object in the same storage class (Glacier or Deep Archive) so it’s charged as per your Glacier tier.

REQUEST COUNT

  • This is the number of API requests you make to S3: PUTs, GETs, etc.
  • Different costs apply to the following types of requests:
    • PUT, COPY, POST, LIST requests
    • GET, SELECT, and all other requests
    • Lifecycle Transition requests
    • Data Retrieval requests
  • All of the above costs are defined per 1000 requests.

DATA RETRIEVAL

  • For IA and Glacier classes, a fee is charged per GB of data retrieved.
  • Only applicable to the following storage classes:
    • Standard IA
    • 1 Zone IA
    • Glacier
    • Deep Archive

MONITORING AND AUTOMATION

  • S3 Intelligent Tiering storage class monitors your objects continuously and moves them between Standard and Infrequent Access tiers automatically based on their access patterns.
  • There is a small fee per object for this monitoring and automation provided by S3.

EARLY DELETE

  • For some classes, once you put an object into them, you cannot delete it before a certain period of time.
  • If you do, you’re charged an early deletion fee.
  • Applies to:
    • Intelligent Tiering
    • Standard IA
    • 1 Zone IA
    • Glacier
    • Deep Archive
  • The minimum storage duration differs from storage class to storage class:
    • Standard IA — 30 Days
    • 1 Zone IA — 30 Days
    • Glacier — 90 Days
    • Deep Archive — 180 Days

DATA TRANSFER

  • Data transfer into S3 is usually free.
  • Except for CloudFront, data transfer out will cost money.
  • Data transfer out cost is tiered such that the more you transfer, the less you pay per GB.

MINIMUM OBJECT SIZE

  • The minimum object size for Standard IA and 1 Zone IA is 128 KB.
  • This does not mean that these classes won’t accept objects smaller than 128 KB.
  • It just means that if you store less than 128 KB, you still pay for 128 KB.
  • Since intelligent tiering moves objects between standard and IA, and since IA has the 128 KB limit, intelligent tiering simply does not move objects smaller than 128 KB from standard to IA even if they are never accessed.

MANAGEMENT AND ANALYTICS

  • If you use the following features of S3, they are charged separately:
    • S3 Inventory
    • Storage Class Analysis
    • Object Tagging
    • S3 Storage Lens
    • S3 Batch Operations
    • S3 Select
    • Glacier Select

REPLICATION

  • S3 can replicate your data to another bucket:
    • in the same region — Same Region Replication — SRR
    • in another region — Cross-Region Replication — CRR
  • For both SRR and CRR, you pay for the following:
    • Storage in the destination S3 storage classes.
    • Replication PUT requests.
    • Infrequent access storage retrieval fees, if any.
  • For CRR, you also pay for inter-region data transfer out from S3 to the destination region.
  • If you use S3 Replication Time Control, you pay a Replication Time Control Data Transfer fee and S3 Replication Metrics charges.
    • S3 Replication Metrics are billed at the same rate as CloudWatch custom metrics.

S3 OBJECT LAMBDA

  • You can add a Lambda function to S3 GET requests to modify and process data before it’s returned to the caller.
  • You pay a fee for this feature in addition to:
    • The S3 GET request charges.
    • The Lambda function charges.

S3 Cost-Saving Tips

Knowing the intricacies of how S3 pricing works can help you make decisions that can save a lot when scaled up. Here are a few such tips:

  • Compress objects. Many small objects cost more than a few large objects, especially when they are mostly accessed together.
  • Use intelligent tiering. Let S3 move objects to IA class when they’re not accessed frequently.
  • Use lifecycle policies to:
    • Move objects to cheaper storage classes.
    • Delete old objects.
    • Delete old versions of objects.
    • Delete incomplete multipart uploads.

Conclusion

I hope this article has expanded your understanding of how pricing in S3 works. You can now use this newfound knowledge to make better decisions regarding your storage needs. 😊

About the Author ✍🏻

Harish KM is a Principal DevOps Engineer at QloudX & a top-ranked APN Ambassador. 👨🏻‍💻

With over a decade of industry experience as everything from a full-stack engineer to a cloud architect, Harish has built many world-class solutions for clients around the world! 👷🏻‍♂️

With over 20 certifications in cloud (AWS, Azure, GCP), containers (Kubernetes, Docker) & DevOps (Terraform, Ansible, Jenkins), Harish is an expert in a multitude of technologies. 📚

These days, his focus is on the fascinating world of DevOps & how it can transform the way we do things! 🚀

Leave a Reply

Your email address will not be published.