dotnetv3/S3/scenarios/S3ObjectLockScenario/README.md
This example shows how to use AWS SDKs to work with Amazon Simple Storage Service (Amazon S3) object locking features. The workflow demonstrates how to create, update, view, and modify object locks, as well as how locked objects behave regarding requests to delete and overwrite.
Amazon S3 Object Lock can help prevent Amazon S3 objects from being deleted or overwritten for a fixed amount of time or indefinitely. Object Lock can help meet regulatory requirements or protect against object changes or deletion.
This workflow demonstrates the following steps and tasks:
For general prerequisites, see the README in the dotnetv3 folder.
The feature scenario steps create the buckets and objects needed for the example. No additional resources are required.
This workflow includes an optional step to add a governance mode retention period of one day to objects in an S3 bucket. In order to delete these objects, you must have the s3:BypassGovernanceRetention permission. If you do not have this permission, you will be unable to delete these objects until the retention period has expired.
After the example compiles, you can run it from the command line. To do so, navigate to the folder that contains the .sln file and run the following command:
dotnet run
Alternatively, you can run the example from within your IDE.
This starts an interactive scenario that walks you through creating, exploring, and deleting S3 buckets and objects with various object lock settings.
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0