Directory
Source:
src/AWS/DirectoryService/Directory.ts
An AWS Directory Service managed directory — either Simple AD (Samba) or AWS Managed Microsoft AD.
Directories are VPC-only and require two subnets in different Availability Zones. Provisioning is SLOW: Simple AD takes roughly 10 minutes and Microsoft AD 20-40 minutes, and directories bill hourly while they exist. Destroy directories you are not using.
Creating a Directory
Section titled “Creating a Directory”Simple AD Directory
const directory = yield* Directory("Corp", { name: "corp.example.com", password: Redacted.make("SuperSecret123!"), size: "Small", vpcId: vpc.vpcId, subnetIds: [subnetA.subnetId, subnetB.subnetId],});Managed Microsoft AD Directory
const directory = yield* Directory("Corp", { type: "MicrosoftAD", name: "corp.example.com", shortName: "CORP", password: Redacted.make("SuperSecret123!"), edition: "Standard", vpcId: vpc.vpcId, subnetIds: [subnetA.subnetId, subnetB.subnetId],});Using the Directory
Section titled “Using the Directory”const directory = yield* Directory("Corp", { ... });// the directory-provided DNS servers, one per Availability Zoneconst dns = directory.dnsIpAddrs;