Connection module for Amazon EFS
New in version 2017.7.0.
This module accepts explicit EFS credentials but can also utilize IAM roles assigned to the instance through Instance Profiles or it can read them from the ~/.aws/credentials file or from these environment variables: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY. Dynamic credentials are then automatically obtained from AWS API and no further configuration is necessary. More information available at:
http://docs.aws.amazon.com/efs/latest/ug/ access-control-managing-permissions.html http://boto3.readthedocs.io/en/latest/guide/ configuration.html#guide-configuration
If IAM roles are not used you need to specify them either in a pillar or in the minion's config file
efs.keyid: GKTADJGHEIQSXMKKRBJ08H efs.key: askd+ghsdfjkghWupU/asdflkdfklgjsdfjajkghs
A region may also be specified in the configuration
If a region is not specified, the default is us-east-1.
It's also possible to speficy key, keyid, and region via a profile, either as a passed in dict, or as a string to pull from pillars or minion config:
myprofile: keyid: GKTADJGHEIQSXMKKRBJ08H key: askd+ghsdfjkghWupU/asdflkdfklgjsdfjajkghs region: us-east-1
create_file_system(name, performance_mode='generalPurpose', keyid=None, key=None, profile=None, region=None, creation_token=None, **kwargs)¶
Creates a new, empty file system.
salt 'my-minion' boto_efs.create_file_system efs-name generalPurpose
create_mount_target(filesystemid, subnetid, ipaddress=None, securitygroups=None, keyid=None, key=None, profile=None, region=None, **kwargs)¶
Creates a mount target for a file system. You can then mount the file system on EC2 instances via the mount target.
You can create one mount target in each Availability Zone in your VPC. All EC2 instances in a VPC within a given Availability Zone share a single mount target for a given file system.
If you have multiple subnets in an Availability Zone, you create a mount target in one of the subnets. EC2 instances do not need to be in the same subnet as the mount target in order to access their file system.
salt 'my-minion' boto_efs.create_mount_target filesystemid subnetid
Creates or overwrites tags associated with a file system. Each tag is a key-value pair. If a tag key specified in the request already exists on the file system, this operation overwrites its value with the value provided in the request.
salt 'my-minion' boto_efs.create_tags
delete_file_system(filesystemid, keyid=None, key=None, profile=None, region=None, **kwargs)¶
Deletes a file system, permanently severing access to its contents. Upon return, the file system no longer exists and you can't access any contents of the deleted file system. You can't delete a file system that is in use. That is, if the file system has any mount targets, you must first delete them.
salt 'my-minion' boto_efs.delete_file_system filesystemid
delete_mount_target(mounttargetid, keyid=None, key=None, profile=None, region=None, **kwargs)¶
Deletes the specified mount target.
This operation forcibly breaks any mounts of the file system via the mount target that is being deleted, which might disrupt instances or applications using those mounts. To avoid applications getting cut off abruptly, you might consider unmounting any mounts of the mount target, if feasible. The operation also deletes the associated network interface. Uncommitted writes may be lost, but breaking a mount target using this operation does not corrupt the file system itself. The file system you created remains. You can mount an EC2 instance in your VPC via another mount target.
salt 'my-minion' boto_efs.delete_mount_target mounttargetid
Deletes the specified tags from a file system.
salt 'my-minion' boto_efs.delete_tags
get_file_systems(filesystemid=None, keyid=None, key=None, profile=None, region=None, creation_token=None, **kwargs)¶
Get all EFS properties or a specific instance property if filesystemid is specified
salt 'my-minion' boto_efs.get_file_systems efs-id
get_mount_targets(filesystemid=None, mounttargetid=None, keyid=None, key=None, profile=None, region=None, **kwargs)¶
Get all the EFS mount point properties for a specific filesystemid or the properties for a specific mounttargetid. One or the other must be specified
salt 'my-minion' boto_efs.get_mount_targets
Return the tags associated with an EFS instance.
salt 'my-minion' boto_efs.get_tags efs-id
set_security_groups(mounttargetid, securitygroup, keyid=None, key=None, profile=None, region=None, **kwargs)¶
Modifies the set of security groups in effect for a mount target
salt 'my-minion' boto_efs.set_security_groups my-mount-target-id my-sec-group