You have deployed a Java application to Cloud Run. Your application requires access to a database hosted on Cloud SQL. Due to regulatory requirements, the connection must use the Cloud SQL instance's internal IP address. How should you configure the connectivity while following Google-recommended practices?
-
A
Configure your Cloud Run service with a Cloud SQL connection.
-
B
Configure your Cloud Run service to use a Serverless VPC Access connector.
-
C
Configure your application to use the Cloud SQL Java connector.
-
D
Configure your application to connect to an instance of the Cloud SQL Auth proxy.
Reveal answer details
Close answer details
You have a GKE cluster that has three TPU nodes. You are running an ML training job on the cluster, and you observe log entries in Cloud Logging similar to the one below. To identify the root cause of a performance issue, you need to view all stdout logs from the containers running on the TPU nodes. What should you do?  
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerB
ExplanationThe query shown in the chosen option filters logs for resources of type k8s_container and uses the label compute.googleapis.com/resource_name with the pattern gke-tpu-9243ec28.*, ensuring you retrieve all stdout logs from containers running specifically on the TPU nodes in your GKE cluster. This directly matches the log label structure shown in the provided log entry.
Your application is running in multiple Google Kubernetes Engine clusters. It is managed by a Deployment in each cluster. The Deployment has created multiple replicas of your Pod in each cluster. You want to view the logs sent to stdout for all of the replicas in your Deployment in all clusters. Which command should you use?
-
A
-
B
gcloud logging read [PARAM]
-
C
kubectl exec -it [PARAM] journalctl
-
D
gcloud compute ssh [PARAM] --command= "sudo journalctl"
Reveal answer details
Close answer details
Your company is planning to migrate their on-premises Hadoop environment to the cloud. Increasing storage cost and maintenance of data stored in HDFS is a major concern for your company. You also want to make minimal changes to existing data analytics jobs and existing architecture. How should you proceed with the migration?
-
A
Migrate your data stored in Hadoop to BigQuery. Change your jobs to source their information from BigQuery instead of the on-premises Hadoop environment.
-
B
Create Compute Engine instances with HDD instead of SSD to save costs. Then perform a full migration of your existing environment into the new one in Compute Engine instances.
-
C
Create a Cloud Dataproc cluster on Google Cloud Platform, and then migrate your Hadoop environment to the new Cloud Dataproc cluster. Move your HDFS data into larger HDD disks to save on storage costs.
-
D
Create a Cloud Dataproc cluster on Google Cloud Platform, and then migrate your Hadoop code objects to the new cluster. Move your data to Cloud Storage and leverage the Cloud Dataproc connector to run jobs on that data.
Reveal answer details
Close answer details
Question 5
Multiple choice
You are configuring a continuous integration pipeline using Cloud Build to automate the deployment of new container images to Google Kubernetes Engine (GKE). The pipeline builds the application from its source code, runs unit and integration tests in separate steps, and pushes the container to Container Registry. The application runs on a Python web server. The Dockerfile is as follows: 1. FROM python:3.7-alpine 2. COPY . /app 3. WORKDIR /app 4. RUN pip install -r requirements.txt 5. CMD [ "gunicorn", "-w 4", "main:app" ] You notice that Cloud Build runs are taking longer than expected to complete. You want to decrease the build time. What should you do? (Choose two.)
-
A
Select a virtual machine (VM) size with higher CPU for Cloud Build runs.
-
B
Deploy a Container Registry on a Compute Engine VM in a VPC, and use it to store the final images.
-
C
Cache the Docker image for subsequent builds using the -- cache-from argument in your build config file.
-
D
Change the base image in the Dockerfile to ubuntu:latest, and install Python 3.7 using a package manager utility.
-
E
Store application source code on Cloud Storage, and configure the pipeline to use gsutil to download the source code.
Reveal answer details
Close answer details
Case study
PROFESSIONAL-CLOUD-DEVELOPER
requirements, existing environment, and problem statements. If the case study has an All Information tab, note that the information displayed is identical to the information displayed on the subsequent tabs. When you are ready to answer a question, click the Question button to return to the question. Company Overview HipLocal is a community application designed to facilitate communication between people in close proximity. It is used for event planning and organizing sporting events, and for businesses to connect with their local communities. HipLocal launched recently in a few neighborhoods in Dallas and is rapidly growing into a global phenomenon. Its unique style of hyper-local community communication and business outreach is in demand around the world. Executive Statement We are the number one local community app; it's time to take our local community services global. Our venture capital investors want to see rapid growth and the same great experience for new local and virtual communities that come online, whether their members are 10 or 10000 miles away from each other. Solution Concept HipLocal wants to expand their existing service, with updated functionality, in new regions to better serve their global customers. They want to hire and train a new team to support these regions in their time zones. They will need to ensure that the application scales smoothly and provides clear uptime data, and that they analyze and respond to any issues that occur. Existing Technical Environment HipLocal's environment is a mix of on-premises hardware and infrastructure running in Google Cloud Platform. The HipLocal team understands their application well, but has limited experience in global scale applications. Their existing technical environment is as follows: 1. Existing APIs run on Compute Engine virtual machine instances hosted in GCP. 2. State is stored in a single instance MySQL database in GCP. 3. Release cycles include development freezes to allow for QA testing. 4. The application has no logging. 5. Applications are manually deployed by infrastructure engineers during periods of slow traffic on weekday evenings. 6. There are basic indicators of uptime; alerts are frequently fired when the APIs are unresponsive. Business Requirements HipLocal's investors want to expand their footprint and support the increase in demand they are seeing. Their requirements are: 1. Expand availability of the application to new regions. 2. Support 10x as many concurrent users. 3. Ensure a consistent experience for users when they travel to different regions. 4. Obtain user activity metrics to better understand how to monetize their product. 5. Ensure compliance with regulations in the new regions (for example, GDPR). 6. Reduce infrastructure management time and cost. 7. Adopt the Google-recommended practices for cloud computing. 8. Develop standardized workflows and processes around application lifecycle management. 9. Define service level indicators (SLIs) and service level objectives (SLOs). Technical Requirements 1. Provide secure communications between the on-premises data center and cloud-hosted applications and infrastructure. 2. The application must provide usage metrics and monitoring. 3. APIs require authentication and authorization. 4. Implement faster and more accurate validation of new features. 5. Logging and performance metrics must provide actionable information to be able to provide debugging information and alerts. 6. Must scale to meet user demand.
For this question, refer to the HipLocal case study. A recent security audit discovers that HipLocal's database credentials for their Compute Engine-hosted MySQL databases are stored in plain text on persistent disks. HipLocal needs to reduce the risk of these credentials being stolen. What should they do?
-
A
Create a service account and download its key. Use the key to authenticate to Cloud Key Management Service (KMS) to obtain the database credentials.
-
B
Create a service account and download its key. Use the key to authenticate to Cloud Key Management Service (KMS) to obtain a key used to decrypt the database credentials.
-
C
Create a service account and grant it the roles/iam.serviceAccountUser role. Impersonate as this account and authenticate using the Cloud SQL Proxy.
-
D
Grant the roles/secretmanager.secretAccessor role to the Compute Engine service account. Store and access the database credentials with the Secret Manager API.
Reveal answer details
Close answer details
Correct answerD
Explanationhttps://cloud.google.com/secret-manager/docs/overview
You are a developer that works for a local concert venue. Customers use your company's website to purchase tickets for events. You need to provide customers with immediate confirmation when a selected seat has been reserved. How should you design the ticket ordering process?
-
A
Add the seat reservation to a Cloud Tasks queue, which triggers Workflows to process the seat reservation.
-
B
Publish the seat reservation to a Pub/Sub topic. Configure the backend service to use Eventarc to process the seat reservation on GKE.
-
C
Upload the seat reservation to a Cloud Storage bucket, which triggers an event to a Cloud Run service that processes the orders.
-
D
Submit the seat reservation in an HTTP POST request to an Application Load Balancer. Configure the Application Load Balancer to distribute the request to a Compute Engine managed instance group that processes the reservation.
Reveal answer details
Close answer details
Correct answerD
ExplanationImmediate Feedback: This approach allows for synchronous processing, meaning the customer can receive immediate confirmation as soon as the reservation is processed. Scalability: Using a managed instance group ensures that your application can scale according to demand, handling multiple requests effectively during peak times. Simplicity: This design keeps the architecture straightforward, allowing for easier debugging and monitoring. Other options involve asynchronous processing, which may introduce delays in confirmation for the user, making them less suitable for immediate feedback requirements.
You have an ecommerce application hosted in Google Kubernetes Engine (GKE) that receives external requests and forwards them to third-party APIs external to Google Cloud. The third-party APIs are responsible for credit card processing, shipping, and inventory management using the process shown in the diagram.  Your customers are reporting that your application is running slowly at unpredictable times. The application doesn't report any metrics. You need to determine the cause of the inconsistent performance. What should you do?
-
A
Install the OpenTelemetry library for your respective language, and instrument your application.
-
B
Install the Ops Agent inside your container and configure it to gather application metrics.
-
C
Modify your application to read and forward the X-Cloud-Trace-Context header when it calls the downstream services.
-
D
Enable Managed Service for Prometheus on the Google Kubernetes Engine cluster to gather application metrics.
Reveal answer details
Close answer details
Question 9
Multiple choice
Your company has a data warehouse that keeps your application information in BigQuery. The BigQuery data warehouse keeps 2 PBs of user data. Recently, your company expanded your user base to include EU users and needs to comply with these requirements: 1. Your company must be able to delete all user account information upon user request. 2. All EU user data must be stored in a single region specifically for EU users. Which two actions should you take? (Choose two.)
-
A
Use BigQuery federated queries to query data from Cloud Storage.
-
B
Create a dataset in the EU region that will keep information about EU users only.
-
C
Create a Cloud Storage bucket in the EU region to store information for EU users only.
-
D
Re-upload your data using to a Cloud Dataflow pipeline by filtering your user records out.
-
E
Use DML statements in BigQuery to update/delete user records based on their requests.
Reveal answer details
Close answer details
Question 10
Single choice
You are monitoring a web application that is written in Go and deployed in Google Kubernetes Engine. You notice an increase in CPU and memory utilization. You need to determine which function is consuming the most CPU and memory resources. What should you do?
-
A
Add print commands to the application source code to log when each function is called, and redeploy the application.
-
B
Create a Cloud Logging query that gathers the web application's logs. Write a Python script that calculates the difference between the timestamps from the beginning and the end of the application's longest functions to identify time-intensive functions.
-
C
Import OpenTelemetry and Trace export packages into your application, and create the trace provider. Review the latency data for your application on the Trace overview page, and identify which functions cause the most latency.
-
D
Import the Cloud Profiler package into your application, and initialize the Profiler agent. Review the generated flame graph in the Google Cloud console to identify time-intensive functions.
Reveal answer details
Close answer details
Question 11
Single choice
You are developing a single-player mobile game backend that has unpredictable traffic patterns as users interact with the game throughout the day and night. You want to optimize costs by ensuring that you have enough resources to handle requests, but minimize over-provisioning. You also want the system to handle traffic spikes efficiently. Which compute platform should you use?
-
A
-
B
Compute Engine with managed instance groups
-
C
Compute Engine with unmanaged instance groups
-
D
Google Kubernetes Engine using cluster autoscaling
Reveal answer details
Close answer details
Question 12
Single choice
You are developing an application that will handle requests from end users. You need to secure a Cloud Function called by the application to allow authorized end users to authenticate to the function via the application while restricting access to unauthorized users. You will integrate Google Sign-In as part of the solution and want to follow Google-recommended best practices. What should you do?
-
A
Deploy from a source code repository and grant users the roles/cloudfunctions.viewer role.
-
B
Deploy from a source code repository and grant users the roles/cloudfunctions.invoker role
-
C
Deploy from your local machine using gcloud and grant users the roles/cloudfunctions.admin role
-
D
Deploy from your local machine using gcloud and grant users the roles/rolecloudfunctions.developer
Reveal answer details
Close answer details
Question 13
Single choice
You recently deployed an application to GKE where Pods are writing files to a Compute Engine persistent disk. You have created a PersistentVolumeClaim (PVC) and a PersistentVolume (PV) object on Kubernetes for the disk, and you reference the PVC in the deployment manifest file. You recently expanded the size of the persistent disk because the application has used up almost all of the disk space. You have logged on to one of the Pods, and you notice that the disk expansion is not visible in the container file system. What should you do?
-
A
Set the spec.capacity.storage value of the PV object to match the size of the persistent disk. Apply the updated configuration by using kubectl.
-
B
Recreate the application Pods by running the kubectl delete deployment DEPLOYMENT_NAME command, where the DEPLOYMENT_NAME parameter is && kubectl apply deployment.yaml the name of your deployment and deployment.yaml is its manifest file.
-
C
Set the spec.resources.requests.storage value of the PVC object to match the size of the persistent disk. Apply the updated configuration by using kubectl.
-
D
In the Pod, resize the disk partition to the maximum value by using the fdisk or parted utility.
Reveal answer details
Close answer details
Correct answerC
ExplanationReferences: https://cloud.google.com/kubernetes-engine/docs/how-to/persistent-volumes/volume-expansion
Question 14
Single choice
You are responsible for developing a new ecommerce application that is running on Cloud Run. You need to connect your application to a Cloud SQL database that is in a separate project. This project is on an isolated network dedicated to multiple databases without a public IP. You need to connect your application to this database. What should you do?
-
A
Create a Private Service Connect endpoint on your network. Create a Serverless VPC Access connector on your project. Use Cloud SQL Language Connectors to create an internal connection.
-
B
Configure VPC Network Peering between both networks. In Cloud Run, create a Cloud SQL connection that uses the internal IP. Use Cloud SQL Language Connectors to interact with the database.
-
C
Configure private services access on your project. In Cloud Run, create a Cloud SQL connection. Use Cloud SQL Language Connectors to interact with the database.
-
D
Create a subnet on your VPC. Create a Serverless VPC Access connector on your project using the new subnet. In Cloud Run, create a Cloud SQL connection. Use Cloud SQL Language Connectors to interact with the database.
Reveal answer details
Close answer details
Correct answerD
ExplanationTo connect a Cloud Run service to a Cloud SQL instance in a different project without a public IP, you can use Serverless VPC Access to create a private, internal network path. By creating a subnet and configuring a Serverless VPC Access connector in your project, you allow Cloud Run to access resources on the private network where the Cloud SQL instance resides. Using Cloud SQL Language Connectors enables a secure, managed connection to the Cloud SQL database without needing public IP access. Options like VPC Network Peering could connect the networks but would not provide the necessary connectivity for Cloud Run to access the database directly.
Question 15
Single choice
The new version of your containerized application has been tested and is ready to deploy to production on Google Kubernetes Engine. You were not able to fully load-test the new version in pre-production environments, and you need to make sure that it does not have performance problems once deployed. Your deployment must be automated. What should you do?
-
A
Use Cloud Load Balancing to slowly ramp up traffic between versions. Use Cloud Monitoring to look for performance issues.
-
B
Deploy the application via a continuous delivery pipeline using canary deployments. Use Cloud Monitoring to look for performance issues. and ramp up traffic as the metrics support it.
-
C
Deploy the application via a continuous delivery pipeline using blue/green deployments. Use Cloud Monitoring to look for performance issues, and launch fully when the metrics support it.
-
D
Deploy the application using kubectl and set the spec.updateStrategv.type to RollingUpdate. Use Cloud Monitoring to look for performance issues, and run the kubectl rollback command if there are any issues.
Reveal answer details
Close answer details
Case study
PROFESSIONAL-CLOUD-DEVELOPER
requirements, existing environment, and problem statements. If the case study has an All Information tab, note that the information displayed is identical to the information displayed on the subsequent tabs. When you are ready to answer a question, click the Question button to return to the question. Company Overview HipLocal is a community application designed to facilitate communication between people in close proximity. It is used for event planning and organizing sporting events, and for businesses to connect with their local communities. HipLocal launched recently in a few neighborhoods in Dallas and is rapidly growing into a global phenomenon. Its unique style of hyper-local community communication and business outreach is in demand around the world. Executive Statement We are the number one local community app; it's time to take our local community services global. Our venture capital investors want to see rapid growth and the same great experience for new local and virtual communities that come online, whether their members are 10 or 10000 miles away from each other. Solution Concept HipLocal wants to expand their existing service, with updated functionality, in new regions to better serve their global customers. They want to hire and train a new team to support these regions in their time zones. They will need to ensure that the application scales smoothly and provides clear uptime data, and that they analyze and respond to any issues that occur. Existing Technical Environment HipLocal's environment is a mix of on-premises hardware and infrastructure running in Google Cloud Platform. The HipLocal team understands their application well, but has limited experience in global scale applications. Their existing technical environment is as follows: 1. Existing APIs run on Compute Engine virtual machine instances hosted in GCP. 2. State is stored in a single instance MySQL database in GCP. 3. Release cycles include development freezes to allow for QA testing. 4. The application has no logging. 5. Applications are manually deployed by infrastructure engineers during periods of slow traffic on weekday evenings. 6. There are basic indicators of uptime; alerts are frequently fired when the APIs are unresponsive. Business Requirements HipLocal's investors want to expand their footprint and support the increase in demand they are seeing. Their requirements are: 1. Expand availability of the application to new regions. 2. Support 10x as many concurrent users. 3. Ensure a consistent experience for users when they travel to different regions. 4. Obtain user activity metrics to better understand how to monetize their product. 5. Ensure compliance with regulations in the new regions (for example, GDPR). 6. Reduce infrastructure management time and cost. 7. Adopt the Google-recommended practices for cloud computing. 8. Develop standardized workflows and processes around application lifecycle management. 9. Define service level indicators (SLIs) and service level objectives (SLOs). Technical Requirements 1. Provide secure communications between the on-premises data center and cloud-hosted applications and infrastructure. 2. The application must provide usage metrics and monitoring. 3. APIs require authentication and authorization. 4. Implement faster and more accurate validation of new features. 5. Logging and performance metrics must provide actionable information to be able to provide debugging information and alerts. 6. Must scale to meet user demand.
In order for HipLocal to store application state and meet their stated business requirements, which database service should they migrate to?
-
A
-
B
-
C
Cloud Memorystore as a cache
-
D
Separate Cloud SQL clusters for each region
Reveal answer details
Close answer details
Question 17
Single choice
You have an application deployed in Google Kubernetes Engine (GKE). You need to update the application to make authorized requests to Google Cloud managed services. You want this to be a one-time setup, and you need to follow security best practices of auto-rotating your security keys and storing them in an encrypted store. You already created a service account with appropriate access to the Google Cloud service. What should you do next?
-
A
Assign the Google Cloud service account to your GKE Pod using Workload Identity.
-
B
Export the Google Cloud service account, and share it with the Pod as a Kubernetes Secret.
-
C
Export the Google Cloud service account, and embed it in the source code of the application.
-
D
Export the Google Cloud service account, and upload it to HashiCorp Vault to generate a dynamic service account for your application.
Reveal answer details
Close answer details
Question 18
Single choice
You are developing an application component to capture user behavior data and stream the data to BigQuery. You plan to use the BigQuery Storage Write API. You need to ensure that the data that arrives in BigQuery does not have any duplicates. You want to use the simplest operational method to achieve this. What should you do?
-
A
Create a write stream in the default type.
-
B
Create a write stream in the committed type.
-
C
Configure a Kafka cluster. Use a primary universally unique identifier (UUID) for duplicate messages.
-
D
Configure a Pub/Sub topic. Use Cloud Run functions to subscribe to the topic and remove any duplicates.
Reveal answer details
Close answer details
Correct answerA
ExplanationReferences: https://cloud.google.com/bigquery/docs/write-api
Question 19
Single choice
You are developing a new ecommerce application that uses Cloud Run functions. You want to expose your application's APIs to public users while maintaining a high level of security. You need to ensure that only authorized users can access your APIs and that all API traffic is encrypted and protected from unauthorized access. You want to use the most scalable and secure approach. What should you do?
-
A
Deploy your Cloud Functions behind Cloud Load Balancing, and use Cloud Armor to protect your APIs from distributed denial of service (DDoS) attacks.
-
B
Deploy your Cloud Functions with Security Command Center enabled, and use IAM to manage access to your APIs.
-
C
Deploy your Cloud Functions behind an Apigee proxy and use Apigee's authentication and authorization features to secure your APIs.
-
D
Deploy your Cloud Functions behind a Cloud API Gateway proxy. Create and use an API key to authorize users to access your APIs.
Reveal answer details
Close answer details
Correct answerC
ExplanationApigee is a robust API management platform that provides comprehensive security, including authentication, authorization, and rate limiting, making it well-suited for public-facing APIs. By deploying Cloud Functions behind an Apigee proxy, you can enforce strict security policies, manage user authentication, and leverage Apigee's built-in features for protecting your APIs against unauthorized access. Apigee also provides support for encryption, scalability, and monitoring, which meets the requirements for secure, scalable, and public access. While API Gateway offers some security features, Apigee provides a broader set of capabilities specifically tailored for secure, enterprise-grade API management.
Question 20
Single choice
You have an application deployed in Google Kubernetes Engine (GKE) that reads and processes Pub/Sub messages. Each Pod handles a fixed number of messages per minute. The rate at which messages are published to the Pub/Sub topic varies considerably throughout the day and week, including occasional large batches of messages published at a single moment. You want to scale your GKE Deployment to be able to process messages in a timely manner. What GKE feature should you use to automatically adapt your workload?
-
A
Vertical Pod Autoscaler in Auto mode
-
B
Vertical Pod Autoscaler in Recommendation mode
-
C
Horizontal Pod Autoscaler based on an external metric
-
D
Horizontal Pod Autoscaler based on resources utilization
Reveal answer details
Close answer details
Question 21
Single choice
You are developing a new mobile game that will be deployed on GKE and Cloud Run as a set of microservices. Currently, there are no projections for the game's user volume. You need to store the following data types: 1. Data type 1: leaderboard data 2. Data type 2: player profiles, chats, and news feed 3. Data type 3: player clickstream data for BI You need to identify a data storage solution that is easy to use, cost-effective, scalable, and supports offline caching on the user's device. Which data storage option should you choose for the different data types?
-
A
Data type 1: Memorystore Data type 2: Firestore Data type 3: BigQuery
-
B
Data type 1: Memorystore Data type 2: Spanner Data type 3: Bigtable
-
C
Data type 1: Firestore Data type 2: Cloud SQL Data type 3: BigQuery
-
D
Data type 1: Firestore Data type 2: Firestore Data type 3: BigQuery
Reveal answer details
Close answer details
Correct answerD
ExplanationFirestore is scalable, easy to use, and supports offline caching for both leaderboard data and player profiles/chats/news feeds. BigQuery is cost-effective and designed for scalable analytics, making it suitable for storing and analyzing clickstream data for BI.
Question 22
Single choice
You need to migrate an internal file upload API with an enforced 500-MB file size limit to App Engine. What should you do?
-
A
-
B
Use CPanel to upload files.
-
C
Use signed URLs to upload files.
-
D
Change the API to be a multipart file upload API.
Reveal answer details
Close answer details
Correct answerC
ExplanationReferences: https://wiki.christophchamp.com/index.php?title=Google_Cloud_Platform
Question 23
Single choice
Your Cloud Function needs permission to access a Cloud Storage bucket. How should you grant access following least privilege?
-
A
Assign Editor role to the default service account
-
B
Assign Owner role to the project
-
C
Create a custom service account with specific Storage role and assign it to the function
-
D
Embed service account key in the function code
Reveal answer details
Close answer details
Correct answerC
ExplanationCreating a dedicated service account with only the required Cloud Storage permissions and assigning it to the Cloud Function ensures adherence to the principle of least privilege and improves security posture.
Question 24
Multiple choice
Your API backend is running on multiple cloud providers. You want to generate reports for the network latency of your API. Which two steps should you take? (Choose two.)
-
A
Use Zipkin collector to gather data.
-
B
Use Fluentd agent to gather data.
-
C
Use Stackdriver Trace to generate reports.
-
D
Use Stackdriver Debugger to generate report.
-
E
Use Stackdriver Profiler to generate report.
Reveal answer details
Close answer details
Question 25
Single choice
You recently deployed an Apigee API proxy to your organization across two regions. Both regions are configured with a separate backend that is hosting the API. You need to configure Apigee to route traffic to the appropriate local region backend. What should you do? 
-
A
Create a TargetEndpoint with a weighted load balancing algorithm. Configure the API proxy to use the same weights for each region's backend.
-
B
Configure a regional internal Application Load Balancer in each region, and use health checks to verify that each backend is active. Create a DNS A record that contains the IP addresses of both regions' load balancers. Configure a TargetServer for each region that uses this DNS name.
-
C
Configure a global external Application Load Balancer and configure each region's backend with a different regional backend service. Each region communicates to this single global external Application Load Balancer as its TargetServer.
-
D
Configure a TargetServer for each region's backend host names. Configure the API proxy to choose the TargetServer based on the system.region.name flow variable.
Reveal answer details
Close answer details
Correct answerD
ExplanationReferences: https://cloud.google.com/apigee/docs/api-platform/reference/api-proxy-configuration-reference
Question 26
Single choice
You recently developed an application. You need to call the Cloud Storage API from a Compute Engine instance that doesn't have a public IP address. What should you do?
-
A
-
B
-
C
-
D
Use Private Google Access
Reveal answer details
Close answer details
Question 27
Single choice
You have a mixture of packaged and internally developed applications hosted on a Compute Engine instance that is running Linux. These applications write log records as text in local files. You want the logs to be written to Cloud Logging. What should you do?
-
A
Pipe the content of the files to the Linux Syslog daemon.
-
B
Install a Google version of fluentd on the Compute Engine instance.
-
C
Install a Google version of collectd on the Compute Engine instance.
-
D
Using cron, schedule a job to copy the log files to Cloud Storage once a day.
Reveal answer details
Close answer details
Correct answerB
ExplanationReferences: https://cloud.google.com/logging/docs/agent/logging/configuration
Question 28
Single choice
You are developing an application that needs to store files belonging to users in Cloud Storage. You want each user to have their own subdirectory in Cloud Storage. When a new user is created, the corresponding empty subdirectory should also be created. What should you do?
-
A
Create an object with the name of the subdirectory ending with a trailing slash ('/') that is zero bytes in length.
-
B
Create an object with the name of the subdirectory, and then immediately delete the object within that subdirectory.
-
C
Create an object with the name of the subdirectory that is zero bytes in length and has WRITER access control list permission.
-
D
Create an object with the name of the subdirectory that is zero bytes in length. Set the Content-Type metadata to CLOUDSTORAGE_FOLDER.
Reveal answer details
Close answer details
Question 29
Single choice
You are a developer that works for a local concert venue. Customers use your company's website to purchase tickets for events. You need to provide customers with immediate confirmation when a selected seat has been reserved. How should you design the ticket ordering process?
-
A
Upload the seat reservation to a Cloud Storage bucket, which triggers an event to the backend service that processes the seat reservation.
-
B
Submit the seat reservation in an HTTP POST request to an Application Load Balancer. Configure the Application Load Balancer to distribute the request to the backend service that processes the seat reservation.
-
C
Add the seat reservation to a Cloud Tasks queue, which triggers Workflows to process the seat reservation.
-
D
Publish the seat reservation to a Pub/Sub topic. Configure the backend service to subscribe to the topic to process the seat reservation.
Reveal answer details
Close answer details
Correct answerB
ExplanationSubmitting the seat reservation via an HTTP POST request to an Application Load Balancer provides immediate, synchronous processing and confirmation to the customer, which is essential for real-time seat reservations.
Question 30
Single choice
Your company manages an application that captures stock data in an internal database. You need to create an API that provides real-time stock data to users. You want to return stock data to users as quickly as possible, and you want your solution to be highly scalable. What should you do?
-
A
Create a BigQuery dataset and table to act as the internal database. Query the table when user requests are received.
-
B
Create a Memorystore for Redis instance to store all stock market data. Query this database when user requests are received.
-
C
Create a Bigtable instance. Query the table when user requests are received. Configure a Pub/Sub topic to queue user requests that your API will respond to.
-
D
Create a Memorystore for Redis instance, and use this database to store the most accessed stock data. Query this instance first when user requests are received, and fall back to the internal database.
Reveal answer details
Close answer details
Correct answerD
ExplanationUsing Memorystore for Redis as a caching layer for frequently accessed stock data allows you to deliver data with minimal latency, which is crucial for real-time applications. Redis is an in-memory data store that provides very fast read and write operations, making it well-suited for scenarios where low latency is essential. By querying Redis first, you reduce the load on the internal database and speed up response times for popular data. For requests not in the cache, you can fall back to the internal database, ensuring that all data remains accessible without needing to query a potentially slower database for every request. This approach is highly scalable and balances speed with data availability.
Question 31
Single choice
You are developing an application that will allow clients to download a file from your website for a specific period of time. How should you design the application to complete this task while following Google-recommended best practices?
-
A
Configure the application to send the file to the client as an email attachment.
-
B
Generate and assign a Cloud Storage-signed URL for the file. Make the URL available for the client to download.
-
C
Create a temporary Cloud Storage bucket with time expiration specified, and give download permissions to the bucket. Copy the file, and send it to the client.
-
D
Generate the HTTP cookies with time expiration specified. If the time is valid, copy the file from the Cloud Storage bucket, and make the file available for the client to download.
Reveal answer details
Close answer details
Question 32
Multiple choice
Your company has a new security initiative that requires all data stored in Google Cloud to be encrypted by customer-managed encryption keys. You plan to use Cloud Key Management Service (KMS) to configure access to the keys. You need to follow the "separation of duties" principle and Google-recommended best practices. What should you do? (Choose two.)
-
A
Provision Cloud KMS in its own project.
-
B
Do not assign an owner to the Cloud KMS project.
-
C
Provision Cloud KMS in the project where the keys are being used.
-
D
Grant the roles/cloudkms.admin role to the owner of the project where the keys from Cloud KMS are being used.
-
E
Grant an owner role for the Cloud KMS project to a different user than the owner of the project where the keys from Cloud KMS are being used.
Reveal answer details
Close answer details
Question 33
Single choice
You are developing an application on Compute Engine that needs to securely access secrets such as API keys and database passwords. You want to avoid storing secrets in the source code or on disk. What should you do?
-
A
Store the secrets in a Cloud Storage bucket and restrict bucket access.
-
B
Store the secrets in Secret Manager and access them at runtime using the client library.
-
C
Store the secrets as environment variables in the instance template.
-
D
Store the secrets in Firestore and encrypt them manually.
Reveal answer details
Close answer details
Correct answerB
ExplanationSecret Manager is the recommended service for securely storing and managing sensitive information such as API keys and passwords. It integrates with IAM for fine-grained access control and allows applications to retrieve secrets securely at runtime without embedding them in source code or storing them on disk.
Question 34
Single choice
Your infrastructure team is responsible for creating and managing Compute Engine VMs. Your team uses the Google Cloud console and gcloud CLI to provision resources for the development environment. You need to ensure that all Compute Engine VMs are labeled correctly for compliance reasons. In case of missing labels, you need to implement corrective actions so the labels are configured accordingly without changing the current deployment process. You want to use the most scalable approach. What should you do?
-
A
Use a Cloud Audit Logs trigger to invoke a Cloud Run function when a Compute Engine VM is created.Check for missing labels and assign them if necessary.
-
B
Deploy resources with Terraform. Use the gcloud terraform vet command with a policy to ensure that every Compute Engine VM that is provisioned by Terraform has labels set.
-
C
Write a script to check all Compute Engine VMs for missing labels regularly by using Cloud Scheduler.Use the script to assign the labels.
-
D
Check all Compute Engine VMs for missing labels regularly. Use the console to assign the labels.
Reveal answer details
Close answer details
Correct answerA
ExplanationReferences: https://cloud.google.com/architecture/single-zone-deployment-compute-engine
Question 35
Single choice
You are a developer of a new customer-facing help desk chat service that is built on Cloud Run. Your customers use the chat option on your website to get support. The application saves each transcript as a text file with a unique identifier in a Cloud Storage bucket. After the conversation is done and before the chat window is closed, the customer receives a link to the chat transcript. You want to provide access to the chat transcript link for 2 hours. You need to configure this access using an approach that prioritizes security and follows Google-recommended practices. What should you do?
-
A
Set the ACL permission on the Cloud Storage bucket. Set the permission of each text file to allUsers with READER access. Delete each text file 2 hours after it is created.
-
B
Set the permission on the Cloud Storage bucket with the text files to allUsers. Delete each text file 2 hours after it is created.
-
C
Create a new Cloud Storage bucket for each user. Grant the user access to the bucket with a conditional IAM role that expires after 2 hours.
-
D
Create a signed URL for each text file that expires after 2 hours.
Reveal answer details
Close answer details
Correct answerD
ExplanationA signed URL is a secure, time-limited link that provides temporary access to a specific object in Cloud Storage. By creating a signed URL for each chat transcript with a 2-hour expiration, you ensure that only users with the URL can access the transcript and that access is automatically revoked after 2 hours. This approach prioritizes security and aligns with Google-recommended practices for providing temporary, secure access to files in Cloud Storage without modifying bucket permissions or setting up complex conditional IAM roles.
Question 36
Single choice
Your application is logging to Stackdriver. You want to get the count of all requests on all /api/alpha/* endpoints. What should you do?
-
A
Add a Stackdriver counter metric for path:/api/alpha/.
-
B
Add a Stackdriver counter metric for endpoint:/api/alpha/*.
-
C
Export the logs to Cloud Storage and count lines matching /api/alpha.
-
D
Export the logs to Cloud Pub/Sub and count lines matching /api/alpha.
Reveal answer details
Close answer details
Question 37
Single choice
You are parsing a log file that contains three columns: a timestamp, an account number (a string), and a transaction amount (a number). You want to calculate the sum of all transaction amounts for each unique account number efficiently. Which data structure should you use?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Question 38
Single choice
Your company's corporate policy states that there must be a copyright comment at the very beginning of all source files. You want to write a custom step in Cloud Build that is triggered by each source commit. You need the trigger to validate that the source contains a copyright and add one for subsequent steps if not there. What should you do?
-
A
Build a new container that examines the files in /workspace and then checks and adds a copyright for each source file. Changed files are explicitly committed back to the source repository.
-
B
Build a new container that examines the files in /workspace and then checks and adds a copyright for each source file. Changed files do not need to be committed back to the source repository.
-
C
Build a new container that examines the files in a Cloud Storage bucket and then checks and adds a copyright for each source file. Changed files are written back to the Cloud Storage bucket.
-
D
Build a new container that examines the files in a Cloud Storage bucket and then checks and adds a copyright for each source file. Changed files are explicitly committed back to the source repository.
Reveal answer details
Close answer details
Question 39
Single choice
Your operations team has asked you to create a script that lists the Cloud Bigtable, Memorystore, and Cloud SQL databases running within a project. The script should allow users to submit a filter expression to limit the results presented. How should you retrieve the data?
-
A
Use the HBase API, Redis API, and MySQL connection to retrieve database lists. Combine the results, and then apply the filter to display the results
-
B
Use the HBase API, Redis API, and MySQL connection to retrieve database lists. Filter the results individually, and then combine them to display the results
-
C
Run gcloud bigtable instances list, gcloud redis instances list, and gcloud . Use a filter within the application, and then display the results sql databases list
-
D
Run gcloud bigtable instances list, gcloud redis instances list, and gcloud . Use --filter flag with each command, and then display the results sql databases list
Reveal answer details
Close answer details
Question 40
Single choice
Your company uses Cloud Logging to manage large volumes of log data. You need to build a real-time log analysis architecture that pushes logs to a third-party application for processing. What should you do?
-
A
Create a Cloud Logging log export to Pub/Sub.
-
B
Create a Cloud Logging log export to BigQuery.
-
C
Create a Cloud Logging log export to Cloud Storage.
-
D
Create a Cloud Function to read Cloud Logging log entries and send them to the third-party application.
Reveal answer details
Close answer details
Question 41
Single choice
Your company needs a database solution that stores customer purchase history and meets the following requirements: 1. Customers can query their purchase immediately after submission. 2. Purchases can be sorted on a variety of fields. 3. Distinct record formats can be stored at the same time. Which storage option satisfies these requirements?
-
A
-
B
Cloud Storage using an object read
-
C
Cloud SQL using a SQL SELECT statement
-
D
Firestore in Datastore mode using a global query
Reveal answer details
Close answer details
Question 42
Single choice
You work for a web development team at a small startup. Your team is developing a Node.js application using Google Cloud services, including Cloud Storage and Cloud Build. The team uses a Git repository for version control. Your manager calls you over the weekend and instructs you to make an emergency update to one of the company's websites, and you're the only developer available. You need to access Google Cloud to make the update, but you don't have your work laptop. You are not allowed to store source code locally on a non-corporate computer. How should you set up your developer environment?
-
A
Use a text editor and the Git command line to send your source code updates as pull requests from a public computer.
-
B
Use a text editor and the Git command line to send your source code updates as pull requests from a virtual machine running on a public computer.
-
C
Use Cloud Shell and the built-in code editor for development. Send your source code updates as pull requests.
-
D
Use a Cloud Storage bucket to store the source code that you need to edit. Mount the bucket to a public computer as a drive, and use a code editor to update the code. Turn on versioning for the bucket, and point it to the team's Git repository.
Reveal answer details
Close answer details
Question 43
Single choice
Your application named ecom-web-app is deployed in three GKE clusters: ecom-web-app-dev, ecom- , and ecom-web-app-prod. You need to ensure that only trusted container images are web-app-qa deployed to the ecom-web-app-prod GKE cluster in the production environment while following Google-recommended practices. What should you do?
-
A
Set up Binary Authorization, and define cluster-specific rules in clusterAdmissionRules nodes in the policy YAML file.
-
B
Set up Binary Authorization, and exempt any container images that are not deployed to the ecom-GKE cluster.web-app-prod
-
C
Set up an image verification process that scans the container images in Artifact Registry for vulnerabilities and tags the image versions that fail the scan as untrusted.
-
D
Set up an image verification process by using Cloud Functions where the function is invoked when a container image is built in Cloud Build and ensures that only trusted container images are stored in Artifact Registry.
Reveal answer details
Close answer details
Correct answerA
ExplanationBinary Authorization is a Google-recommended security feature that enforces deploy-time security policies for containerized applications running on GKE. By setting up Binary Authorization and defining cluster-specific rules using the clusterAdmissionRules in the policy YAML file, you can ensure that only trusted and verified container images are deployed to the ecom-web-app-prod GKE cluster. This setup allows you to configure specific rules for the production environment, providing an added layer of security and control over which images can be deployed. Other options, like using an image verification process alone, do not enforce strict deploy-time policies directly at the cluster level and thus may not prevent untrusted images from being deployed.
Question 44
Single choice
You are developing an HTTP API hosted on a Compute Engine virtual machine instance that needs to be invoked by multiple clients within the same Virtual Private Cloud (VPC). You want clients to be able to get the IP address of the service. What should you do?
-
A
Reserve a static external IP address and assign it to an HTTP(S) load balancing service's forwarding rule. Clients should use this IP address to connect to the service.
-
B
Reserve a static external IP address and assign it to an HTTP(S) load balancing service's forwarding rule. Then, define an A record in Cloud DNS. Clients should use the name of the A record to connect to the service.
-
C
Ensure that clients use Compute Engine internal DNS by connecting to the instance name with the url. https://[INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal/ D. Ensure that clients use Compute Engine internal DNS by connecting to the instance name with the url https://[API_NAME]/[API_VERSION]/.
Reveal answer details
Close answer details
Question 45
Single choice
A governmental regulation was recently passed that affects your application. For compliance purposes, you are now required to send a duplicate of specific application logs from your application's project to a project that is restricted to the security team. What should you do?
-
A
Create user-defined log buckets in the security team's project. Configure a Cloud Logging sink to route your application's logs to log buckets in the security team's project.
-
B
Create a job that copies the logs from the_Required log bucket into the security team's log bucket in their project.
-
C
Modify the_Default log bucket sink rules to reroute the logs into the security team's log bucket.
-
D
Create a job that copies the System Event logs from the_Required log bucket into the security team's log bucket in their project.
Reveal answer details
Close answer details
Question 46
Single choice
You are developing a web application that will be accessible over both HTTP and HTTPS and will run on Compute Engine instances. On occasion, you will need to SSH from your remote laptop into one of the Compute Engine instances to conduct maintenance on the app. How should you configure the instances while following Google-recommended best practices?
-
A
Set up a backend with Compute Engine web server instances with a private IP address behind a TCP proxy load balancer.
-
B
Configure the firewall rules to allow all ingress traffic to connect to the Compute Engine web servers, with each server having a unique external IP address.
-
C
Configure Cloud Identity-Aware Proxy API for SSH access. Then configure the Compute Engine servers with private IP addresses behind an HTTP(s) load balancer for the application web traffic.
-
D
Set up a backend with Compute Engine web server instances with a private IP address behind an HTTP(S) load balancer. Set up a bastion host with a public IP address and open firewall ports. Connect to the web instances using the bastion host.
Reveal answer details
Close answer details
Correct answerC
ExplanationReferences: https://cloud.google.com/compute/docs/instances/connecting-advanced#cloud_iap
Question 47
Single choice
Your code is running on Cloud Functions in project A. It is supposed to write an object in a Cloud Storage bucket owned by project B. However, the write call is failing with the error "403 Forbidden". What should you do to correct the problem?
-
A
Grant your user account the roles/storage.objectCreator role for the Cloud Storage bucket.
-
B
Grant your user account the roles/iam.serviceAccountUser role for the [email protected] service account.
-
C
Grant the [email protected] service account the roles/ storage.objectCreator role for the Cloud Storage bucket.
-
D
Enable the Cloud Storage API in project B.
Reveal answer details
Close answer details
Question 48
Single choice
Your security team is auditing all deployed applications running in Google Kubernetes Engine. After completing the audit, your team discovers that some of the applications send traffic within the cluster in clear text. You need to ensure that all application traffic is encrypted as quickly as possible while minimizing changes to your applications and maintaining support from Google. What should you do?
-
A
Use Network Policies to block traffic between applications.
-
B
Install Anthos Service Mesh, enable proxy injection on your application namespace, and then enable STRICT mTLS.
-
C
Define Trusted Network ranges within the application, and configure the applications to allow traffic only from those networks.
-
D
Use an automated process to request SSL Certificates for your applications from Let's Encrypt and add them to your applications.
Reveal answer details
Close answer details
Question 49
Single choice
Your application team is developing an ecommerce application. Your team has developed a new functionality that has a dependency on a third-party service. This third-party service will be deployed in a few days. However, you have been unable to ensure the reliability of this service. You need to choose a deployment strategy for the ecommerce application that will avoid disruption and can be rolled back quickly if issues are discovered. What should you do?
-
A
Deploy the new functionality by using an A/B deployment strategy.
-
B
Deploy the new functionality to all users by using a blue/green deployment strategy.
-
C
Use a feature flag to enable the new functionality to users on demand. Gradually enable the new functionality to more users.
-
D
Gradually roll out the new functionality by using a rolling updates deployment strategy. Start with a small subset of users and increase the number of users over time.
Reveal answer details
Close answer details
Correct answerC
ExplanationUsing a feature flag allows you to control the release of the new functionality independently of the deployment itself. This approach enables you to quickly enable or disable the feature if issues arise with the third-party service, providing a seamless rollback option without requiring redeployment. You can start by enabling the feature for a small subset of users and gradually increase exposure as confidence grows in the third-party service's reliability. This strategy minimizes disruption to users, avoids potential downtime, and provides fine-grained control over the release, making it an ideal choice for managing dependencies with uncertain reliability.
Question 50
Single choice
You are a developer at a large organization. You have an application written in Go running in a production Google Kubernetes Engine (GKE) cluster. You need to add a new feature that requires access to BigQuery. You want to grant BigQuery access to your GKE cluster following Google-recommended best practices. What should you do?
-
A
Create a Google service account with BigQuery access. Add the JSON key to Secret Manager, and use the Go client library to access the JSON key.
-
B
Create a Google service account with BigQuery access. Add the Google service account JSON key as a Kubernetes secret, and configure the application to use this secret.
-
C
Create a Google service account with BigQuery access. Add the Google service account JSON key to Secret Manager, and use an init container to access the secret for the application to use.
-
D
Create a Google service account and a Kubernetes service account. Configure Workload Identity on the GKE cluster, and reference the Kubernetes service account on the application Deployment.
Reveal answer details
Close answer details
Question 51
Single choice
You want to use the Stackdriver Logging Agent to send an application's log file to Stackdriver from a Compute Engine virtual machine instance. After installing the Stackdriver Logging Agent, what should you do first?
-
A
Enable the Error Reporting API on the project.
-
B
Grant the instance full access to all Cloud APIs.
-
C
Configure the application log file as a custom source.
-
D
Create a Stackdriver Logs Export Sink with a filter that matches the application's log entries.
Reveal answer details
Close answer details
Question 52
Single choice
Your company has a BigQuery dataset named "Master" that keeps information about employee travel and expenses. This information is organized by employee department. That means employees should only be able to view information for their department. You want to apply a security framework to enforce this requirement with the minimum number of steps. What should you do?
-
A
Create a separate dataset for each department. Create a view with an appropriate WHERE clause to select records from a particular dataset for the specific department. Authorize this view to access records from your Master dataset. Give employees the permission to this department-specific dataset.
-
B
Create a separate dataset for each department. Create a data pipeline for each department to copy appropriate information from the Master dataset to the specific dataset for the department. Give employees the permission to this department-specific dataset.
-
C
Create a dataset named Master dataset. Create a separate view for each department in the Master dataset. Give employees access to the specific view for their department.
-
D
Create a dataset named Master dataset. Create a separate table for each department in the Master dataset. Give employees access to the specific table for their department.
Reveal answer details
Close answer details
Question 53
Single choice
You need to deploy a new feature into production on Cloud Run. Your company's SRE team mandates gradual deployments to avoid large downtimes caused by code change errors. You want to configure this deployment with minimal effort. What should you do?
-
A
Configure the application's frontend load balancer to toggle between the new and old revisions.
-
B
Configure the application code to send a small percentage of users to the newly deployed revision.
-
C
Deploy the feature with "Serve this revision immediately" unchecked, and configure the new revision to serve a small percentage of traffic. Check for errors, and increase traffic to the revision as appropriate.
-
D
Deploy the feature with "Serve this revision immediately" checked. Check for errors, roll back to the previous revision, and repeat the process until you have verified that the deployment is bug-free.
Reveal answer details
Close answer details
Correct answerC
ExplanationReferences: https://cloud.google.com/run/docs/deploying
Question 54
Single choice
Your company's security team uses Identity and Access Management (IAM) to track which users have access to which resources. You need to create a version control system that can integrate with your security team's processes. You want your solution to support fast release cycles and frequent merges to your main branch to minimize merge conflicts. What should you do?
-
A
Create a Cloud Source Repositories repository, and use trunk-based development.
-
B
Create a Cloud Source Repositories repository, and use feature-based development.
-
C
Create a GitHub repository, mirror it to a Cloud Source Repositories repository, and use trunk-based development.
-
D
Create a GitHub repository, mirror it to a Cloud Source Repositories repository, and use feature-based development.
Reveal answer details
Close answer details
Question 55
Single choice
You manage a system that runs on stateless Compute Engine VMs and Cloud Run instances. Cloud Run is connected to a VPC, and the ingress setting is set to Internal. You want to schedule tasks on Cloud Run. You create a service account and grant it the roles/run.invoker Identity and Access Management (IAM) role. When you create a schedule and test it, a 403 Permission Denied error is returned in Cloud Logging. What should you do?
-
A
Grant the service account the roles/run.developer IAM role.
-
B
Configure a cron job on the Compute Engine VMs to trigger Cloud Run on schedule.
-
C
Change the Cloud Run ingress setting to 'Internal and Cloud Load Balancing.'
-
D
Use Cloud Scheduler with Pub/Sub to invoke Cloud Run.
Reveal answer details
Close answer details
Question 56
Single choice
You are developing an application that uses microservices architecture that includes Cloud Run, Bigtable, and Pub/Sub. You want to conduct the testing and debugging process as quickly as possible to create a minimally viable product with minimal cost. What should you do?
-
A
Use Cloud Shell Editor and Cloud Shell to deploy the application, and test the functionality by using the Google Cloud console in the project.
-
B
Use emulators to test the functionality of cloud resources locally, and deploy the code to your Google Cloud project.
-
C
Use Cloud Build to create a pipeline, and add the unit testing stage and the manual approval stage. Deploy the code to your Google Cloud project.
-
D
Use Cloud Code to develop, deploy, and test microservices resources. Use Cloud Logging to review the resource logs.
Reveal answer details
Close answer details
Correct answerD
ExplanationReferences: https://cloud.google.com/blog/topics/developers-practitioners/microservices-architecture-google-cloud
Question 57
Single choice
You plan to deploy a new Go application to Cloud Run. The source code is stored in Cloud Source Repositories. You need to configure a fully managed, automated, continuous deployment pipeline that runs when a source code commit is made. You want to use the simplest deployment solution. What should you do?
-
A
Configure a cron job on your workstations to periodically run gcloud run deploy --source in the working directory.
-
B
Configure a Jenkins trigger to run the container build and deploy process for each source code commit to Cloud Source Repositories.
-
C
Configure continuous deployment of new revisions from a source repository for Cloud Run using buildpacks.
-
D
Use Cloud Build with a trigger configured to run the container build and deploy process for each source code commit to Cloud Source Repositories.
Reveal answer details
Close answer details
Question 58
Single choice
Your team is creating a serverless web application on Cloud Run. The application needs to access images stored in a private Cloud Storage bucket. You want to give the application Identity and Access Management (IAM) permission to access the images in the bucket, while also securing the services using Google-recommended best practices. What should you do?
-
A
Enforce signed URLs for the desired bucket. Grant the Storage Object Viewer IAM role on the bucket to the Compute Engine default service account.
-
B
Enforce public access prevention for the desired bucket. Grant the Storage Object Viewer IAM role on the bucket to the Compute Engine default service account.
-
C
Enforce signed URLs for the desired bucket. Create and update the Cloud Run service to use a user-managed service account. Grant the Storage Object Viewer IAM role on the bucket to the service account.
-
D
Enforce public access prevention for the desired bucket. Create and update the Cloud Run service to use a user-managed service account. Grant the Storage Object Viewer IAM role on the bucket to the service account.
Reveal answer details
Close answer details
Question 59
Single choice
You are developing a marquee stateless web application that will run on Google Cloud. The rate of the incoming user traffic is expected to be unpredictable, with no traffic on some days and large spikes on other days. You need the application to automatically scale up and down, and you need to minimize the cost associated with running the application. What should you do?
-
A
Build the application in Python with Firestore as the database. Deploy the application to Cloud Run.
-
B
Build the application in C# with Firestore as the database. Deploy the application to App Engine flexible environment.
-
C
Build the application in Python with Cloud SQL as the database. Deploy the application to App Engine standard environment.
-
D
Build the application in Python with Firestore as the database. Deploy the application to a Compute Engine managed instance group with autoscaling.
Reveal answer details
Close answer details
Question 60
Single choice
Your company is planning a global event. You need to configure an event registration portal for the event. You have decided to deploy the registration service by using Cloud Run. Your company's marketing team does not want to advertise the Cloud Run service URL. They want the registration portal to be accessed by using a personalized hostname or path in your custom domain URL pattern, for example, . How should you configure access to the service while following Google- <service>. example.com recommended practices?
-
A
Configure Cloud Armor to block traffic on the Cloud Run service URL and allow reroutes from only the custom domain URL pattern.
-
B
Set up an HAProxy on Compute Engine, and add routing rules for a custom domain to the Cloud Run service URL.
-
C
Add a global external Application Load Balancer in front of the service, and configure a DNS record that points to the load balancer's IP address.
-
D
Create a CNAME record that points to the Cloud Run service URL.
Reveal answer details
Close answer details
Correct answerC
ExplanationUsing a global external Application Load Balancer allows you to serve your Cloud Run service behind a custom domain with flexible routing and SSL support, following Google-recommended best practices for production workloads.
Case study
PROFESSIONAL-CLOUD-DEVELOPER
requirements, existing environment, and problem statements. If the case study has an All Information tab, note that the information displayed is identical to the information displayed on the subsequent tabs. When you are ready to answer a question, click the Question button to return to the question. Company Overview HipLocal is a community application designed to facilitate communication between people in close proximity. It is used for event planning and organizing sporting events, and for businesses to connect with their local communities. HipLocal launched recently in a few neighborhoods in Dallas and is rapidly growing into a global phenomenon. Its unique style of hyper-local community communication and business outreach is in demand around the world. Executive Statement We are the number one local community app; it's time to take our local community services global. Our venture capital investors want to see rapid growth and the same great experience for new local and virtual communities that come online, whether their members are 10 or 10000 miles away from each other. Solution Concept HipLocal wants to expand their existing service, with updated functionality, in new regions to better serve their global customers. They want to hire and train a new team to support these regions in their time zones. They will need to ensure that the application scales smoothly and provides clear uptime data, and that they analyze and respond to any issues that occur. Existing Technical Environment HipLocal's environment is a mix of on-premises hardware and infrastructure running in Google Cloud Platform. The HipLocal team understands their application well, but has limited experience in global scale applications. Their existing technical environment is as follows: 1. Existing APIs run on Compute Engine virtual machine instances hosted in GCP. 2. State is stored in a single instance MySQL database in GCP. 3. Release cycles include development freezes to allow for QA testing. 4. The application has no logging. 5. Applications are manually deployed by infrastructure engineers during periods of slow traffic on weekday evenings. 6. There are basic indicators of uptime; alerts are frequently fired when the APIs are unresponsive. Business Requirements HipLocal's investors want to expand their footprint and support the increase in demand they are seeing. Their requirements are: 1. Expand availability of the application to new regions. 2. Support 10x as many concurrent users. 3. Ensure a consistent experience for users when they travel to different regions. 4. Obtain user activity metrics to better understand how to monetize their product. 5. Ensure compliance with regulations in the new regions (for example, GDPR). 6. Reduce infrastructure management time and cost. 7. Adopt the Google-recommended practices for cloud computing. 8. Develop standardized workflows and processes around application lifecycle management. 9. Define service level indicators (SLIs) and service level objectives (SLOs). Technical Requirements 1. Provide secure communications between the on-premises data center and cloud-hosted applications and infrastructure. 2. The application must provide usage metrics and monitoring. 3. APIs require authentication and authorization. 4. Implement faster and more accurate validation of new features. 5. Logging and performance metrics must provide actionable information to be able to provide debugging information and alerts. 6. Must scale to meet user demand.
HipLocal is configuring their access controls. Which firewall configuration should they implement?
-
A
Block all traffic on port 443.
-
B
Allow all traffic into the network.
-
C
Allow traffic on port 443 for a specific tag.
-
D
Allow all traffic on port 443 into the network.
Reveal answer details
Close answer details
|