Skip to content
v2.274.0

Experimental

@aws-cdk/aws-apprunner-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

CodeConfiguration Struct ​

Describes the configuration that AWS App Runner uses to build and run an App Runner service from a source code repository.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as apprunner_alpha from '@aws-cdk/aws-apprunner-alpha';

declare const runtime: apprunner_alpha.Runtime;
declare const secret: apprunner_alpha.Secret;
const codeConfiguration: apprunner_alpha.CodeConfiguration = {
  configurationSource: apprunner_alpha.ConfigurationSourceType.REPOSITORY,

  // the properties below are optional
  configurationValues: {
    runtime: runtime,

    // the properties below are optional
    buildCommand: 'buildCommand',
    environment: {
      environmentKey: 'environment',
    },
    environmentSecrets: {
      environmentSecretsKey: secret,
    },
    environmentVariables: {
      environmentVariablesKey: 'environmentVariables',
    },
    port: 'port',
    startCommand: 'startCommand',
  },
};

Properties ​

configurationSourceConfigurationSourceTypeconfiguration_sourceConfigurationSourceTypeconfigurationSourceConfigurationSourceTypeConfigurationSourceConfigurationSourceTypeConfigurationSourceConfigurationSourceTyperequired#
The source of the App Runner configuration.
configurationValuesCodeConfigurationValuesconfiguration_valuesCodeConfigurationValuesconfigurationValuesCodeConfigurationValuesConfigurationValuesCodeConfigurationValuesConfigurationValuesCodeConfigurationValues#
The basic configuration for building and running the App Runner service.

Default: not specified. Use apprunner.yaml instead.

Use it to quickly launch an App Runner service without providing a apprunner.yaml file in the source code repository (or ignoring the file if it exists).