Ace Your Associate Cloud Engineer Certification with Practice Exams.
Google Cloud Certified – Associate Cloud Engineer Practice Exam (31 Q)
QUESTION 1
You have an application that looks for its licensing server on the IP 10.0.3.21. You need to deploy the licensing server on Compute Engine. You do not want to change the configuration of the application and want the application to be able to reach the licensing server.
What should you do ?
- A. Reserve the IP 10.0.3.21 as a static internal IP address using gcloud and assign it to the licensing server.
- B. Reserve the IP 10.0.3.21 as a static public IP address using gcloud and assign it to the licensing server.
- C. Use the IP 10.0.3.21 as a custom ephemeral IP address and assign it to the licensing server.
- D. Start the licensing server with an automatic ephemeral IP address, and then promote it to a static internal IP address.
Correct Answer: A
QUESTION 2
You are deploying an application to App Engine. You want the number of instances to scale based on request rate. You need at least 3 unoccupied instances at all times.
Which scaling type should you use ?
- A. Manual Scaling with 3 instances.
- B. Basic Scaling with min_instances set to 3.
- C. Basic Scaling with max_instances set to 3.
- D. Automatic Scaling with min_idle_instances set to 3.
Correct Answer: D
Reference:
– How Instances are Managed
QUESTION 3
You have a development project with appropriate IAM roles defined. You are creating a production project and want to have the same IAM roles on the new project, using the fewest possible steps.
What should you do ?
- A. Use gcloud iam roles copy and specify the production project as the destination project.
- B. Use gcloud iam roles copy and specify your organization as the destination organization.
- C. In the Google Cloud Platform Console, use the ‘create role from role’ functionality.
- D. In the Google Cloud Platform Console, use the ‘create role’ functionality and select all applicable permissions.
Correct Answer: B
Reference:
– gcloud iam roles copy
QUESTION 4
You need a dynamic way of provisioning VMs on Compute Engine. The exact specifications will be in a dedicated configuration file. You want to follow Google’s recommended practices.
Which method should you use ?
- A. Google Deployment Manager
- B. Google Cloud Composer
- C. Managed Instance Group
- D. Unmanaged Instance Group
Correct Answer: C
Reference:
– Virtual machine instances
QUESTION 5
Your development team needs a new Jenkins server for their project. You need to deploy the server using the fewest steps possible.
What should you do ?
- A. Download and deploy the Jenkins Java WAR to App Engine Standard.
- B. Create a new Compute Engine instance and install Jenkins through the command line interface.
- C. Create a Kubernetes cluster on Compute Engine and create a deployment with the Jenkins Docker image.
- D. Use GCP Marketplace to launch the Jenkins solution.
Correct Answer: D
Reference:
– Using Jenkins for distributed builds on Compute Engine
QUESTION 6
You need to update a deployment in Deployment Manager without any resource downtime in the deployment.
Which command should you use ?
- A. gcloud deployment-manager deployments create –config
- B. gcloud deployment-manager deployments update –config
- C. gcloud deployment-manager resources create –config
- D. gcloud deployment-manager resources update –config
Correct Answer: B
Reference:
– gcloud deployment-manager deployments update
QUESTION 7
You need to run an important query in BigQuery but expect it to return a lot of records. You want to find out how much it will cost to run the query. You are using on-demand pricing.
What should you do ?
- A. Arrange to switch to Flat-Rate pricing for this query, then move back to on-demand.
- B. Use the command line to run a dry run query to estimate the number of bytes read. Then convert that bytes estimate to dollars using the Pricing Calculator.
- C. Use the command line to run a dry run query to estimate the number of bytes returned. Then convert that bytes estimate to dollars using the Pricing Calculator.
- D. Run a select count (*) to get an idea of how many records your query will look through. Then convert that number of rows to dollars using the Pricing Calculator.
Correct Answer: B
Reference:
– Estimating query costs (opens in a new tab)”>Estimating storage and query costs > Estimating query costs
QUESTION 8
You have a single binary application that you want to run on Google Cloud Platform. You decided to automatically scale the application based on underlying infrastructure CPU usage. Your organizational policies require you to use virtual machines directly. You need to ensure that the application scaling is operationally efficient and completed as quickly as possible.
What should you do ?
- A. Create a Google Kubernetes Engine cluster, and use horizontal pod autoscaling to scale the application.
- B. Create an instance template, and use the template in a managed instance group with autoscaling configured.
- C. Create an instance template, and use the template in a managed instance group that scales up and down based on the time of day.
- D. Use a set of third-party tools to build automation around scaling the application up and down, based on Stackdriver CPU usage monitoring.
Correct Answer: A
QUESTION 9
You are analyzing Google Cloud Platform service costs from three separate projects. You want to use this information to create service cost estimates by service type, daily and monthly, for the next six months using standard query syntax.
What should you do ?
- A. Export your bill to a Cloud Storage bucket, and then import into Cloud Bigtable for analysis.
- B. Export your bill to a Cloud Storage bucket, and then import into Google Sheets for analysis.
- C. Export your transactions to a local file, and perform analysis with a desktop tool.
- D. Export your bill to a BigQuery dataset, and then write time window-based SQL queries for analysis.
Correct Answer: D
QUESTION 10
You need to set up a policy so that videos stored in a specific Cloud Storage Regional bucket are moved to Coldline after 90 days, and then deleted after one year from their creation.
How should you set up the policy ?
- A. Use Cloud Storage Object Lifecycle Management using Age conditions with SetStorageClass and Delete actions. Set the SetStorageClass action to 90 days and the Delete action to 275 days (365 – 90)
- B. Use Cloud Storage Object Lifecycle Management using Age conditions with SetStorageClass and Delete actions. Set the SetStorageClass action to 90 days and the Delete action to 365 days.
- C. Use gsutil rewrite and set the Delete action to 275 days (365-90).
- D. Use gsutil rewrite and set the Delete action to 365 days.
Correct Answer: A
QUESTION 11
You have a Linux VM that must connect to Cloud SQL. You created a service account with the appropriate access rights. You want to make sure that the VM uses this service account instead of the default Compute Engine service account.
What should you do ?
- A. When creating the VM via the web console, specify the service account under the ‘Identity and API Access’ section.
- B. Download a JSON Private Key for the service account. On the Project Metadata, add that JSON as the value for the key compute-engine-serviceaccount.
- C. Download a JSON Private Key for the service account. On the Custom Metadata of the VM, add that JSON as the value for the key compute-engineservice-account.
- D. Download a JSON Private Key for the service account. After creating the VM, ssh into the VM and save the JSON under ~/.gcloud/compute-engine-serviceaccount.json.
Correct Answer: A
Reference:
– Creating and enabling service accounts for instances
QUESTION 12
You need to configure IAM access audit logging in BigQuery for external auditors. You want to follow Google-recommended practices.
What should you do ?
- A. Add the auditors group to the ‘logging.viewer’ and ‘bigQuery.dataViewer’ predefined IAM roles.
- B. Add the auditors group to two new custom IAM roles.
- C. Add the auditor user accounts to the ‘logging.viewer’ and ‘bigQuery.dataViewer’ predefined IAM roles.
- D. Add the auditor user accounts to two new custom IAM roles.
Correct Answer: C
Reference:
– Configuring roles for audit logging
QUESTION 13
You need to set up permissions for a set of Compute Engine instances to enable them to write data into a particular Cloud Storage bucket. You want to follow Google-recommended practices.
What should you do ?
- A. Create a service account with an access scope. Use the access scope ‘https://www.googleapis.com/auth/devstorage.write_only’.
- B. Create a service account with an access scope. Use the access scope ‘https://www.googleapis.com/auth/cloud-platform’.
- C. Create a service account and add it to the IAM role ‘storage.objectCreator’ for that bucket.
- D. Create a service account and add it to the IAM role ‘storage.objectAdmin’ for that bucket.
Correct Answer: B
Reference:
– Enlightened DataLab Notebooks
QUESTION 14
You have sensitive data stored in three Cloud Storage buckets and have enabled data access logging. You want to verify activities for a particular user for these buckets, using the fewest possible steps. You need to verify the addition of metadata labels and which files have been viewed from those buckets.
What should you do ?
- A. Using the GCP Console, filter the Activity log to view the information.
- B. Using the GCP Console, filter the Stackdriver log to view the information.
- C. View the bucket in the Storage section of the GCP Console.
- D. Create a trace in Stackdriver to view the information.
Correct Answer: A
QUESTION 15
You are the project owner of a GCP project and want to delegate control to colleagues to manage buckets and files in Cloud Storage. You want to follow Googlerecommended practices.
Which IAM roles should you grant your colleagues ?
- A. Project Editor.
- B. Storage Admin.
- C. Storage Object Admin.
- D. Storage Object Creator.
Correct Answer: B
QUESTION 16
You have an object in a Cloud Storage bucket that you want to share with an external company. The object contains sensitive data. You want access to the content to be removed after four hours. The external company does not have a Google account to which you can grant specific user-based access privileges. You want to use the most secure method that requires the fewest steps.
What should you do ?
- A. Create a signed URL with a four-hour expiration and share the URL with the company.
- B. Set object access to ‘public’ and use object lifecycle management to remove the object after four hours.
- C. Configure the storage bucket as a static website and furnish the object’s URL to the company. Delete the object from the storage bucket after four hours.
- D. Create a new Cloud Storage bucket specifically for the external company to access. Copy the object to that bucket. Delete the bucket after four hours have passed.
Correct Answer: A
QUESTION 17
You want to send and consume Cloud Pub/Sub messages from your App Engine application. The Cloud Pub/Sub API is currently disabled. You will use a service account to authenticate your application to the API. You want to make sure your application can use Cloud Pub/Sub.
What should you do ?
- A. Enable the Cloud Pub/Sub API in the API Library on the GCP Console.
- B. Rely on the automatic enablement of the Cloud Pub/Sub API when the Service Account accesses it.
- C. Use Deployment Manager to deploy your application. Rely on the automatic enablement of all APIs used by the application being deployed.
- D. Grant the App Engine Default service account the role of Cloud Pub/Sub Admin. Have your application enable the API on the first connection to Cloud Pub/Sub.
Correct Answer: A
QUESTION 18
You need to monitor resources that are distributed over different projects in Google Cloud Platform. You want to consolidate reporting under the same Stackdriver Monitoring dashboard.
What should you do ?
- A. Use Shared VPC to connect all projects, and link Stackdriver to one of the projects.
- B. For each project, create a Stackdriver account. In each project, create a service account for that project and grant it the role of Stackdriver Account Editor in all other projects.
- C. Configure a single Stackdriver account, and link all projects to the same account.
- D. Configure a single Stackdriver account for one of the projects. In Stackdriver, create a Group and add the other project names as criteria for that Group.
Correct Answer: D
QUESTION 19
You are deploying an application to a Compute Engine VM in a managed instance group. The application must be running at all times, but only a single instance of the VM should run per GCP project.
How should you configure the instance group ?
- A. Set autoscaling to On, set the minimum number of instances to 1, and then set the maximum number of instances to 1.
- B. Set autoscaling to Off, set the minimum number of instances to 1, and then set the maximum number of instances to 1.
- C. Set autoscaling to On, set the minimum number of instances to 1, and then set the maximum number of instances to 2.
- D. Set autoscaling to Off, set the minimum number of instances to 1, and then set the maximum number of instances to 2.
Correct Answer: A
QUESTION 20
You want to verify the IAM users and roles assigned within a GCP project named my-project.
What should you do ?
- A. Run gcloud iam roles list. Review the output section.
- B. Run gcloud iam service-accounts list. Review the output section.
- C. Navigate to the project and then to the IAM section in the GCP Console. Review the members and roles.
- D. Navigate to the project and then to the Roles section in the GCP Console. Review the roles and status.
Correct Answer: D
QUESTION 21
You need to create a new billing account and then link it with an existing Google Cloud Platform project.
What should you do ?
- A. Verify that you are Project Billing Manager for the GCP project. Update the existing project to link it to the existing billing account.
- B. Verify that you are Project Billing Manager for the GCP project. Create a new billing account and link the new billing account to the existing project.
- C. Verify that you are Billing Administrator for the billing account. Create a new project and link the new project to the existing billing account.
- D. Verify that you are Billing Administrator for the billing account. Update the existing project to link it to the existing billing account.
Correct Answer: C
Reference:
– Modify a project’s billing settings
QUESTION 22
You have one project called proj-sa where you manage all your service accounts. You want to be able to use a service account from this project to take snapshots of VMs running in another project called proj-vm.
What should you do ?
- A. Download the private key from the service account, and add it to each VMs custom metadata.
- B. Download the private key from the service account, and add the private key to each VM’s SSH keys.
- C. Grant the service account the IAM Role of Compute Storage Admin in the project called proj-vm.
- D. When creating the VMs, set the service account’s API scope for Compute Engine to read/write.
Correct Answer: C
QUESTION 23
You’ve deployed a microservice called myapp1 to a Google Kubernetes Engine cluster using the YAML file specified below:
apiVersion: apps/vi
kind: Deployment
metadata:
name: myappl-deployment
spec:
selector:
matchLabels:
app: myapp1
replicas: 2
template:
metadata:
labels:
app: myappi
spec: containers:
- name: main-container
image: gcr.io/my-company-repo/myappi:1.4
env:
- name: DB_PASSWORD
value: "tough2guess!"
ports: - containerPort: 8080
You need to refactor this configuration so that the database password is not stored in plain text. You want to follow Google-recommended practices.
What should you do ?
- A. Store the database password inside the Docker image of the container, not in the YAML file.
- B. Store the database password inside a Secret object. Modify the YAML file to populate the DB_PASSWORD environment variable from the Secret.
- C. Store the database password inside a ConfigMap object. Modify the YAML file to populate the DB_PASSWORD environment variable from the ConfigMap.
- D. Store the database password in a file inside a Kubernetes persistent volume, and use a persistent volume claim to mount the volume to the container.
Correct Answer: C
QUESTION 24
You are running an application on multiple virtual machines within a managed instance group and have autoscaling enabled. The autoscaling policy is configured so that additional instances are added to the group if the CPU utilization of instances goes above 80%. VMs are added until the instance group reaches its maximum limit of five VMs or until CPU utilization of instances lowers to 80%. The initial delay for HTTP health checks against the instances is set to 30 seconds. The virtual machine instances take around three minutes to become available for users. You observe that when the instance group autoscales, it adds more instances then necessary to support the levels of end-user traffic. You want to properly maintain instance group sizes when autoscaling.
What should you do ?
- A. Set the maximum number of instances to 1.
- B. Decrease the maximum number of instances to 3.
- C. Use a TCP health check instead of an HTTP health check.
- D. Increase the initial delay of the HTTP health check to 200 seconds.
Correct Answer: D
QUESTION 25
You need to select and configure compute resources for a set of batch processing jobs. These jobs take around 2 hours to complete and are run nightly. You want to minimize service costs.
What should you do ?
- A. Select Google Kubernetes Engine. Use a single-node cluster with a small instance type.
- B. Select Google Kubernetes Engine. Use a three-node cluster with micro instance types.
- C. Select Compute Engine. Use preemptible VM instances of the appropriate standard machine type.
- D. Select Compute Engine. Use VM instance types that support micro bursting.
Correct Answer: C
QUESTION 26
You recently deployed a new version of an application to App Engine and then discovered a bug in the release. You need to immediately revert to the prior version of the application.
What should you do ?
- A. Run gcloud app restore.
- B. On the App Engine page of the GCP Console, select the application that needs to be reverted and click Revert.
- C. On the App Engine Versions page of the GCP Console, route 100% of the traffic to the previous version.
- D. Deploy the original version as a separate application. Then go to App Engine settings and split traffic between applications so that the original version serves 100% of the requests.
Correct Answer: D
Reference:
– App Engine Project Cleanup
QUESTION 27
You deployed an App Engine application using gcloud app deploy, but it did not deploy to the intended project. You want to find out why this happened and where the application deployed.
What should you do ?
- A. Check the app.yaml file for your application and check project settings.
- B. Check the web-application.xml file for your application and check project settings.
- C. Go to Deployment Manager and review settings for deployment of applications.
- D. Go the Cloud Shell and run gcloud config list to review the Google Cloud configuration used for deployment.
Correct Answer: A
Reference:
– Troubleshooting App Engine flexible deployment
QUESTION 28
Your company has a 3-tier solution running on Compute Engine. The configuration of the current infrastructure is shown below.
Each tier has a service account that is associated with all instances within it. You need to enable communication on TCP port 8080 between tiers as follows:
• Instances in tier #1 must communicate with tier #2.
• Instances in tier #2 must communicate with tier #3.
What should you do ?
- A.
- Create an ingress firewall rule with the following settings:
- Targets: all instances
- Source filter: IP ranges (with the range set to 10.0.2.0/24)
- Protocols: allow all
- Create an ingress firewall rule with the following settings:
- Targets: all instances
- Source filter: IP ranges (with the range set to 10.0.1.0/24)
- Protocols: allow all
- Create an ingress firewall rule with the following settings:
- B.
- Create an ingress firewall rule with the following settings:
- Targets: all instances with tier #2 service account
- Source filter: all instances with tier #1 service account
- Protocols: allow TCP:8080
- Create an ingress firewall rule with the following settings:
- Targets: all instances with tier #3 service account
- Source filter: all instances with tier #2 service account
- Protocols: allow TCP: 8080
- Create an ingress firewall rule with the following settings:
- C.
- Create an ingress firewall rule with the following settings:
- Targets: all instances with tier #2 service account
- Source filter: all instances with tier #1 service account
- Protocols: allow all
- Create an ingress firewall rule with the following settings:
- Targets: all instances with tier #3 service account
- Source filter: all instances with tier #2 service account
- Protocols: allow all
- Create an ingress firewall rule with the following settings:
- D.
- Create an egress firewall rule with the following settings:
- Source filter: IP ranges (with the range set to 10.0.2.0/24)
- Protocols: allow TCP: 8080
- Create an egress firewall rule with the following settings:
- Targets: all instances
- Source filter: IP ranges (with the range set to 10.0.1.0/24)
- Protocols: allow TCP: 8080
- Create an egress firewall rule with the following settings:
Correct Answer: B
QUESTION 29
You are given a project with a single virtual private cloud (VPC) and a single subnetwork in the us-central1 region. There is a Compute Engine instance hosting an application in this subnetwork. You need to deploy a new instance in the same project in the europe-west1 region. This new instance needs access to the application. You want to follow Google-recommended practices.
What should you do ?
- A.
- Create a subnetwork in the same VPC, in europe-west1.
- Create the new instance in the new subnetwork and use the first instance’s private address as the endpoint.
- B.
- Create a VPC and a subnetwork in europe-west1.
- Expose the application with an internal load balancer.
- Create the new instance in the new subnetwork and use the load balancer’s address as the endpoint.
- C.
- Create a subnetwork in the same VPC, in europe-west1.
- Use Cloud VPN to connect the two subnetworks.
- Create the new instance in the new subnetwork and use the first instance’s private address as the endpoint.
- D.
- Create a VPC and a subnetwork in europe-west1.
- Peer the 2 VPCs.
- Create the new instance in the new subnetwork and use the first instance’s private address as the endpoint.
Correct Answer: A
QUESTION 30
Your projects incurred more costs than you expected last month. Your research reveals that a development GKE container emitted a huge number of logs, which resulted in higher costs. You want to disable the logs quickly using the minimum number of steps.
What should you do ?
- A.
- Go to the Logs ingestion window in Stackdriver Logging, and disable the log source for the GKE container resource.
- B.
- Go to the Logs ingestion window in Stackdriver Logging, and disable the log source for the GKE Cluster Operations resource.
- C.
- Go to the GKE console, and delete existing clusters.
- Recreate a new cluster.
- Clear the option to enable legacy Stackdriver Logging.
- D.
- Go to the GKE console, and delete existing clusters.
- Recreate a new cluster.
- Clear the option to enable legacy Stackdriver Monitoring.
Correct Answer: A
QUESTION 31
You have a website hosted on App Engine standard environment. You want 1% of your users to see a new test version of the website. You want to minimize complexity.
What should you do ?
- A. Deploy the new version in the same application and use the –migrate option.
- B. Deploy the new version in the same application and use the –splits option to give a weight of 99 to the current version and a weight of 1 to the new version.
- C. Create a new App Engine application in the same project. Deploy the new version in that application. Use the App Engine library to proxy 1% of the requests to the new version.
- D. Create a new App Engine application in the same project. Deploy the new version in that application. Configure your network load balancer to send 1% of the traffic to that new application.
Correct Answer: C
Comments are closed