Associate Cloud Engineer Free Practice Questions — Page 16
Question 151
You will have several applications running on different Compute Engine instances in the same project. You want to specify at a more granular level the service account each instance uses when calling Google Cloud APIs. What should you do?
A. When creating the instances, specify a Service Account for each instance.
B. When creating the instances, assign the name of each Service Account as instance metadata.
C. After starting the instances, use gcloud compute instances update to specify a Service Account for each instance.
D. After starting the instances, use gcloud compute instances update to assign the name of the relevant Service Account as instance metadata.
Show Answer
Correct Answer: A
Explanation: Each Compute Engine instance can be associated with its own service account, which determines the identity and permissions used when calling Google Cloud APIs. This is configured at instance creation time. Instance metadata cannot control API identity, and changing service accounts after creation requires a specific set-service-account operation, not a generic update. Therefore, specifying a service account for each instance when creating it is the correct and intended approach.
Question 152
You are developing a financial trading application that will be used globally. Data is stored and queried using a relational structure, and clients from all over the world should get the exact identical state of the data. The application will be deployed in multiple regions to provide the lowest latency to end users. You need to select a storage option for the application data while minimizing latency. What should you do?
A. Use Cloud Bigtable for data storage.
B. Use Cloud SQL for data storage.
C. Use Cloud Spanner for data storage.
D. Use Firestore for data storage.
Show Answer
Correct Answer: C
Explanation: The application requires a globally distributed, strongly consistent relational database with low latency across multiple regions. Cloud Spanner is designed for this exact use case, providing global replication, strong consistency, SQL support, and horizontal scalability. Cloud SQL is regional, Bigtable is NoSQL and not relational, and Firestore is document-based and not suited for relational financial trading data.
Question 153
You are creating an application that will run on Google Kubernetes Engine. You have identified MongoDB as the most suitable database system for your application and want to deploy a managed MongoDB environment that provides a support SLA. What should you do?
A. Create a Cloud Bigtable cluster, and use the HBase API.
B. Deploy MongoDB Atlas from the Google Cloud Marketplace.
C. Download a MongoDB installation package, and run it on Compute Engine instances.
D. Download a MongoDB installation package, and run it on a Managed Instance Group.
Show Answer
Correct Answer: B
Explanation: The requirement is for a managed MongoDB environment with a support SLA. MongoDB Atlas is a fully managed MongoDB service operated by MongoDB, Inc., and when deployed via the Google Cloud Marketplace it integrates with GCP while providing an official SLA and support. The other options require self-managing MongoDB or use an unrelated database service.
Question 154
You are about to deploy a new Enterprise Resource Planning (ERP) system on Google Cloud. The application holds the full database in-memory for fast data access, and you need to configure the most appropriate resources on Google Cloud for this application. What should you do?
A. Provision preemptible Compute Engine instances.
B. Provision Compute Engine instances with GPUs attached.
C. Provision Compute Engine instances with local SSDs attached.
D. Provision Compute Engine instances with M1 machine type.
Show Answer
Correct Answer: D
Explanation: The key requirement is that the ERP system holds the full database in memory. Google Cloud M1 machine types are memory-optimized VMs specifically designed for large in-memory databases such as SAP HANA and ERP workloads, offering very high RAM-to-vCPU ratios (up to several TB of RAM). Local SSDs optimize disk I/O, not memory capacity; GPUs are irrelevant for databases; and preemptible instances are unsuitable for mission-critical ERP systems. Therefore, provisioning Compute Engine instances with the M1 machine type is the most appropriate choice.
Question 155
You have developed an application that consists of multiple microservices, with each microservice packaged in its own Docker container image. You want to deploy the entire application on Google Kubernetes Engine so that each microservice can be scaled individually. What should you do?
A. Create and deploy a Custom Resource Definition per microservice.
B. Create and deploy a Docker Compose File.
C. Create and deploy a Job per microservice.
D. Create and deploy a Deployment per microservice.
Show Answer
Correct Answer: D
Explanation: In Kubernetes, a Deployment manages a set of identical Pods and supports rolling updates and independent scaling. Creating one Deployment per microservice allows each service to be deployed, managed, and scaled independently on GKE. Other options do not fit this goal: CRDs define new resource types, Docker Compose is not a Kubernetes deployment mechanism, and Jobs are intended for finite batch tasks, not long-running microservices.
Question 157
Your auditor wants to view your organization's use of data in Google Cloud. The auditor is most interested in auditing who accessed data in Cloud Storage buckets. You need to help the auditor access the data they need. What should you do?
A. Turn on Data Access Logs for the buckets they want to audit, and then build a query in the log viewer that filters on Cloud Storage.
B. Assign the appropriate permissions, and then create a Data Studio report on Admin Activity Audit Logs.
C. Assign the appropriate permissions, and then use Cloud Monitoring to review metrics.
D. Use the export logs API to provide the Admin Activity Audit Logs in the format they want.
Show Answer
Correct Answer: A
Explanation: To audit who accessed data in Cloud Storage, the relevant logs are Cloud Audit Logs Data Access logs, which record read/write access to bucket objects. These logs are not enabled by default, so they must be turned on. Once enabled, the auditor can query Cloud Storage Data Access logs in Cloud Logging (Log Explorer) to see who accessed which data. Admin Activity logs, Monitoring metrics, or exporting only Admin Activity logs do not capture object-level data access.
Question 158
You are working for a hospital that stores its medical images in an on-premises data room. The hospital wants to use Cloud Storage for archival storage of these images. The hospital wants an automated process to upload any new medical images to Cloud Storage. You need to design and implement a solution. What should you do?
A. Create a Pub/Sub topic, and enable a Cloud Storage trigger for the Pub/Sub topic. Create an application that sends all medical images to the Pub/Sub topic.
B. Deploy a Dataflow job from the batch template, ג€Datastore to Cloud Storage.ג€ Schedule the batch job on the desired interval.
C. Create a script that uses the gsutil command line interface to synchronize the on-premises storage with Cloud Storage. Schedule the script as a cron job.
D. In the Cloud Console, go to Cloud Storage. Upload the relevant images to the appropriate bucket.
Show Answer
Correct Answer: C
Explanation: The requirement is an automated way to upload new files from an on‑premises data room to Cloud Storage. A simple file synchronization mechanism from on‑premises is needed. Using gsutil (for example, gsutil rsync or cp) in a script scheduled with cron efficiently detects and uploads new images without manual intervention. Pub/Sub and Cloud Storage triggers work for cloud‑native events, not on‑prem file changes, Dataflow is unrelated, and manual upload is not automated.
Question 159
Your company has embraced a hybrid cloud strategy where some of the applications are deployed on Google Cloud. A Virtual Private Network (VPN) tunnel connects your Virtual Private Cloud (VPC) in Google Cloud with your company's on-premises network. Multiple applications in Google Cloud need to connect to an on-premises database server, and you want to avoid having to change the IP configuration in all of your applications when the IP of the database changes.
What should you do?
A. Configure Cloud NAT for all subnets of your VPC to be used when egressing from the VM instances.
B. Create a private zone on Cloud DNS, and configure the applications with the DNS name.
C. Configure the IP of the database as custom metadata for each instance, and query the metadata server.
D. Query the Compute Engine internal DNS from the applications to retrieve the IP of the database.
Show Answer
Correct Answer: B
Explanation: Using DNS decouples applications from a fixed IP address. By creating a Cloud DNS private zone (often with a forwarding zone to on‑premises DNS), applications in the VPC connect to the database via a stable DNS name. When the database IP changes, only DNS needs updating, not the applications. Cloud NAT, metadata, or internal Compute Engine DNS do not solve the problem of abstracting an external on‑premises database IP.
Question 160
You are working with a Cloud SQL MySQL database at your company. You need to retain a month-end copy of the database for three years for audit purposes.
What should you do?
A. Set up an export job for the first of the month. Write the export file to an Archive class Cloud Storage bucket.
B. Save the automatic first-of-the-month backup for three years. Store the backup file in an Archive class Cloud Storage bucket.
C. Set up an on-demand backup for the first of the month. Write the backup to an Archive class Cloud Storage bucket.
D. Convert the automatic first-of-the-month backup to an export file. Write the export file to a Coldline class Cloud Storage bucket.
Show Answer
Correct Answer: A
Explanation: You need a long-term, user-managed, month-end snapshot retained for three years. Cloud SQL backups (automatic or on-demand) are managed by Cloud SQL, have limited retention, and cannot be exported or stored in specific Cloud Storage classes. An export creates a logical dump at a specific point in time that you control, can be scheduled for month-end, and can be stored in an Archive class Cloud Storage bucket with lifecycle policies for three-year retention. Therefore, setting up a scheduled export to an Archive bucket is the correct approach.
Question 161
You are hosting an application from Compute Engine virtual machines (VMs) in us`"central1`"a. You want to adjust your design to support the failure of a single
Compute Engine zone, eliminate downtime, and minimize cost. What should you do?
A. ג€" Create Compute Engine resources in usג€"central1ג€"b. ג€" Balance the load across both usג€"central1ג€"a and usג€"central1ג€"b.
B. ג€" Create a Managed Instance Group and specify usג€"central1ג€"a as the zone. ג€" Configure the Health Check with a short Health Interval.
C. ג€" Create an HTTP(S) Load Balancer. ג€" Create one or more global forwarding rules to direct traffic to your VMs.
D. ג€" Perform regular backups of your application. ג€" Create a Cloud Monitoring Alert and be notified if your application becomes unavailable. ג€" Restore from backups when notified.
Show Answer
Correct Answer: A
Explanation: The requirement is to survive a single zone failure with no downtime while minimizing cost. That requires running resources in more than one zone and distributing traffic between them. Option A places Compute Engine resources in another zone (us-central1-b) and balances load across zones, eliminating a zonal single point of failure. Options B, C, and D all keep workloads effectively in one zone or do not provide zonal redundancy, so they cannot handle a full zone outage.
$19
Get all 314 questions with detailed answers and explanations
Instant download HTML + PDF delivered the moment payment clears.
Secure Stripe checkout we never see or store your card details.
7-day refund if files are defective see our refund policy.