Skip to content
GitHubXDiscordRSS

AccessPoint

Learn how to create, update, and manage AWS EFS AccessPoints using Alchemy Cloud Control.

The AccessPoint resource allows you to manage AWS EFS AccessPoints that simplify the management of file system permissions and access for your applications.

Create a basic EFS AccessPoint with required properties and one optional root directory.

import AWS from "alchemy/aws/control";
const basicAccessPoint = await AWS.EFS.AccessPoint("basicAccessPoint", {
FileSystemId: "fs-12345678",
RootDirectory: {
Path: "/data",
CreationInfo: {
OwnerUid: "1001",
OwnerGid: "1001",
Permissions: "750"
}
}
});

Configure an AccessPoint with advanced settings like POSIX user and tags.

const advancedAccessPoint = await AWS.EFS.AccessPoint("advancedAccessPoint", {
FileSystemId: "fs-12345678",
PosixUser: {
Gid: "1001",
Uid: "1001",
SecondaryGid: ["1002"]
},
AccessPointTags: [
{ Key: "Environment", Value: "Production" },
{ Key: "Team", Value: "DevOps" }
]
});

Demonstrate how to adopt an existing EFS AccessPoint if it already exists.

const adoptExistingAccessPoint = await AWS.EFS.AccessPoint("existingAccessPoint", {
FileSystemId: "fs-12345678",
adopt: true
});

Create an AccessPoint while using a client token for idempotency.

const accessPointWithClientToken = await AWS.EFS.AccessPoint("clientTokenAccessPoint", {
FileSystemId: "fs-12345678",
ClientToken: "unique-client-token-12345"
});