Artifact Registry lets you store private container images and language
packages for your App Engine applications. You can declare Node.js and Python
dependencies in Artifact Registry and deploy your applications using
Cloud Build.

## Required permissions

App Engine flexible environment
:   If App Engine flexible environment and Artifact Registry are in the same project, the
    App Engine [default service account](https://docs.cloud.google.com/appengine/docs/standard/python/service-account) has permissions to
    pull containers from repositories.
:   If you also use Cloud Build to containerize your applications and store
    them in Artifact Registry, [grant](https://docs.cloud.google.com/artifact-registry/docs/access-control#grant) the Artifact Registry Writer role
    to the Cloud Build service account.

App Engine standard environment:
:   App Engine standard environment uses the [Cloud Build service account](https://docs.cloud.google.com/build/docs/cloud-build-service-account) to
    build and deploy your applications, including integration of
    dependencies stored in Artifact Registry.

    - If App Engine and Artifact Registry are in the same Google Cloud project, the service account has the necessary permissions to download from repositories.
    - If App Engine and Artifact Registry are in different projects, you must grant repository access to the service account.
    - To provide read-only access for downloading dependencies, [grant](https://docs.cloud.google.com/artifact-registry/docs/access-control#grant) the Artifact Registry Reader role to the Cloud Build service account.
    - If you also use Cloud Build to upload artifacts to repositories, [grant](https://docs.cloud.google.com/artifact-registry/docs/access-control#grant) the Artifact Registry Writer role to the Cloud Build service account.

## Configure access to dependencies

For standard environment applications, see the App Engine standard environment documentation for
[npm](https://docs.cloud.google.com/appengine/docs/standard/nodejs/specifying-dependencies#private_dependencies_with_artifact_registry) and [Python](https://docs.cloud.google.com/appengine/docs/standard/python3/specifying-dependencies#private_dependencies_with_artifact_registry) configuration instructions.

To include dependencies in builds you run with Cloud Build, see
[Integrating with Cloud Build](https://docs.cloud.google.com/artifact-registry/docs/configure-cloud-build).

> [!NOTE]
> **Note:** App Engine and Cloud Build create [Pub/Sub](https://docs.cloud.google.com/pubsub/docs) topics and subscriptions in your project for use in Google's internal analysis and maintenance of your container images. These Pub/Sub push subscriptions have `rpc://` URL targets.