- Used to include the backend generated by running
amplify export --out <path>
into the cdk app.
import { AmplifyExportedBackend } from '@aws-amplify/cdk-exported-backend'
new AmplifyExportedBackend(scope: Construct, id: string, props: AmplifyExportedBackendProps)
- Type:
constructs.Construct
The parent construct of this template.
- Type:
string
The ID of this construct.
Initialization properties.
public apiRestNestedStack(resourceName: string)
- Type:
string
public authNestedStack()
public graphqlNestedStacks()
public lambdaFunctionNestedStackByName(functionName: string)
- Type:
string
the function name to get from the nested stack.
public lambdaFunctionNestedStacks()
public nestedStackByCategortService(category: string, service: string)
- Type:
string
- Type:
string
public nestedStacksByCategory(category: string, resourceName?: string)
- Type:
string
Categories defined in Amplify CLI like function, api, auth etc.
- Type:
string
public readonly cfnInclude: CfnInclude;
cfnInclude of the Amplify backend.
public readonly rootStack: Stack;
- Type:
aws-cdk-lib.Stack
The root stack created.
import { AmplifyExportedBackendProps } from '@aws-amplify/cdk-exported-backend'
const amplifyExportedBackendProps: AmplifyExportedBackendProps = { ... }
public readonly analyticsReporting: boolean;
- Type:
boolean
- Default:
analyticsReporting
setting of containingApp
, or value of 'aws:cdk:version-reporting' context key
Include runtime versioning information in this Stack.
public readonly crossRegionReferences: boolean;
- Type:
boolean
- Default: false
Enable this flag to allow native cross region stack references.
Enabling this will create a CloudFormation custom resource in both the producing stack and consuming stack in order to perform the export/import
This feature is currently experimental
public readonly description: string;
- Type:
string
- Default: No description.
A description of the stack.
public readonly env: Environment;
- Type:
aws-cdk-lib.Environment
- Default: The environment of the containing
Stage
if available, otherwise create the stack will be environment-agnostic.
The AWS environment (account/region) where this stack will be deployed.
Set the region
/account
fields of env
to either a concrete value to
select the indicated environment (recommended for production stacks), or to
the values of environment variables
CDK_DEFAULT_REGION
/CDK_DEFAULT_ACCOUNT
to let the target environment
depend on the AWS credentials/configuration that the CDK CLI is executed
under (recommended for development stacks).
If the Stack
is instantiated inside a Stage
, any undefined
region
/account
fields from env
will default to the same field on the
encompassing Stage
, if configured there.
If either region
or account
are not set nor inherited from Stage
, the
Stack will be considered "environment-agnostic"". Environment-agnostic
stacks can be deployed to any environment but may not be able to take
advantage of all features of the CDK. For example, they will not be able to
use environmental context lookups such as ec2.Vpc.fromLookup
and will not
automatically translate Service Principals to the right format based on the
environment's AWS partition, and other such enhancements.
public readonly permissionsBoundary: PermissionsBoundary;
- Type:
aws-cdk-lib.PermissionsBoundary
- Default: no permissions boundary is applied
Options for applying a permissions boundary to all IAM Roles and Users created within this Stage.
public readonly stackName: string;
- Type:
string
- Default: Derived from construct path.
Name to deploy the stack with.
public readonly synthesizer: IStackSynthesizer;
- Type:
aws-cdk-lib.IStackSynthesizer
- Default: The synthesizer specified on
App
, orDefaultStackSynthesizer
otherwise.
Synthesis method to use while deploying this stack.
The Stack Synthesizer controls aspects of synthesis and deployment, like how assets are referenced and what IAM roles to use. For more information, see the README of the main CDK package.
If not specified, the defaultStackSynthesizer
from App
will be used.
If that is not specified, DefaultStackSynthesizer
is used if
@aws-cdk/core:newStyleStackSynthesis
is set to true
or the CDK major
version is v2. In CDK v1 LegacyStackSynthesizer
is the default if no
other synthesizer is specified.
public readonly tags: {[ key: string ]: string};
- Type: {[ key: string ]:
string
} - Default: {}
Stack tags that will be applied to all the taggable resources and the stack itself.
public readonly terminationProtection: boolean;
- Type:
boolean
- Default: false
Whether to enable termination protection for this stack.
public readonly amplifyEnvironment: string;
- Type:
string
- Default: is 'dev'
The Amplify CLI environment deploy to The amplify backend requires a stage to deploy.
public readonly path: string;
- Type:
string
The path to the exported folder that contains the artifacts for the Amplify CLI backend ex: ./amplify-synth-out/.
import { CategoryStackMapping } from '@aws-amplify/cdk-exported-backend'
const categoryStackMapping: CategoryStackMapping = { ... }
public readonly category: string;
- Type:
string
public readonly resourceName: string;
- Type:
string
public readonly service: string;
- Type:
string
import { ExportManifest } from '@aws-amplify/cdk-exported-backend'
const exportManifest: ExportManifest = { ... }
public readonly props: CfnIncludeProps;
public readonly stackName: string;
- Type:
string
import { ExportTag } from '@aws-amplify/cdk-exported-backend'
const exportTag: ExportTag = { ... }
public readonly key: string;
- Type:
string
public readonly value: string;
- Type:
string
import { ProviderCredential } from '@aws-amplify/cdk-exported-backend'
const providerCredential: ProviderCredential = { ... }
public readonly clientId: string;
- Type:
string
public readonly clientSecret: string;
- Type:
string
public readonly providerName: string;
- Type:
string
import { APIGraphQLIncludedNestedStack } from '@aws-amplify/cdk-exported-backend'
new APIGraphQLIncludedNestedStack(includedStack: IncludedNestedStack)
public appSyncAPIKey()
public getResourceConstruct(logicalId: string)
- Type:
string
public graphQLAPI()
public graphQLSchema()
public modelNestedStack(tableName: string)
- Type:
string
is the model name in your Graph QL API.
public readonly includedTemplate: CfnInclude;
public readonly stack: NestedStack;
- Type:
aws-cdk-lib.NestedStack
import { APIRestIncludedStack } from '@aws-amplify/cdk-exported-backend'
new APIRestIncludedStack(includedStack: IncludedNestedStack, resourceName: string)
- Type:
string
public apiDeployment()
public getResourceConstruct(logicalId: string)
- Type:
string
public restAPI()
public readonly includedTemplate: CfnInclude;
public readonly resourceName: string;
- Type:
string
public readonly stack: NestedStack;
- Type:
aws-cdk-lib.NestedStack
import { AuthIncludedNestedStack } from '@aws-amplify/cdk-exported-backend'
new AuthIncludedNestedStack(includedStack: IncludedNestedStack)
public getResourceConstruct(logicalId: string)
- Type:
string
public hostedUiProviderCredentials(credentials: ProviderCredential[])
public identityPool()
public userPool()
public readonly includedTemplate: CfnInclude;
public readonly stack: NestedStack;
- Type:
aws-cdk-lib.NestedStack
import { LambdaFunctionIncludedNestedStack } from '@aws-amplify/cdk-exported-backend'
new LambdaFunctionIncludedNestedStack(includedStack: IncludedNestedStack)
public getResourceConstruct(logicalId: string)
- Type:
string
public lambdaFunction()
public readonly includedTemplate: CfnInclude;
public readonly stack: NestedStack;
- Type:
aws-cdk-lib.NestedStack