Experimental
@aws-cdk/aws-amplify-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
AppProps Struct
Properties for an App.
Example
const amplifyApp = new amplify.App(this, 'MyApp', {
sourceCodeProvider: new amplify.GitHubSourceCodeProvider({
owner: '<user>',
repository: '<repo>',
oauthToken: SecretValue.secretsManager('my-github-token'),
}),
autoBranchCreation: { // Automatically connect branches that match a pattern set
patterns: ['feature/*', 'test/*'],
},
autoBranchDeletion: true, // Automatically disconnect a branch when you delete a branch from your repository
});
Properties
Default: a CDK generated name
autoBranchCreationAutoBranchCreationauto_branch_creationAutoBranchCreationautoBranchCreationAutoBranchCreationAutoBranchCreationAutoBranchCreationAutoBranchCreationAutoBranchCreation#Default: no auto branch creation
Use this to automatically create branches that match a certain pattern.
autoBranchDeletionbooleanauto_branch_deletionboolautoBranchDeletionBooleanAutoBranchDeletionboolAutoBranchDeletion*bool= false#Default: no password protection
Use this to set password protection at an app level to all your branches.
buildComputeTypeBuildComputeTypebuild_compute_typeBuildComputeTypebuildComputeTypeBuildComputeTypeBuildComputeTypeBuildComputeTypeBuildComputeTypeBuildComputeType#Default: undefined - Amplify default setting is BuildComputeType.STANDARD_8GB.
Default: no build spec
Alternatively, add a amplify.yml file to the repository.
cacheConfigTypeCacheConfigTypecache_config_typeCacheConfigTypecacheConfigTypeCacheConfigTypeCacheConfigTypeCacheConfigTypeCacheConfigTypeCacheConfigType= CacheConfigType.AMPLIFY_MANAGED#Default: undefined - a new role is created when platform is Platform.WEB_COMPUTE or Platform.WEB_DYNAMIC, otherwise no compute role
The Compute role allows the Amplify Hosting compute service to securely access specific AWS resources based on the role's permissions.
customResponseHeadersCustomResponseHeader[]custom_response_headerstyping.List[CustomResponseHeader]customResponseHeadersList<CustomResponseHeader>CustomResponseHeadersCustomResponseHeader[]CustomResponseHeaders*[]CustomResponseHeader#Default: no custom response headers
customRulesCustomRule[]custom_rulestyping.List[CustomRule]customRulesList<CustomRule>CustomRulesCustomRule[]CustomRules*[]CustomRule#Default: no custom rewrite/redirect rules
Default: no description
environmentVariables{ [key: string]: string }environment_variablestyping.Mapping[str, str]environmentVariablesMap<String, String>EnvironmentVariablesIDictionary<string, string>EnvironmentVariables*map[string]*string#Default: no environment variables
All environment variables that you add are encrypted to prevent rogue access so you can use them to store secret information.
Set to WEB for static site generated (SSG) apps (i.e. a Create React App or Gatsby) and WEB_COMPUTE for server side rendered (SSR) apps (i.e. NextJS).
Default: a new role is created
The App implements IGrantable.
sourceCodeProviderISourceCodeProvidersource_code_providerISourceCodeProvidersourceCodeProviderISourceCodeProviderSourceCodeProviderISourceCodeProviderSourceCodeProviderISourceCodeProvider#Default: not connected to a source code provider