Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 3.143.241.205
**To create an object lifecycle policy**
The following ``put-lifecycle-policy`` example attaches an object lifecycle policy to the specified container. This enables you to specify how long the service should store objects in your container. MediaStore deletes objects in the container once they reach their expiration date, as indicated in the policy, which is in the file named ``LiveEventsLifecyclePolicy.json``. ::
aws mediastore put-lifecycle-policy \
--container-name ExampleContainer \
--lifecycle-policy file://ExampleLifecyclePolicy.json
This command produces no output.
For more information, see `Adding an Object Lifecycle Policy to a Container <https://docs.aws.amazon.com/mediastore/latest/ug/policies-object-lifecycle-add.html>`__ in the *AWS Elemental MediaStore User Guide*.
|