Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
1 change: 1 addition & 0 deletions packages/backend-data/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export type DataProps = {
name?: string;
authorizationModes?: AuthorizationModes;
functions?: Record<string, ConstructFactory<AmplifyFunction>>;
experimentalStackMapping?: Record<string, string>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's review the API design internally. We may need a consolidated attribute to configure experimental features.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's just works like gen1. It was working property on Gen 1. Now it can be usable on Gen 2. I don't know if it's experimental or not for this reason but it's works on Cloudformation same as gen 1.

But changing stacks with gen 1 or gen 2 not effecting resource limit on Cloudformation. These are still hits the resource limit

};

// @public
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 @@ -239,6 +239,7 @@ class DataGenerator implements ConstructContainerEntryGenerator {
authorizationModes,
outputStorageStrategy: this.outputStorageStrategy,
functionNameMap,
stackMappings: this.props.experimentalStackMapping,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this experimental if it's mapping to construct property that is not experimental in underlying construct ?

translationBehavior: {
sandboxModeEnabled,
/**
Expand Down
6 changes: 6 additions & 0 deletions packages/backend-data/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,12 @@ export type DataProps = {
* Functions invokable by the API. The specific input type of the function is subject to change or removal.
*/
functions?: Record<string, ConstructFactory<AmplifyFunction>>;

/**
* ExperimentalStackMapping override the assigned nested stack on a per-resource basis. Only applies to resolvers, and takes the form
* { <logicalId>: <stackName> }
*/
experimentalStackMapping?: Record<string, string>;
Comment on lines +143 to +147
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have not yet finalized a method to expose experimental APIs so please hold with this change.

};

export type AmplifyDataError =
Expand Down