Skip to content
v2.275.0

Experimental

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

CodeConfigurationValues Struct ​

Describes the basic configuration needed for building and running an AWS App Runner service.

This type doesn't support the full set of possible configuration options. Fur full configuration capabilities, use a apprunner.yaml file in the source code repository.

Example ​

ts
new apprunner.Service(this, 'Service', {
  source: apprunner.Source.fromGitHub({
    repositoryUrl: 'https://github.com/aws-containers/hello-app-runner',
    branch: 'main',
    configurationSource: apprunner.ConfigurationSourceType.API,
    codeConfigurationValues: {
      runtime: apprunner.Runtime.PYTHON_3,
      port: '8000',
      startCommand: 'python app.py',
      buildCommand: 'yum install -y pycairo && pip install -r requirements.txt',
    },
    connection: apprunner.GitHubConnection.fromConnectionArn('CONNECTION_ARN'),
  }),
});

Properties ​

buildCommandoptionalstringbuild_commandoptionalstrbuildCommandoptionalStringBuildCommandoptionalstringBuildCommandoptional*string#
The command App Runner runs to build your application.

Default: no build command.

environmentoptional{ [key: string]: string }environmentoptionaltyping.Mapping[str, str]environmentoptionalMap<String, String>EnvironmentoptionalIDictionary<string, string>Environmentoptional*map[string]*stringdeprecated#
use environmentVariables.

Default: no environment variables.

environmentSecretsoptional{ [key: string]: Secret }environment_secretsoptionaltyping.Mapping[str, Secret]environmentSecretsoptionalMap<String, Secret>EnvironmentSecretsoptionalIDictionary<string, Secret>EnvironmentSecretsoptional*map[string]Secret#
The environment secrets that are available to your running App Runner service.

Default: no environment secrets.

environmentVariablesoptional{ [key: string]: string }environment_variablesoptionaltyping.Mapping[str, str]environmentVariablesoptionalMap<String, String>EnvironmentVariablesoptionalIDictionary<string, string>EnvironmentVariablesoptional*map[string]*string#
The environment variables that are available to your running App Runner service.

Default: no environment variables.

portoptionalstringportoptionalstrportoptionalStringPortoptionalstringPortoptional*string= 8080#
The port that your application listens to in the container.
runtimeRuntimeruntimeRuntimeruntimeRuntimeRuntimeRuntimeRuntimeRuntimerequired#
A runtime environment type for building and running an App Runner service.

It represents a programming language runtime.

startCommandoptionalstringstart_commandoptionalstrstartCommandoptionalStringStartCommandoptionalstringStartCommandoptional*string#
The command App Runner runs to start your application.

Default: no start command.