Skip to main content

file_systems

Creates, updates, deletes or gets a file_system resource or lists file_systems in a region

Overview

Namefile_systems
TypeResource
DescriptionThe ``AWS::EFS::FileSystem`` resource creates a new, empty file system in EFSlong (EFS). You must create a mount target ([AWS::EFS::MountTarget](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-efs-mounttarget.html)) to mount your EFS file system on an EC2 or other AWS cloud compute resource.
Idawscc.efs.file_systems

Fields

NameDatatypeDescription
file_system_idstring
arnstring
encryptedbooleanA Boolean value that, if true, creates an encrypted file system. When creating an encrypted file system, you have the option of specifying a KmsKeyId for an existing kms-key-long. If you don't specify a kms-key, then the default kms-key for EFS, ``/aws/elasticfilesystem``, is used to protect the encrypted file system.
file_system_tagsarrayUse to create one or more tags associated with the file system. Each tag is a user-defined key-value pair. Name your file system on creation by including a ``"Key":"Name","Value":"{value}"`` key-value pair. Each key must be unique. For more information, see [Tagging resources](https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) in the *General Reference Guide*.
kms_key_idstringThe ID of the kms-key-long to be used to protect the encrypted file system. This parameter is only required if you want to use a nondefault kms-key. If this parameter is not specified, the default kms-key for EFS is used. This ID can be in one of the following formats:<br />+ Key ID - A unique identifier of the key, for example &#96;&#96;1234abcd-12ab-34cd-56ef-1234567890ab&#96;&#96;.<br />+ ARN - An Amazon Resource Name (ARN) for the key, for example &#96;&#96;arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab&#96;&#96;.<br />+ Key alias - A previously created display name for a key, for example &#96;&#96;alias/projectKey1&#96;&#96;.<br />+ Key alias ARN - An ARN for a key alias, for example &#96;&#96;arn:aws:kms:us-west-2:444455556666:alias/projectKey1&#96;&#96;.<br /><br />If &#96;&#96;KmsKeyId&#96;&#96; is specified, the &#96;&#96;Encrypted&#96;&#96; parameter must be set to true.
lifecycle_policiesarrayAn array of &#96;&#96;LifecyclePolicy&#96;&#96; objects that define the file system's &#96;&#96;LifecycleConfiguration&#96;&#96; object. A &#96;&#96;LifecycleConfiguration&#96;&#96; object informs Lifecycle management of the following:<br />+ When to move files in the file system from primary storage to IA storage.<br />+ When to move files in the file system from primary storage or IA storage to Archive storage.<br />+ When to move files that are in IA or Archive storage to primary storage.<br /><br />EFS requires that each &#96;&#96;LifecyclePolicy&#96;&#96; object have only a single transition. This means that in a request body, &#96;&#96;LifecyclePolicies&#96;&#96; needs to be structured as an array of &#96;&#96;LifecyclePolicy&#96;&#96; objects, one object for each transition, &#96;&#96;TransitionToIA&#96;&#96;, &#96;&#96;TransitionToArchive&#96;&#96;&#96;&#96;TransitionToPrimaryStorageClass&#96;&#96;. See the example requests in the following section for more information.
file_system_protectionobjectDescribes the protection on the file system.
performance_modestringThe performance mode of the file system. We recommend &#96;&#96;generalPurpose&#96;&#96; performance mode for all file systems. File systems using the &#96;&#96;maxIO&#96;&#96; performance mode can scale to higher levels of aggregate throughput and operations per second with a tradeoff of slightly higher latencies for most file operations. The performance mode can't be changed after the file system has been created. The &#96;&#96;maxIO&#96;&#96; mode is not supported on One Zone file systems.<br />Due to the higher per-operation latencies with Max I/O, we recommend using General Purpose performance mode for all file systems.<br />Default is &#96;&#96;generalPurpose&#96;&#96;.
provisioned_throughput_in_mibpsnumberThe throughput, measured in mebibytes per second (MiBps), that you want to provision for a file system that you're creating. Required if &#96;&#96;ThroughputMode&#96;&#96; is set to &#96;&#96;provisioned&#96;&#96;. Valid values are 1-3414 MiBps, with the upper limit depending on Region. To increase this limit, contact SUP. For more information, see &#91;Amazon EFS quotas that you can increase&#93;(https://docs.aws.amazon.com/efs/latest/ug/limits.html#soft-limits) in the &#42;Amazon EFS User Guide&#42;.
throughput_modestringSpecifies the throughput mode for the file system. The mode can be &#96;&#96;bursting&#96;&#96;, &#96;&#96;provisioned&#96;&#96;, or &#96;&#96;elastic&#96;&#96;. If you set &#96;&#96;ThroughputMode&#96;&#96; to &#96;&#96;provisioned&#96;&#96;, you must also set a value for &#96;&#96;ProvisionedThroughputInMibps&#96;&#96;. After you create the file system, you can decrease your file system's Provisioned throughput or change between the throughput modes, with certain time restrictions. For more information, see &#91;Specifying throughput with provisioned mode&#93;(https://docs.aws.amazon.com/efs/latest/ug/performance.html#provisioned-throughput) in the &#42;Amazon EFS User Guide&#42;. <br />Default is &#96;&#96;bursting&#96;&#96;.
file_system_policyobjectThe &#96;&#96;FileSystemPolicy&#96;&#96; for the EFS file system. A file system policy is an IAM resource policy used to control NFS access to an EFS file system. For more information, see &#91;Using to control NFS access to Amazon EFS&#93;(https://docs.aws.amazon.com/efs/latest/ug/iam-access-control-nfs-efs.html) in the &#42;Amazon EFS User Guide&#42;.
bypass_policy_lockout_safety_checkboolean(Optional) A boolean that specifies whether or not to bypass the &#96;&#96;FileSystemPolicy&#96;&#96; lockout safety check. The lockout safety check determines whether the policy in the request will lock out, or prevent, the IAM principal that is making the request from making future &#96;&#96;PutFileSystemPolicy&#96;&#96; requests on this file system. Set &#96;&#96;BypassPolicyLockoutSafetyCheck&#96;&#96; to &#96;&#96;True&#96;&#96; only when you intend to prevent the IAM principal that is making the request from making subsequent &#96;&#96;PutFileSystemPolicy&#96;&#96; requests on this file system. The default value is &#96;&#96;False&#96;&#96;.
backup_policyobjectUse the &#96;&#96;BackupPolicy&#96;&#96; to turn automatic backups on or off for the file system.
availability_zone_namestringFor One Zone file systems, specify the AWS Availability Zone in which to create the file system. Use the format &#96;&#96;us-east-1a&#96;&#96; to specify the Availability Zone. For more information about One Zone file systems, see &#91;EFS file system types&#93;(https://docs.aws.amazon.com/efs/latest/ug/availability-durability.html#file-system-type) in the &#42;Amazon EFS User Guide&#42;.<br />One Zone file systems are not available in all Availability Zones in AWS-Regions where Amazon EFS is available.
replication_configurationobjectDescribes the replication configuration for a specific file system.
regionstringAWS region.

