S3 Object Lock can be enabled easily on the bucket for all new objects with a default lock. For existing objects, you can use S3 Batch Operations with S3 Object Lock to place a lock or extend any existing retention, or enable or remove a legal hold for up to billions of objects at once. You specify the list of target objects in your manifest and submit it to Batch Operations for completion.
Like all other S3 Object Lock settings, retention periods apply to individual object versions. Different versions of a single object can have different retention modes and periods.
For example, suppose that you have an object that is 15 days into a 30-day retention period, and you upload a new object into Amazon S3 with the same name and a 60-day retention period. In this case, your upload succeeds, and Amazon S3 creates a new version of the object with a 60-day retention period. The older version maintains its original retention period and becomes deletable in 15 days.
You can extend a retention period after you've applied a retention setting to an object version. To do this, submit a new lock request using S3 Batch Operations for the object version with a Retain Until Date that is later than the one currently configured for the object version. Amazon S3 replaces the existing retention period with the new, longer period. Learn more.