Associate Cloud Engineer Free Practice Questions — Page 17
Question 164
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 VM can be associated with a specific service account that its applications use to authenticate to Google Cloud APIs. The standard and recommended approach is to specify the desired service account when creating each instance. Instance metadata does not determine the identity used for API authentication, and `gcloud compute instances update` is not the command used to change a VM's service account.
Question 165
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: Cloud Spanner is the best fit because the application requires a relational database with global deployment, strong consistency so all clients see the exact same data, and low-latency access across multiple regions. Cloud SQL is relational but not designed for globally distributed strongly consistent deployments. Cloud Bigtable and Firestore are NoSQL databases and do not meet the relational data requirement.
Question 166
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 the managed MongoDB service provided by MongoDB Inc. and is available through the Google Cloud Marketplace. Running MongoDB yourself on Compute Engine instances or a Managed Instance Group is self-managed and does not provide a managed database SLA. Cloud Bigtable is a different database and is not MongoDB, even though it supports the HBase API.
Question 167
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 requirement is an ERP application that keeps the entire database in memory for very fast access. Google Cloud Memory-optimized M1 machine types are designed for large in-memory databases and workloads such as SAP HANA. Local SSDs improve storage I/O but do not address the primary requirement of fitting the full database in RAM. Preemptible VMs are unsuitable for critical ERP systems, and GPUs are irrelevant for this workload.
Question 168
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: A Kubernetes Deployment is the standard workload resource for long-running stateless microservices. Creating one Deployment per microservice allows each service to have its own replica count and be scaled independently. Custom Resource Definitions are for defining new Kubernetes resource types, Docker Compose is not the deployment mechanism for GKE, and Jobs are intended for finite batch workloads rather than continuously running microservices.
Question 170
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, you need Cloud Audit Logs Data Access logs, which record reads and writes of user data. Data Access logs are not enabled by default for many services because they can generate significant log volume and cost. After enabling them, the auditor can use Logs Explorer with Cloud Storage filters to review access. Admin Activity logs only capture configuration and administrative changes, not object data access. Cloud Monitoring is for metrics, not auditing, and exporting Admin Activity logs would still omit the required data-access events.
Question 171
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 to automatically upload new files from an on-premises data room to Cloud Storage. A scheduled script using gsutil rsync or gsutil cp running on-premises is the appropriate and straightforward solution. Option A misuses Pub/Sub and Cloud Storage triggers; Cloud Storage triggers fire on events in Cloud Storage, not on file creation in an on-premises filesystem. Option B is for Datastore data, not on-premises image files. Option D is manual and not automated.
Question 172
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: Use DNS indirection so applications refer to the database by name rather than IP. In a hybrid environment, Cloud DNS private zones (often with forwarding to on-premises DNS when appropriate) allow Google Cloud workloads to resolve the database hostname. If the database IP changes, only the DNS record needs updating. Cloud NAT is unrelated to name resolution, instance metadata is not an appropriate service discovery mechanism, and Compute Engine internal DNS is for Compute Engine resources rather than arbitrary on-premises hosts.
Question 173
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: Cloud SQL backups are managed by the service and have retention limits; you cannot export a backup or store Cloud SQL backups directly into a chosen Cloud Storage storage class. For a three-year audit retention requirement, schedule a monthly export of the database and write the dump to a Cloud Storage Archive bucket, where you control lifecycle and long-term retention.
Question 174
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: To survive a zonal failure, the application must run in more than one zone. Creating resources in us-central1-b and balancing traffic across us-central1-a and us-central1-b provides redundancy with minimal downtime. A zonal managed instance group does not protect against a zone outage, an HTTP(S) load balancer alone does not add cross-zone redundancy, and backups plus monitoring do not eliminate downtime.
$19
Get all 323 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.