Optional app.yml manifest for Snowflake App Runtime¶
The optional app.yml manifest tells Snowflake how to install, build,
run, and package your application, along with optional display metadata (profile)
and runtime configuration such as environment variables and secrets. When
you don’t provide it, Snowflake auto-detects build and run behavior from your
project layout (for example, package.json for Node.js). Hand-edit app.yml when
you need to customize those install, build, run, or packaging steps, or to set the
app’s display profile, environment variables, or secrets. Name the file app.yml
and place it in your application source.
Note
Cortex Code CLI and Cortex Code Desktop generate this file automatically when scaffolding Snowflake App Runtime projects.
For deploy configuration, the Snowflake CLI uses a separate snowflake.yml
project file that snow app setup creates and snow app deploy reads. See
Getting started with Snowflake App Runtime and
snow app setup.
app.yml reference¶
Top-level structure¶
All top-level keys are optional. Snowflake ignores unknown keys.
Keys¶
install¶
Commands Snowflake runs during the install phase, before the build. Each
entry under commands is an argv-style list, passed directly without a
shell. Use install for setup steps such as installing dependencies.
build¶
Commands Snowflake runs during the build phase. Each entry under commands
is an argv-style list.
run¶
The entry-point command that starts the application container. command
is an argv-style list.
artifacts¶
Copy rules that move files produced by the build into the final package. Each entry has these fields:
src: Glob pattern, relative to the build working directory, that matches the files to copy. The pattern supports**for recursive matching (provided by the doublestar (https://github.com/bmatcuk/doublestar) library). For example,dist/**matches every file underdistat any depth.dest: Destination path within the package. Setdestto.to flatten matched files into the package root by basename. Setdestto any other path to preserve the directory structure of the matched files relative to the glob base, rooted atdest.
Only files that match the glob are copied; directories themselves aren’t
copied. To include a directory tree, use **.
profile¶
Presentation metadata surfaced alongside the deployed service.
icon: Relative path to a.pngor.svgfile inside the package. The path must not contain...label: Short display label.description: Longer human-readable description.
The label and description values appear in the
additional_properties column of SHOW APPLICATION SERVICES.
environment_ variables¶
Non-sensitive configuration values that Snowflake exposes as environment variables inside the application container. Each entry has:
name: Environment variable name.value: String value.
Read them like any other environment variable in your application code:
secrets¶
Snowflake secret objects to make available to the application at runtime. Each entry has:
name: Mount name used to locate the secret files inside the container.secret: Fully qualified name of an existing Snowflake secret (<database>.<schema>.<secret_name>).
Snowflake mounts each secret as one or more files under /secrets/<name>/.
The application reads secret values from these files. File-based delivery
lets Snowflake rotate a secret while the container runs; the file content
updates in place.
The files written depend on the secret type:
| Secret type | Files under /secrets/<name>/ |
|---|---|
| Generic string | secret_string |
| Password | username, password |
| OAuth2 | access_token |
Symmetric key and cloud provider secret types aren’t supported.
OAuth2 secrets require an
external access integration:
the secret must be listed in the integration’s ALLOWED_AUTHENTICATION_SECRETS,
and the integration must be attached to the app through
EXTERNAL_ACCESS_INTEGRATIONS on
CREATE APPLICATION SERVICE. Password and generic
string secrets don’t require an external access integration.
Read a generic string secret:
Read a password secret:
Read an OAuth2 access token:
Validation during the build phase¶
When your project includes app.yml and you run snow app deploy, Snowflake
loads and validates the manifest from uploaded source during the build phase.
If the file is missing,
Snowflake can still auto-detect build and run behavior from your project layout.
If app.yml is present but invalid, the build fails before a new package
version is published. Common causes include:
- YAML syntax errors.
- Invalid
profile.iconvalues (path traversal, absolute paths, or unsupported image formats).
The error message includes parser details, for example:
Application service manifest (app.yaml) cannot be parsed. '<details>'.