With S3 Versioning enabled on the bucket, how will billing be applied for the following scenario using the same key for upload? Total days bucket in use: 25 days. 1st File uploaded on 1st Day of the use - 1 GB.2nd File uploaded within the same bucket on the 15th Day of the use - 5 GB.
Click on the arrows to vote for the correct answer
A. B. C. D.Answer: B.
When versioning is enabled on the S3 bucket, and a new version is added to an existing object, remember that the older version still remains and AWS charges the same price for old versions and new versions.
In the given use case, 1 GB uploaded on day 1 remains in S3 for 25 days.
5 GB uploaded on day 15 will be in S3 for only 11 days.
When versioning is enabled on an S3 bucket, each version of an object is stored as a separate object, and each object version has a unique version ID. In this scenario, we have two versions of the object with the same key, and both versions have been uploaded within the same bucket.
Now, let's consider each option:
A. Charges 6 GB for 25 days. This option assumes that S3 charges for the total storage consumed by all versions of the object for the entire duration of the bucket usage. However, this is not correct. S3 charges based on the amount of storage consumed by each version of the object and the duration that each version is stored.
B. Charges 1 GB for 25 days and 5 GB for 11 days. This option is correct. S3 charges for each version of the object based on the amount of storage consumed and the duration that each version is stored. In this case, the first version of the object is 1 GB and is stored for the entire duration of the bucket usage (25 days). The second version of the object is 5 GB and is stored for 11 days. Therefore, the total charge will be for 1 GB for 25 days and 5 GB for 11 days.
C. Charges 1 GB for 14 days and 5 GB for 11 days. This option assumes that the first version of the object is deleted or overwritten by the second version of the object. However, with versioning enabled, both versions are stored, and S3 charges for the storage and duration of each version.
D. Charges 5 GB for 25 days. This option assumes that only the latest version of the object is stored, and S3 charges based on the storage and duration of the latest version. However, with versioning enabled, all versions of the object are stored, and S3 charges for the storage and duration of each version.
Therefore, the correct answer is B. S3 will charge for 1 GB for 25 days and 5 GB for 11 days.