Skip to content

MountTarget

Source: src/AWS/EFS/MountTarget.ts

An Amazon EFS mount target — the per-subnet network endpoint (an ENI serving NFS on TCP 2049) that compute in a VPC uses to reach a file system.

Create one mount target per Availability Zone you run compute in. The reconciler waits for the mount target to reach the available state (typically 1–2 minutes), so downstream resources that depend on its attributes deploy only once the endpoint is usable. Deletion likewise waits until the mount target is fully gone, because its ENI must be released before the subnet, security groups, or file system can be deleted.

Mount target in a subnet

import * as AWS from "alchemy/AWS";
const files = yield* AWS.EFS.FileSystem("Files");
const target = yield* AWS.EFS.MountTarget("FilesTarget", {
fileSystemId: files.fileSystemId,
subnetId,
});

Mount target with explicit security groups

const target = yield* AWS.EFS.MountTarget("FilesTarget", {
fileSystemId: files.fileSystemId,
subnetId,
securityGroups: [nfsSecurityGroupId],
});