Privileges¶
Snowflake App Runtime adds the Application Service object for running deployed apps. The deploy pipeline packages your application during the build phase and creates the service in the deploy phase. You don’t provision build or packaging infrastructure yourself.
Have an account administrator complete
account setup
so snow app setup and snow app deploy use shared account defaults. Until an
administrator completes setup, deploys go to a
personal database, which you can’t share with
other roles.
This topic covers Application Service privileges and what deploy roles need.
Application Service privileges¶
Use these privileges to share, operate, and monitor deployed apps. For grant examples, see Share a Snowflake App Runtime app.
| Privilege | Effect |
|---|---|
| USAGE | Appear in |
| MONITOR | View runtime status and read container logs with SYSTEM$GET_APPLICATION_SERVICE_LOGS. |
| OPERATE |
|
| OWNERSHIP |
|
You can grant USAGE, MONITOR, and OPERATE on one Application Service, on
all of them in a schema, or on those created later. See
Grant access to many apps.
Deploy with the CLI¶
For the recommended team path (snow app setup then snow app deploy to shared
account defaults), you need:
- Account administrator setup for Snowflake App Runtime completed (or equivalent account defaults and grants).
- A deploy role that was selected during that setup (or equivalent privileges).
- A project with an
app.ymlfile.
Personal-database deploys don’t require administrator setup, but you can’t share apps deployed there. See Getting started with Snowflake App Runtime.
Deploy roles receive the grants they need during Snowsight setup. When you run
snow app deploy, Snowflake provisions the artifact repository and runs the
remote build for you.
The deploy role is the owner role¶
The role that first deploys an app owns it for the app’s lifetime, and the
app’s owner’s rights queries run as that role. Ownership can’t be transferred,
and later deploys require OWNERSHIP.
Choose one deploy role per app or team before the first deploy, and grant it to every user and CI service user who deploys. Deploy with it as the primary role, because a new app is owned by the primary role.
Create an Application Service with SQL¶
If you run CREATE APPLICATION SERVICE directly (without
snow app deploy), the creating role needs the privileges listed on that
command page. Schema-level CREATE privileges for deploy roles are normally
granted during
account administrator setup.
Artifact repository privileges for SQL workflows¶
The snow app deploy workflow provisions one artifact repository per
application and runs the remote build for you. You only need artifact
repository privileges if you publish packages or manage repositories with SQL.
In that case, CREATE APPLICATION SERVICE may require READ on a repository that already contains the package.
See CREATE ARTIFACT REPOSITORY and
Artifact repository commands.
Preview in Snowsight Workspaces¶
Preview works in your own workspaces with no extra grants. Your role needs more only in these cases:
- In a shared workspace:
WRITEon the workspace. - For each external access integration listed in
app.yml:USAGEon it. - For each secret listed in
app.yml:READon it.
To deploy from the workspace, your role also needs the privileges in Deploy with the CLI. See Develop Snowflake App Runtime apps in Snowsight Workspaces.
Next steps¶
- Grant other roles access to an app: Share an app.
