For an overview of the Object Lock feature and an understanding of the differences between compliance and object lock, refer to Immutability: Compliance and Object Lock. The difference is important to understand because if you create a bucket that has object lock enabled, compliance is automatically disabled.
The Object Lock feature must be enabled before you can use the functionality. Enabling object lock can be done only during bucket creation. You cannot enable object lock on existing buckets of data. Before defining object lock settings, you should review the Object Lock Features.
The feature described below defines object lock retention settings, and this is available ONLY if object lock was enabled when the bucket was created. Changing the object lock settings does not affect any of the existing objects inside the bucket. These settings only apply to objects that are newly placed into the bucket and come with no associated object lock settings.