CodeConfigurationValues

class aws_cdk.aws_apprunner_alpha.CodeConfigurationValues(*, runtime, build_command=None, environment=None, environment_secrets=None, environment_variables=None, port=None, start_command=None)

Bases: object

(experimental) 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.

Parameters:
  • runtime (Runtime) – (experimental) A runtime environment type for building and running an App Runner service. It represents a programming language runtime.

  • build_command (Optional[str]) – (experimental) The command App Runner runs to build your application. Default: - no build command.

  • environment (Optional[Mapping[str, str]]) – (deprecated) The environment variables that are available to your running App Runner service. Default: - no environment variables.

  • environment_secrets (Optional[Mapping[str, Secret]]) – (experimental) The environment secrets that are available to your running App Runner service. Default: - no environment secrets.

  • environment_variables (Optional[Mapping[str, str]]) – (experimental) The environment variables that are available to your running App Runner service. Default: - no environment variables.

  • port (Optional[str]) – (experimental) The port that your application listens to in the container. Default: 8080

  • start_command (Optional[str]) – (experimental) The command App Runner runs to start your application. Default: - no start command.

Stability:

experimental

ExampleMetadata:

infused

Example:

apprunner.Service(self, "Service",
    source=apprunner.Source.from_git_hub(
        repository_url="https://github.com/aws-containers/hello-app-runner",
        branch="main",
        configuration_source=apprunner.ConfigurationSourceType.API,
        code_configuration_values=apprunner.CodeConfigurationValues(
            runtime=apprunner.Runtime.PYTHON_3,
            port="8000",
            start_command="python app.py",
            build_command="yum install -y pycairo && pip install -r requirements.txt"
        ),
        connection=apprunner.GitHubConnection.from_connection_arn("CONNECTION_ARN")
    )
)

Attributes

build_command

(experimental) The command App Runner runs to build your application.

Default:
  • no build command.

Stability:

experimental

environment

(deprecated) The environment variables that are available to your running App Runner service.

Default:
  • no environment variables.

Deprecated:

use environmentVariables.

Stability:

deprecated

environment_secrets

(experimental) The environment secrets that are available to your running App Runner service.

Default:
  • no environment secrets.

Stability:

experimental

environment_variables

(experimental) The environment variables that are available to your running App Runner service.

Default:
  • no environment variables.

Stability:

experimental

port

(experimental) The port that your application listens to in the container.

Default:

8080

Stability:

experimental

runtime

(experimental) A runtime environment type for building and running an App Runner service.

It represents a programming language runtime.

Stability:

experimental

start_command

(experimental) The command App Runner runs to start your application.

Default:
  • no start command.

Stability:

experimental