서버리스 Dataproc 서비스 계정

서버리스 Dataproc 배치 워크로드는 배치 워크로드를 제출할 때 서비스 계정을 지정하지 않는 한 Compute Engine 기본 서비스 계정으로 실행됩니다.

Google Cloud 콘솔, gcloud 명령줄 도구 또는 서버리스 Dataproc API를 사용하여 배치 워크로드를 제출할 때 서비스 계정을 지정할 수 있습니다.

콘솔

Google Cloud 콘솔의 배치 만들기 페이지에 있는 실행 구성 섹션의 서비스 계정 필드에 서비스 계정 이메일 주소를 입력합니다.

gcloud 명령

배치 워크로드를 제출할 때 gcloud dataproc batches submit 명령어에 --service-account 플래그를 사용합니다.

예를 들면 다음과 같습니다.

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

REST API

batches.create 요청의 일부로 ExecutionConfig.serviceAccount 필드에 serviceAccount를 설정합니다.