AWS S3 Data Consistency model
S3 Data Consistency ensures strong read-after-write consistency when requesting PUT or DELETE objects from the S3 bucket in all AWS regions
This behavior is applicable to both writes to new objects and PUT requests that overwrite existing object and DELETE requests.
Strongly consistent read operations on S3 Select and S3 ACLs, S3 Tags, S3 Metadata, and S3 Object Tags (for example, HEAD) are possible.
Updates to a single key can be done atomically. For example, if you PUT to an already existing key, a subsequent reading might return the old or the updated data but it will never write corrupted data.
S3 ensures high availability through the replication of data across multiple servers in Amazon’s data centers. The data is stored safely if a PUT request succeeds. Any read (GET, LIST) request that is initiated after receiving a successful PUT response will return data written by the request.
Examples of S3 Data Consistency behavior The new object is added to the list.
A process replaces an object and immediately attempts to read it. S3 returns the new data.
A process erases an object and attempts to read it immediately. S3 doesn’t return any data since the object has been deleted.
A process removes an object and lists keys in its bucket. The listing does not include the object.
S3 currently does not support concurrent writes with object locking. For example, For example, This issue can be resolved by integrating an object-locking mechanism in your application.
Updates are key-based. There is no way to make atomic changes across keys. For example, an update of a key cannot be dependent upon another key’s update unless this functionality is built into the application.
S3 Object Lock is unique because it allows you to store objects using a write once-read-many model (WORM). This prevents an object being deleted or overwritten for a set amount of time or indefinitely.
Strong Read-after-Write consistency in S3 for PUTS new objects. S3 synchronizes data across multiple facilities before returning successful.
A process writes a new object in S3 and is immediately able to access the object. PUT 200 -> GET 200
A process creates a new object in S3 and lists the keys within its bucket. The object may not appear in the list until the change has been fully propagated.
However, if a HEAD request to a keyname is made prior to the object being created, then the object may be created shortly thereafter. A subsequent GET might not return it due to eventual consistency. i.e. GET 404 -> PUT 200 -> GET 404
S3 provides Eventual Consistency to overwrite PUTS or DELETES in all regions. The changes are eventually reflected but not immediately available i.e. PUT 200-> PUT 200-> GET 200 (might not be an older version) OR DELETE 220-> GET 200
If a process attempts to read an object that is being replaced by another, S3 might return the previous data until the change is fully propagated.
If a process deletes an object and attempts to read it immediately, S3 might return the deleted data. This is until the deletion is fully propagated.
If a process deletes an object, it might list keys in its bucket immediately. S3 might list the deleted object until it is fully propagated. Questions for the AWS Certification Exam
Questions are collected via the Internet. The answers are marked according to my knowledge and understanding (which may differ from yours).
AWS services are constantly updated and the answers and questions may be out of date soon. So make sure to research accordingly.
AWS exam questions do not get updated to keep pace with AWS updates.