FileSystemProps

class aws_cdk.aws_efs.FileSystemProps(*, vpc, enable_automatic_backups=None, encrypted=None, file_system_name=None, kms_key=None, lifecycle_policy=None, out_of_infrequent_access_policy=None, performance_mode=None, provisioned_throughput_per_second=None, removal_policy=None, security_group=None, throughput_mode=None, vpc_subnets=None)

Bases: object

Properties of EFS FileSystem.

Parameters:
  • vpc (IVpc) – VPC to launch the file system in.

  • enable_automatic_backups (Optional[bool]) – Whether to enable automatic backups for the file system. Default: false

  • encrypted (Optional[bool]) – Defines if the data at rest in the file system is encrypted or not. Default: - If your application has the ‘

  • file_system_name (Optional[str]) – The file system’s name. Default: - CDK generated name

  • kms_key (Optional[IKey]) – The KMS key used for encryption. This is required to encrypt the data at rest if @encrypted is set to true. Default: - if ‘encrypted’ is true, the default key for EFS (/aws/elasticfilesystem) is used

  • lifecycle_policy (Optional[LifecyclePolicy]) – A policy used by EFS lifecycle management to transition files to the Infrequent Access (IA) storage class. Default: - None. EFS will not transition files to the IA storage class.

  • out_of_infrequent_access_policy (Optional[OutOfInfrequentAccessPolicy]) – A policy used by EFS lifecycle management to transition files from Infrequent Access (IA) storage class to primary storage class. Default: - None. EFS will not transition files from IA storage to primary storage.

  • performance_mode (Optional[PerformanceMode]) – The performance mode that the file system will operate under. An Amazon EFS file system’s performance mode can’t be changed after the file system has been created. Updating this property will replace the file system. Default: PerformanceMode.GENERAL_PURPOSE

  • provisioned_throughput_per_second (Optional[Size]) – Provisioned throughput for the file system. This is a required property if the throughput mode is set to PROVISIONED. Must be at least 1MiB/s. Default: - none, errors out

  • removal_policy (Optional[RemovalPolicy]) – The removal policy to apply to the file system. Default: RemovalPolicy.RETAIN

  • security_group (Optional[ISecurityGroup]) – Security Group to assign to this file system. Default: - creates new security group which allows all outbound traffic

  • throughput_mode (Optional[ThroughputMode]) – Enum to mention the throughput mode of the file system. Default: ThroughputMode.BURSTING

  • vpc_subnets (Union[SubnetSelection, Dict[str, Any], None]) – Which subnets to place the mount target in the VPC. Default: - the Vpc default strategy if not specified

ExampleMetadata:

infused

Example:

file_system = efs.FileSystem(self, "MyEfsFileSystem",
    vpc=ec2.Vpc(self, "VPC"),
    lifecycle_policy=efs.LifecyclePolicy.AFTER_14_DAYS,  # files are not transitioned to infrequent access (IA) storage by default
    performance_mode=efs.PerformanceMode.GENERAL_PURPOSE,  # default
    out_of_infrequent_access_policy=efs.OutOfInfrequentAccessPolicy.AFTER_1_ACCESS
)

Attributes

enable_automatic_backups

Whether to enable automatic backups for the file system.

Default:

false

encrypted

Defines if the data at rest in the file system is encrypted or not.

Default:
  • If your application has the ‘

Aws-cdk:

/aws-efs:defaultEncryptionAtRest’ feature flag set, the default is true, otherwise, the default is false.

Link:

https://docs.aws.amazon.com/cdk/latest/guide/featureflags.html

file_system_name

The file system’s name.

Default:
  • CDK generated name

kms_key

The KMS key used for encryption.

This is required to encrypt the data at rest if @encrypted is set to true.

Default:
  • if ‘encrypted’ is true, the default key for EFS (/aws/elasticfilesystem) is used

lifecycle_policy

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

Default:
  • None. EFS will not transition files to the IA storage class.

out_of_infrequent_access_policy

A policy used by EFS lifecycle management to transition files from Infrequent Access (IA) storage class to primary storage class.

Default:
  • None. EFS will not transition files from IA storage to primary storage.

performance_mode

The performance mode that the file system will operate under.

An Amazon EFS file system’s performance mode can’t be changed after the file system has been created. Updating this property will replace the file system.

Default:

PerformanceMode.GENERAL_PURPOSE

provisioned_throughput_per_second

Provisioned throughput for the file system.

This is a required property if the throughput mode is set to PROVISIONED. Must be at least 1MiB/s.

Default:
  • none, errors out

removal_policy

The removal policy to apply to the file system.

Default:

RemovalPolicy.RETAIN

security_group

Security Group to assign to this file system.

Default:
  • creates new security group which allows all outbound traffic

throughput_mode

Enum to mention the throughput mode of the file system.

Default:

ThroughputMode.BURSTING

vpc

VPC to launch the file system in.

vpc_subnets

Which subnets to place the mount target in the VPC.

Default:
  • the Vpc default strategy if not specified