Skip to main content

AwsEfsFilesystemModule

AwsEfsFilesystemModule creates an EFS filesystem in a region (filesystemName) that containers mount and share, for files that outlive any one task.

@cost

EFS bills the data stored per GB-month, about $0.30 for Standard storage in us-east-1, with throughput included. An empty filesystem costs nothing.

@downtime

A replacement deletes the filesystem and creates an empty one; whatever mounts it loses its files meanwhile.

@example

TypeScript

import { type Region, stub } from '@quadnix/octo';
import { AwsEfsFilesystemModule } from '@quadnix/octo-aws-cdk/modules/filesystem/aws-efs-filesystem';

octo.loadModule(AwsEfsFilesystemModule, 'my-filesystem-module', {
filesystemName: 'shared-data',
region: stub<Region>('${{my-region-module.model.region}}')
});
@group

Modules/Filesystem/AwsEfsFilesystem

@limit

The filesystem is not encrypted at rest and has no automatic backups.

@limit

Throughput bursts in proportion to the data stored, so a nearly empty filesystem has little baseline throughput.

@limit

The filesystem uses the General Purpose performance mode, never Max I/O.

@losesData

Deleting the module, or a change that replaces the filesystem, deletes every file on it, which octo cannot put back.

@replaces

Changing filesystemName or region replaces the filesystem.

@see

Hierarchy

Index

Constructors

constructor

  • Parameters

    • moduleId: string

      The ID this module is loaded under.

    Returns AwsEfsFilesystemModule

Properties

readonlyinheritedmoduleId

moduleId: string

The ID this module was loaded under. It scopes everything the module produces, so the same module class can be loaded more than once.

staticreadonlyinheritedMODULE_PACKAGE

MODULE_PACKAGE: string

The package the module is registered under, set by Module.

staticreadonlyinheritedMODULE_SCHEMA

MODULE_SCHEMA: any

The schema of the module's inputs, set by Module.

Methods

onInit

  • Creates the filesystem in its region, and anchors it so a subnet module can mount it.


    Parameters

    Returns Promise<AwsEfsFilesystem>

inheritedregisterHooks

  • registerHooks(): { postCommitHooks?: PostHookSignature[]; postModelActionHooks?: PostHookSignature[]; postResourceActionHooks?: PostHookSignature[]; preCommitHooks?: PreHookSignature[]; preModelActionHooks?: PreHookSignature[]; preResourceActionHooks?: PreHookSignature[] }
  • To hook custom behavior into Octo's lifecycle for the duration of this module. Override it to return the callbacks you want run.

    @see

    Techniques for Hooks.


    Returns { postCommitHooks?: PostHookSignature[]; postModelActionHooks?: PostHookSignature[]; postResourceActionHooks?: PostHookSignature[]; preCommitHooks?: PreHookSignature[]; preModelActionHooks?: PreHookSignature[]; preResourceActionHooks?: PreHookSignature[] }

    • optionalpostCommitHooks?: PostHookSignature[]
    • optionalpostModelActionHooks?: PostHookSignature[]
    • optionalpostResourceActionHooks?: PostHookSignature[]
    • optionalpreCommitHooks?: PreHookSignature[]
    • optionalpreModelActionHooks?: PreHookSignature[]
    • optionalpreResourceActionHooks?: PreHookSignature[]

registerMetadata

  • Resolves the account and region this filesystem is created in.


    Parameters

    Returns Promise<{ awsAccountId: string; awsRegionId: string }>