AwsDynamoDBGlobalServiceModule
Hierarchy
- AModule<AwsDynamoDBGlobalServiceModuleSchema, AwsDynamoDBGlobalService>
- AwsDynamoDBGlobalServiceModule
Index
Constructors
Properties
Methods
Resources
Constructors
constructor
Parameters
moduleId: string
The ID this module is loaded under.
Returns AwsDynamoDBGlobalServiceModule
Properties
readonlyinheritedmoduleId
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
The package the module is registered under, set by Module.
staticreadonlyinheritedMODULE_SCHEMA
The schema of the module's inputs, set by Module.
Methods
onInit
Validates the replica regions, creates the global table service over an existing DynamoDB table, and anchors it for its replicas.
Parameters
Returns Promise<AwsDynamoDBGlobalService>
inheritedregisterHooks
To hook custom behavior into Octo's lifecycle for the duration of this module. Override it to return the callbacks you want run.
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 name of the table being replicated.
Parameters
Returns Promise<{ tableName: string }>
AwsDynamoDBGlobalServiceModulereplicates a DynamoDB table into other regions (replicas), making it a global table.The global table sits under the table it replicates, with an edge to each region it is replicated into.
Each replica bills as a table of its own in its region: its storage, its reads, and every write, since each write to the table is written again in each replica. Data sent between regions is billed per GB on top.
None: adding or removing a replica leaves the table and the other replicas serving.
TypeScript
Modules/Service/AwsDynamoDBGlobalService
The table being replicated must stream both images of a change:
StreamSpecificationofAwsDynamoDBServiceModuleset toNEW_AND_OLD_IMAGES. A replica cannot be in the table's own AWS region.A replica takes its table's
DeletionProtectionEnabledandPointInTimeRecoveryEnabled; neither can differ per replica.Removing a replica deletes that region's copy, while the table and the other replicas keep every item. Deleting the table in
AwsDynamoDBServiceModuleis what loses the data.Nothing: replicas are added and removed one at a time, and the table itself follows
AwsDynamoDBServiceModule.Servicemodel.