Dataproc Serverless service account

A Dataproc Serverless batch workload runs as the Compute Engine default service account unless you specify a service account when you submit a batch workload.

You can specify a service account when you submit a batch workload using the Google Cloud console, gcloud command-line tool, or Dataproc Serverless API.

Console

Insert the service account email address in the service account field in the Execution Configuration section of the Create batch page in the Google Cloud console.

gcloud Command

Use the --service-account flag with the gcloud dataproc batches submit command when you submit your batch workload.

Example:

gcloud dataproc batches submit spark \
    --region=region \
    --service-account=service-account-name@project-id.iam.gserviceaccount.com \

REST API

Set the serviceAccount in the ExecutionConfig.serviceAccount filed as part of your batches.create request.