Amazon Elastic File System

2021/09/02 - Amazon Elastic File System - 2 updated api methods

Changes  Adds support for EFS Intelligent-Tiering, which uses EFS Lifecycle Management to monitor file access patterns and is designed to automatically transition files to and from your corresponding Infrequent Access (IA) storage classes.

DescribeLifecycleConfiguration (updated) Link ¶
Changes (response)
{'LifecyclePolicies': {'TransitionToPrimaryStorageClass': 'AFTER_1_ACCESS'}}

Returns the current LifecycleConfiguration object for the specified Amazon EFS file system. EFS lifecycle management uses the LifecycleConfiguration object to identify which files to move to the EFS Infrequent Access (IA) storage class. For a file system without a LifecycleConfiguration object, the call returns an empty array in the response.

When EFS Intelligent Tiering is enabled, TransitionToPrimaryStorageClass has a value of AFTER_1_ACCESS .

This operation requires permissions for the elasticfilesystem:DescribeLifecycleConfiguration operation.

See also: AWS API Documentation

Request Syntax

client.describe_lifecycle_configuration(
    FileSystemId='string'
)
type FileSystemId

string

param FileSystemId

[REQUIRED]

The ID of the file system whose LifecycleConfiguration object you want to retrieve (String).

rtype

dict

returns

Response Syntax

{
    'LifecyclePolicies': [
        {
            'TransitionToIA': 'AFTER_7_DAYS'|'AFTER_14_DAYS'|'AFTER_30_DAYS'|'AFTER_60_DAYS'|'AFTER_90_DAYS',
            'TransitionToPrimaryStorageClass': 'AFTER_1_ACCESS'
        },
    ]
}

Response Structure

  • (dict) --

    • LifecyclePolicies (list) --

      An array of lifecycle management policies. EFS supports a maximum of one policy per file system.

      • (dict) --

        Describes a policy used by EFS lifecycle management to transition files to the Infrequent Access (IA) storage class.

        • TransitionToIA (string) --

          Describes the period of time that a file is not accessed, after which it transitions to the IA storage class. Metadata operations such as listing the contents of a directory don't count as file access events.

        • TransitionToPrimaryStorageClass (string) --

          Describes the policy used to transition a file from infequent access storage to primary storage.

PutLifecycleConfiguration (updated) Link ¶
Changes (both)
{'LifecyclePolicies': {'TransitionToPrimaryStorageClass': 'AFTER_1_ACCESS'}}

Enables lifecycle management by creating a new LifecycleConfiguration object. A LifecycleConfiguration object defines when files in an Amazon EFS file system are automatically transitioned to the lower-cost EFS Infrequent Access (IA) storage class. To enable EFS Intelligent Tiering, set the value of TransitionToPrimaryStorageClass to AFTER_1_ACCESS . For more information, see EFS Lifecycle Management.

A LifecycleConfiguration applies to all files in a file system.

Each Amazon EFS file system supports one lifecycle configuration, which applies to all files in the file system. If a LifecycleConfiguration object already exists for the specified file system, a PutLifecycleConfiguration call modifies the existing configuration. A PutLifecycleConfiguration call with an empty LifecyclePolicies array in the request body deletes any existing LifecycleConfiguration and disables lifecycle management.

In the request, specify the following:

  • The ID for the file system for which you are enabling, disabling, or modifying lifecycle management.

  • A LifecyclePolicies array of LifecyclePolicy objects that define when files are moved to the IA storage class. The array can contain only one LifecyclePolicy item.

This operation requires permissions for the elasticfilesystem:PutLifecycleConfiguration operation.

To apply a LifecycleConfiguration object to an encrypted file system, you need the same Key Management Service permissions as when you created the encrypted file system.

See also: AWS API Documentation

Request Syntax

client.put_lifecycle_configuration(
    FileSystemId='string',
    LifecyclePolicies=[
        {
            'TransitionToIA': 'AFTER_7_DAYS'|'AFTER_14_DAYS'|'AFTER_30_DAYS'|'AFTER_60_DAYS'|'AFTER_90_DAYS',
            'TransitionToPrimaryStorageClass': 'AFTER_1_ACCESS'
        },
    ]
)
type FileSystemId

string

param FileSystemId

[REQUIRED]

The ID of the file system for which you are creating the LifecycleConfiguration object (String).

type LifecyclePolicies

list

param LifecyclePolicies

[REQUIRED]

An array of LifecyclePolicy objects that define the file system's LifecycleConfiguration object. A LifecycleConfiguration object tells lifecycle management when to transition files from the Standard storage class to the Infrequent Access storage class.

  • (dict) --

    Describes a policy used by EFS lifecycle management to transition files to the Infrequent Access (IA) storage class.

    • TransitionToIA (string) --

      Describes the period of time that a file is not accessed, after which it transitions to the IA storage class. Metadata operations such as listing the contents of a directory don't count as file access events.

    • TransitionToPrimaryStorageClass (string) --

      Describes the policy used to transition a file from infequent access storage to primary storage.

rtype

dict

returns

Response Syntax

{
    'LifecyclePolicies': [
        {
            'TransitionToIA': 'AFTER_7_DAYS'|'AFTER_14_DAYS'|'AFTER_30_DAYS'|'AFTER_60_DAYS'|'AFTER_90_DAYS',
            'TransitionToPrimaryStorageClass': 'AFTER_1_ACCESS'
        },
    ]
}

Response Structure

  • (dict) --

    • LifecyclePolicies (list) --

      An array of lifecycle management policies. EFS supports a maximum of one policy per file system.

      • (dict) --

        Describes a policy used by EFS lifecycle management to transition files to the Infrequent Access (IA) storage class.

        • TransitionToIA (string) --

          Describes the period of time that a file is not accessed, after which it transitions to the IA storage class. Metadata operations such as listing the contents of a directory don't count as file access events.

        • TransitionToPrimaryStorageClass (string) --

          Describes the policy used to transition a file from infequent access storage to primary storage.