For more information, see AWS::EFS::FileSystem.

Methods

NameAccessible byRequired Params
create_resourceINSERTregion
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all properties from an individual file_system.

SELECT
region,
file_system_id,
arn,
encrypted,
file_system_tags,
kms_key_id,
lifecycle_policies,
file_system_protection,
performance_mode,
provisioned_throughput_in_mibps,
throughput_mode,
file_system_policy,
bypass_policy_lockout_safety_check,
backup_policy,
availability_zone_name,
replication_configuration
FROM awscc.efs.file_systems
WHERE region = 'us-east-1' AND data__Identifier = '<FileSystemId>';

INSERT example

Use the following StackQL query and manifest file to create a new file_system resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.efs.file_systems (
Encrypted,
FileSystemTags,
KmsKeyId,
LifecyclePolicies,
FileSystemProtection,
PerformanceMode,
ProvisionedThroughputInMibps,
ThroughputMode,
FileSystemPolicy,
BypassPolicyLockoutSafetyCheck,
BackupPolicy,
AvailabilityZoneName,
ReplicationConfiguration,
region
)
SELECT
'{{ Encrypted }}',
'{{ FileSystemTags }}',
'{{ KmsKeyId }}',
'{{ LifecyclePolicies }}',
'{{ FileSystemProtection }}',
'{{ PerformanceMode }}',
'{{ ProvisionedThroughputInMibps }}',
'{{ ThroughputMode }}',
'{{ FileSystemPolicy }}',
'{{ BypassPolicyLockoutSafetyCheck }}',
'{{ BackupPolicy }}',
'{{ AvailabilityZoneName }}',
'{{ ReplicationConfiguration }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM awscc.efs.file_systems
WHERE data__Identifier = '<FileSystemId>'
AND region = 'us-east-1';

Permissions

To operate on the file_systems resource, the following permissions are required:

Create

elasticfilesystem:CreateFileSystem,
elasticfilesystem:DescribeReplicationConfigurations,
elasticfilesystem:TagResource,
elasticfilesystem:CreateReplicationConfiguration,
elasticfilesystem:DescribeFileSystems,
elasticfilesystem:PutBackupPolicy,
elasticfilesystem:PutFileSystemPolicy,
elasticfilesystem:PutLifecycleConfiguration,
elasticfilesystem:UpdateFileSystemProtection,
kms:DescribeKey,
kms:GenerateDataKeyWithoutPlaintext,
kms:CreateGrant,
iam:PassRole,
iam:CreateServiceLinkedRole

Read

elasticfilesystem:DescribeBackupPolicy,
elasticfilesystem:DescribeFileSystemPolicy,
elasticfilesystem:DescribeFileSystems,
elasticfilesystem:DescribeLifecycleConfiguration,
elasticfilesystem:DescribeReplicationConfigurations

Update

elasticfilesystem:CreateReplicationConfiguration,
elasticfilesystem:DeleteFileSystemPolicy,
elasticfilesystem:DescribeBackupPolicy,
elasticfilesystem:DescribeFileSystemPolicy,
elasticfilesystem:DescribeFileSystems,
elasticfilesystem:DescribeLifecycleConfiguration,
elasticfilesystem:DescribeReplicationConfigurations,
elasticfilesystem:DeleteTags,
elasticfilesystem:DeleteReplicationConfiguration,
elasticfilesystem:ListTagsForResource,
elasticfilesystem:PutBackupPolicy,
elasticfilesystem:PutFileSystemPolicy,
elasticfilesystem:PutLifecycleConfiguration,
elasticfilesystem:TagResource,
elasticfilesystem:UntagResource,
elasticfilesystem:UpdateFileSystem,
elasticfilesystem:UpdateFileSystemProtection,
kms:DescribeKey,
kms:GenerateDataKeyWithoutPlaintext,
kms:CreateGrant,
iam:PassRole,
iam:CreateServiceLinkedRole

Delete

elasticfilesystem:DescribeFileSystems,
elasticfilesystem:DeleteFileSystem,
elasticfilesystem:DeleteReplicationConfiguration,
elasticfilesystem:DescribeReplicationConfigurations

List

elasticfilesystem:DescribeBackupPolicy,
elasticfilesystem:DescribeFileSystemPolicy,
elasticfilesystem:DescribeFileSystems,
elasticfilesystem:DescribeLifecycleConfiguration,
elasticfilesystem:DescribeReplicationConfigurations