CodeConfigurationValues

class aws_cdk.aws_apprunner.CodeConfigurationValues(*, runtime, build_command=None, environment=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]]) – (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

Return type

Optional[str]

environment

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

Default
  • no environment variables.

Stability

experimental

Return type

Optional[Mapping[str, str]]

port

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

Default

8080

Stability

experimental

Return type

Optional[str]

runtime

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

It represents a programming language runtime.

Stability

experimental

Return type

Runtime

start_command

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

Default
  • no start command.

Stability

experimental

Return type

Optional[str]