Managing file system storage - 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 file system storage

To manage your file systems so that they are stored cost effectively throughout their lifecycle, use lifecycle management automatically transitions data between storage classes according to the lifecycle configuration defined for the file system. The lifecycle configuration is a set of lifecycle policies that define when to transition the file system's data to another storage class.

Lifecycle policies

Lifecycle policies instruct lifecycle management when to transition files into and out of the EFS Infrequent Access (IA) and EFS Archive storage classes. Transition time is based on when the files were last accessed in the Standard storage class. Lifecycle policies apply to the entire EFS file system.

The EFS lifecycle policies are:

  • Transition into IA – Instructs lifecycle management when to move files into the Infrequent Access storage, which is cost-optimized for data that is accessed only a few times each quarter. By default, files that are not accessed in Standard storage for 30 days are transitioned into IA.

  • Transition into Archive – Instructs lifecycle management when to move files into the Archive storage class, which is cost-optimized for data that is accessed only a few times each year or less. By default, files that are not accessed in Standard storage for 90 days are transitioned into Archive.

  • Transition into Standard – Instructs lifecycle management whether to transition files out of IA or Archive and back into Standard storage, which provides sub-millisecond read latencies for frequently-accessed data. By default, files are not moved back to Standard storage and they remain in the IA or Archive storage class. For performance-sensitive use cases that demand the fastest latency performance (such as applications that work with a large volume of small files), choose to transition files into Standard storage On first access.

For more information about configuring the lifecycle policies for a file system, see Managing lifecycle policies for a file system.

To determine last accessed time in the Standard storage class, an internal timer tracks when a file was last accessed (not the POSIX file system attributes that are publicly viewable). Whenever a file in Standard is accessed, the lifecycle management timer is reset. After lifecycle management moves a file into the IA or Archive storage classes, the file remains there indefinitely unless the Transition into Standard policy is set, which instructs lifecycle management to move files back to Standard when accessed.

Metadata operations, such as listing the contents of a directory, don't count as file access. During the process of transitioning a file's content to the IA or Archive storage classes, the file is stored in the Standard storage class and is billed at that storage rate.

File system operations for lifecycle management

File system operations for lifecycle management have a lower priority than operations for EFS file system workloads. The time required to transition files into or out of IA and Archive storage varies depending on the file size and file system workload.

File metadata, including file names, ownership information, and file system directory structure, is always stored in Standard to help ensure consistent metadata performance. All write operations to files in the file system's IA or Archive storage classes are first written to Standard storage classes, and are then eligible to be transitioned to the applicable storage class after 24 hours.

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 Step 1: Create your Amazon EFS file system.

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": [] }