"Managed Service for Apache Spark" is the new name for the product formerly known as "Dataproc on Compute Engine" (cluster deployment) and "Google Cloud Serverless for Apache Spark" (serverless deployment).
Use CMEK with Managed Service for Apache SparkStay organized with collectionsSave and categorize content based on your preferences.
By default, Managed Service for Apache Spark encrypts customer content at
rest. Managed Service for Apache Spark handles encryption for you without any
additional actions on your part. This option is calledGoogle default encryption.
If you want to control your encryption keys, then you can use customer-managed encryption keys
(CMEKs) inCloud KMSwith CMEK-integrated services including
Managed Service for Apache Spark. Using Cloud KMS keys gives you control over their protection
level, location, rotation schedule, usage and access permissions, and cryptographic boundaries.
Using Cloud KMS also lets
youtrack key usage, view audit logs, and
control key lifecycles.
Instead of Google owning and managing the symmetrickey encryption keys (KEKs)that protect your data, you control and
manage these keys in Cloud KMS.
After you set up your resources with CMEKs, the experience of accessing your
Managed Service for Apache Spark resources is similar to using Google default encryption.
For more information about your encryption
options, seeCustomer-managed encryption keys (CMEK).
Use CMEK
Follow the steps in this section to use CMEK to encrypt data that Managed Service for Apache Spark
writes to persistent disk and to the Managed Service for Apache Spark staging bucket.
You can use Cloud Key Management Service to create and manage key rings and keys, or useCloud KMS Autokeyfor simplified
auto-creation of key rings and keys.
Create a key handle.
When you create the key handle, specifydataproc.googleapis.com/Batchordataproc.googleapis.com/Sessionas the--resource-type. Autokey
generates a key and assigns it to the key handle.
Grant permissions to service accounts and configure your batch or session
workload by following steps 4 and 5 in theManually create and use keyssection that follows.
When you submit your workload, specify the key handle resource name in
place of the key resource name in thekmsKeyfield.
Manually create and use keys
Follow these steps to manually create Cloud KMS keys and use them
with Managed Service for Apache Spark.
KMS_PROJECT_ID: the ID of your Google Cloud project that
runs Cloud KMS. This project can also be the project that runs Managed Service for Apache Spark resources.
PROJECT_NUMBER: the project number (not the project ID) of your Google Cloud project that runs Managed Service for Apache Spark resources.
Enable the Cloud KMS API on the project that runs Managed Service for Apache Spark resources.
If theManaged Service for Apache Spark Service Agent roleis not attached to theManaged Service for Apache Spark Service Agent service account,
then add theserviceusage.services.usepermission to the custom
role attached to the Managed Service for Apache Spark Service Agent service account. If the Managed Service for Apache Spark Service Agent role is
attached to the Managed Service for Apache Spark Service Agent service account, you can skip this step.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-04-08 UTC."],[],[]]