Skip to content

AWS Technologies Blog

Menu
  • Home
  • KB
  • Services
  • Resources
  • Posts
  • Find
    • Categories
    • Tags
  • About
Menu

S3 consistency

Posted on March 6, 2025 by wpadmin

Amazon S3 provides strong read-after-write consistency for all objects, including overwrite PUTS and DELETES. This means that when you write an object or overwrite an existing object, subsequent reads of that object will immediately reflect the latest changes.

Here’s a more detailed look at S3 Read-Write Consistency:

1. Read-After-Write Consistency

  • What it means: After a successful write operation (such as a PUT or POST) to Amazon S3, any subsequent read request (such as a GET or LIST) on the object will immediately return the most recent version of the object.
  • For PUT Operations: When you upload an object or overwrite an existing object, the data becomes immediately available for reading. If you perform a read right after the write, it will reflect the changes.
  • For DELETE Operations: When you delete an object, subsequent requests to get that object will immediately return a 404 Not Found (or equivalent error), ensuring that the object has been deleted.

2. S3 Consistency Model

Historically, Amazon S3 provided eventual consistency for overwrite PUT and DELETE operations, meaning that it might take a few seconds before changes were fully visible to all reads. However, since December 2020, S3 now provides strong consistency for both PUTS (including overwrites) and DELETES, ensuring that changes are immediately visible to all clients.

Key Points:

  • Strong Consistency: S3 provides strong consistency for both PUT and DELETE operations. When you upload or delete an object, all subsequent read requests will reflect the changes immediately.
  • Atomicity: S3 handles all writes as atomic operations. If you’re uploading a file, the file is either completely written or not at all, ensuring there’s no partial file data available for reading.

Example Use Cases for Read-Write Consistency:

  1. File Uploads: After uploading a file (PUT), if you immediately read (GET) the same file, you will get the exact file you just uploaded.
  2. File Deletions: If you delete a file (DELETE), any subsequent GET requests will return a 404 Not Found, ensuring the file has been deleted.
  3. Object Overwrites: If you overwrite an existing object with a new one (PUT), any subsequent GET requests will immediately reflect the new object.

Performance and Reliability:

  • No impact on performance: The read-after-write consistency is designed to ensure that S3 operations are highly performant while ensuring data consistency at the same time.
  • Highly available: S3 is designed for high durability and availability, ensuring that the object you just uploaded or deleted is consistently reflected across the S3 system.

3. S3 Eventual Consistency

Even though S3 provides strong consistency for PUT and DELETE operations, there are still edge cases where eventual consistency may apply. For example:

  • List Operations (LIST requests): When listing objects in a bucket, it is possible to encounter eventual consistency. New objects added or deleted may not immediately appear in a LIST operation across all regions. However, this inconsistency is temporary and will resolve quickly.

4. How Consistency Affects Your Application:

  • If you rely on immediate visibility of new data, such as user uploads or recently deleted files, S3’s read-after-write consistency ensures that your application will always read the latest data immediately after writing or deleting it.
  • If you are performing bulk listing operations (such as a large number of LIST requests), the results may not immediately reflect changes in a newly written or deleted object, but this will resolve quickly due to S3’s eventual consistency model in list operations.

In Summary:

  • Read-after-write consistency for PUT, POST, and DELETE operations means changes you make are immediately visible.
  • S3 provides strong consistency by default for all write and delete operations.
  • Eventual consistency can still apply to list operations, where the results of a LIST may not immediately reflect recent changes to objects in the bucket.

This change to strong consistency makes it easier to build applications that rely on immediate visibility of updates, such as file uploads, deletions, and updates, without needing to worry about temporary inconsistencies.

  • Product List
  • Documentation

billing ciem containers cost cspm ebs ec2 ecs edge eks elb event Firewall fsx hybrid iam lambda NACL outpostd policies pop princing rds route53 s3 security serverless services SG siem storage vpc

  • Amazon FSx
  • aws
  • aws notes
  • billing
  • cloud
  • compute
  • containers
  • core
  • databases
  • development
  • ebs
  • ec2
  • ecs
  • edge
  • efs
  • eks
  • hybrid
  • iam
  • lambda
  • network
  • outposts
  • pricing
  • rds
  • route53
  • s3
  • security
  • serverless
  • services
  • storage
  • support
  • vpc
©2025 AWS Technologies Blog | Built using WordPress and Responsive Blogily theme by Superb