Managing lifecycle policies for a file system - Amazon Elastic File System
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Managing lifecycle policies for a file system

When you create an Amazon EFS file system that uses the service recommended settings using the Amazon Web Services Management Console, the file system's lifecycle policies use the following default settings:

  • Transition into IA is set to 30 days since last access.

  • Transition into Archive is set to 90 days since last access.

  • Transition into Standard is set to None.

For more information about creating a file system with the service recommended settings, see Quick create a file system that has recommended settings (console).

You can configure the lifecycle policies after the file system has been created or when creating a file system with customized settings.

Possible values for the Transition into IA and Transition into Archive lifecycle policies include:

  • None

  • 1 day since last access

  • 7 days since last access

  • 14 days since last access

  • 30 days since last access

  • 60 days since last access

  • 90 days since last access

  • 180 days since last access

  • 270 days since last access

  • 365 days since last access

Possible values for the Transition into Standard lifecycle policy includes:

  • None

  • On first access

You can configure lifecycle policies using the Amazon Web Services Management Console and the Amazon CLI, as described in the following procedures.

You can use the Amazon Web Services Management Console to set the lifecycle policies for an existing file system.

  1. Sign in to the Amazon Web Services Management Console and open the Amazon EFS console at https://console.amazonaws.cn/efs/.

  2. Choose File systems to display the list of file systems in your account.

  3. Choose the file system on which you want to modify lifecycle policies.

  4. On the file system details page, in the General section, choose Edit. The Edit page displays.

  5. For Lifecycle management, you can change the following lifecycle policies:

    • Set Transition into IA to one of the available settings. To stop moving files into IA storage, choose None.

    • Set Transition into Archive to one of the available settings. To stop moving files into Archive storage, choose None.

    • Set Transition into Standard to On first access to move files that are in IA storage to standard storage when they're accessed for non-metadata operations.

      To stop moving files from IA or Archive to Standard storage on first access, set to None.

  6. Choose Save changes to save your changes.

You can use the Amazon CLI to set or modify a file system's lifecycle policies.

  • Run the put-lifecycle-configuration Amazon CLI command or the PutLifecycleConfiguration API command, specifying the file system ID of the file system for which you are managing lifecycle management.

    $ aws efs put-lifecycle-configuration \ --file-system-id File-System-ID \ --lifecycle-policies "[{\"TransitionToIA\":\"AFTER_60_DAYS\"},{\"TransitionToPrimaryStorageClass\":\"AFTER_1_ACCESS\"},{\"TransitionToArchive\":\"AFTER_90_DAYS\"}]" \ --region us-west-2 \ --profile adminuser

    You get the following response.

    { "LifecyclePolicies": [ { "TransitionToIA": "AFTER_60_DAYS" }, { "TransitionToPrimaryStorageClass": "AFTER_1_ACCESS" }, { "TransitionToArchive": "AFTER_90_DAYS" } ] }
To stop lifecycle management for an existing file system (CLI)
  • Run the put-lifecycle-configuration command specifying the file system ID of the file system for which you are stopping lifecycle management. Keep the --lifecycle-policies property empty.

    $ aws efs put-lifecycle-configuration \ --file-system-id File-System-ID \ --lifecycle-policies \ --region us-west-2 \ --profile adminuser

    You get the following response.

    { "LifecyclePolicies": [] }