Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/tidy-ghosts-fry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@aws-amplify/backend-data': minor
---

add stackmappings parameter to AmplifyData
1 change: 1 addition & 0 deletions packages/backend-data/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export type DataProps = {
name?: string;
authorizationModes?: AuthorizationModes;
functions?: Record<string, ConstructFactory<AmplifyFunction>>;
stackMapping?: Record<string, string>;
logging?: DataLoggingOptions;
};

Expand Down
1 change: 1 addition & 0 deletions packages/backend-data/src/factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ class DataGenerator implements ConstructContainerEntryGenerator {
authorizationModes,
outputStorageStrategy: this.outputStorageStrategy,
functionNameMap,
stackMappings: this.props.stackMapping,
translationBehavior: {
sandboxModeEnabled,
/**
Expand Down
4 changes: 4 additions & 0 deletions packages/backend-data/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ export type DataProps = {
functions?: Record<string, ConstructFactory<AmplifyFunction>>;

/**
* stackMapping override the assigned nested stack on a per-resource basis. Only applies to resolvers, and takes the form
* { <logicalId>: <stackName> }
*/
stackMapping?: Record<string, string>;
* Logging configuration for the API.
*/
logging?: DataLoggingOptions;
Expand Down