Skip to main content

AwsLocalstackAccountModule

AwsLocalstackAccountModule gives octo an AWS account on a LocalStack running on your machine, to deploy and test against without a real AWS account.

@cost

Nothing: LocalStack runs on your machine and AWS bills nothing.

@downtime

None: it creates no resources.

@example

TypeScript

import { type App, stub } from '@quadnix/octo';
import { AwsLocalstackAccountModule } from '@quadnix/octo-aws-cdk/modules/account/aws-localstack-account';

octo.loadModule(AwsLocalstackAccountModule, 'my-account-module', {
app: stub<App>('${{my-app-module.model.app}}'),
endpoints: { s3: 'http://localhost:4566', sts: 'http://localhost:4566' },
});
@group

Modules/Account/AwsLocalstackAccount

@limit

Only what LocalStack emulates can be built, and LocalStack's free edition leaves out some services, CloudFront among them.

@losesData

Nothing of its own; LocalStack forgets what it holds when it stops, unless told to persist.

@replaces

Nothing: it creates no resources.

@see

Hierarchy

Index

Constructors

constructor

  • Parameters

    • moduleId: string

      The ID this module is loaded under.

    Returns AwsLocalstackAccountModule

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 LocalStack account under a fixed account ID, and anchors it for other modules to find.


    Parameters

    Returns Promise<AwsLocalstackAccount>

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[]

inheritedregisterMetadata

  • To derive values that both AModule.onInit and this module's actions need - typically facts resolved from another module's anchors, such as an account ID or a region's availability zones. Override it, and the returned object is handed to every action of this module as actionInputs.metadata.


    Parameters

    Returns Promise<Record<string, unknown>>