All Google Cloud exams

Free Associate Cloud Engineer practice test: 30 questions with answers

30 original questions for Associate Cloud Engineer, drawn from every topic area. Answer each one to see whether you got it right and why. No sign-up.

Free questions
30
Full bank
112 questions
Real exam
120 min

Associate Cloud Engineer exam guide: topics, cost and format

All 30 Associate Cloud Engineer questions with answers

The same questions as the test above, grouped by exam topic. Open any question to see the answer and explanation.

Plan and implement a cloud solution (8 questions)

  1. Question 1

    A web application on Compute Engine must scale with traffic, distribute requests across zones, and keep serving when one zone fails. Which architecture meets these needs?

    1. AA single large VM in one zone with a static external IP and a daily snapshot for recovery
    2. BA regional managed instance group behind an external HTTP(S) load balancer with autoscaling enabled
    3. CA zonal managed instance group with autoscaling and a DNS record that points to one VM's address
    4. DSeveral unmanaged VMs in one zone, each with its own public IP that users are told to choose from manually
    Show answer and explanation
    Correct answer: B

    A regional managed instance group spreads VMs across zones and autoscaling adjusts capacity, and an external HTTP(S) load balancer distributes traffic across them. A single VM and a zonal group fail with their zone, and unmanaged VMs in one zone give no automatic scaling or zone resilience.

  2. Question 2

    A team deploys a stateless container-based API that receives HTTP requests with unpredictable traffic. The team wants no cluster management and scaling to zero when idle. Which service fits best?

    1. AGoogle Kubernetes Engine in Standard mode with a fixed node pool sized for peak traffic
    2. BCloud Run
    3. CCompute Engine managed instance group with a minimum of ten VMs that run continuously
    4. DApp Engine flexible environment with manually created VM instances kept running overnight
    Show answer and explanation
    Correct answer: B

    Cloud Run runs containers without cluster management, scales with request traffic, and can scale to zero when idle. A GKE node pool sized for peak adds cluster operations and idle cost, a continuously running managed group pays for idle VMs, and App Engine flexible instances do not scale to zero.

  3. Question 3

    A team deploys a database for a new application. The application needs a managed PostgreSQL database with automated backups and a standby in another zone for failover. Which Google Cloud service fits best?

    1. ACompute Engine VM with PostgreSQL installed by hand and a nightly script that copies the data directory to another disk
    2. BFirestore in Native mode, because it can store relational rows with the same transactions as PostgreSQL
    3. CCloud SQL for PostgreSQL with high availability enabled and automated backups configured
    4. DBigQuery, because it supports SQL queries and can store the application's transactional data for reads and writes
    Show answer and explanation
    Correct answer: C

    Cloud SQL for PostgreSQL provides managed backups and a standby for high availability in another zone. A hand-installed VM means the team runs backups and failover itself, Firestore is not PostgreSQL, and BigQuery is an analytics warehouse rather than a transactional database.

  4. Question 4

    A team runs a Kubernetes application on GKE. It wants the cluster to add nodes when pods cannot be scheduled and remove nodes when they are idle, without manual resizing. Which feature should be configured?

    1. AHorizontal Pod Autoscaler set to one hundred replicas at all times so that capacity never falls short
    2. BA larger fixed node pool sized for the highest load ever seen, kept at full size all year round
    3. CCluster autoscaler on the node pool, with minimum and maximum node counts
    4. DA cron job that resizes the node pool every hour based on the time of day rather than on demand
    Show answer and explanation
    Correct answer: C

    Cluster autoscaler adds nodes when pods cannot be scheduled and removes idle nodes within the configured minimum and maximum. The Horizontal Pod Autoscaler scales pods rather than nodes, a fixed large pool pays for idle capacity, and a time-based cron resize ignores actual demand.

  5. Question 5

    A company needs a shared network in Google Cloud for several projects. Subnets must be defined once and used by the projects, while each project keeps its own resources. Which approach fits?

    1. AA Shared VPC with a host project that owns the network and service projects attached to it
    2. BA single project for the network, with all workloads deployed into that same project so no sharing is needed
    3. CA separate VPC in each project with a VPN between every pair of projects so that they can reach each other
    4. DThe default network in each project, with the same IP ranges copied by hand into every project's configuration
    Show answer and explanation
    Correct answer: A

    Shared VPC lets a host project own the subnets while service projects deploy resources into them, which keeps network administration central. Per-project VPNs add complexity, putting all workloads in one project removes project separation, and copying ranges by hand causes conflicts.

  6. Question 6

    A scheduled batch job must run every night for about 30 minutes. The team wants the lowest cost and no servers to maintain. Which option fits best?

    1. AKeep a VM running 24 hours a day for the job, so that it starts immediately each night without any delay
    2. BCloud Scheduler triggering a Cloud Run job or function that runs only during the nightly window
    3. CAn engineer runs the job by hand each night from a laptop, once the team has finished the working day
    4. DA GKE cluster with a fixed node pool that sits idle for 23 hours each day and runs the job at midnight
    Show answer and explanation
    Correct answer: B

    Cloud Scheduler triggering a serverless job runs the work only when needed, with no servers to manage and no idle cost. A 24-hour VM and an idle GKE pool pay for idle time, and a manual laptop run depends on a person each night.

  7. Question 7

    An archive of financial documents is read about once a quarter for audits. Storage cost matters more than retrieval speed, but retrieval must still be immediate. Which storage class fits best?

    1. AStandard, because it is the cheapest class for any data, regardless of how rarely it is read
    2. BArchive, because it is the right class for data read every day with no retrieval fees at all
    3. CColdline, because it suits data read about once a quarter and still allows immediate access
    4. DNearline, because it is designed for data read every hour with the lowest possible storage price
    Show answer and explanation
    Correct answer: C

    Coldline is designed for data read about once a quarter, with lower storage cost than Nearline or Standard and immediate retrieval. Standard costs more for rarely read data, Archive fits data read less than once a year and adds retrieval costs for quarterly reads, and Nearline suits monthly access.

  8. Question 8

    A team is designing a Compute Engine deployment for an internal application that must survive zone failures and be easy to update. Which THREE practices are most appropriate? (Choose three.)

    1. AUse a regional managed instance group so instances are spread across zones
    2. BCreate the instance template from a golden image that is versioned and tested before rollout
    3. CUse rolling updates with a maximum surge so that instances are replaced without taking the whole service down
    4. DStore the application configuration only on one VM's local disk so that the template stays unchanged
    5. EUse a single static external IP on one VM and point all clients at that address directly
    Show answer and explanation
    Correct answer: A, B, C

    A regional group distributes instances across zones, versioned golden images keep builds consistent, and rolling updates replace instances without a full outage. Local-only configuration is lost when an instance is replaced, and one VM with a static address is a single point of failure.

Configure access and security (8 questions)

  1. Question 9

    A developer needs to deploy resources to one project but must not be able to change IAM policies or delete the project. Which role assignment follows least privilege?

    1. AOrganization Administrator on the organization so that the developer can reach any future project quickly
    2. BProject Editor on the project, which lets the developer deploy and change resources while leaving IAM policy edits to the owner
    3. CProject Owner on the project, with a note in the change ticket that explains the restriction
    4. DBasic Viewer on the project plus a custom role that grants all compute permissions at the organization level
    Show answer and explanation
    Correct answer: B

    Project Editor lets the developer create and change resources without the owner's ability to manage IAM or delete the project. Owner grants IAM and deletion rights, Organization Administrator reaches far beyond the project, and a viewer role with organization-level compute permissions over-grants.

  2. Question 10

    A Cloud Run service needs to read objects from a Cloud Storage bucket. The security team wants the service to use its own identity and no key files stored in the container. What should the engineer do?

    1. ACreate a dedicated service account, grant it the Storage Object Viewer role on the bucket, and set it as the Cloud Run service identity
    2. BDownload a JSON key for the default Compute Engine service account and copy it into the container image at build time
    3. CMake the bucket public so that the service can read objects without any identity or role assignment at all
    4. DShare the project owner's user credentials with the service through an environment variable in the deployment
    Show answer and explanation
    Correct answer: A

    A dedicated service account with a narrow read role on the bucket, set as the service identity, gives scoped access with no key files. A key in the image is a credential leak, a public bucket exposes data to everyone, and sharing owner credentials is the worst option.

  3. Question 11

    A company wants to make sure that no one can create VMs with external IP addresses in any project in the organization. The rule must apply to projects created in the future. Which mechanism should be used?

    1. AAn organization policy with the constraint that restricts external IP addresses on VM instances, applied at the organization or folder level
    2. BA written policy document that asks project owners not to create VMs with external IPs without approval
    3. CA firewall rule in each project that blocks inbound traffic from the internet to all VM instances
    4. DAn IAM deny on the compute.instances.create permission granted to every user in the organization
    Show answer and explanation
    Correct answer: A

    An organization policy constraint applied at the organization or folder level enforces the rule for current and future projects. A firewall rule blocks traffic but does not stop creation of external IPs, a document is not enforced, and denying instance creation for everyone would stop legitimate work.

  4. Question 12

    A GKE workload needs to call a Cloud Storage bucket. The team wants to avoid storing any service account keys in the cluster. Which approach does this?

    1. AWorkload Identity Federation for GKE, mapping a Kubernetes service account to a Google service account with the needed bucket role
    2. BA Google service account JSON key stored in a Kubernetes secret that every pod in the namespace mounts as a file
    3. CA public bucket with no authentication, so that pods read objects without any identity or credentials at all
    4. DThe node's default Compute Engine service account with the project owner role granted to every node in the pool
    Show answer and explanation
    Correct answer: A

    Workload Identity lets a Kubernetes service account act as a Google service account without any key file. A key in a secret is still a stored credential, a public bucket removes access control, and owner on nodes gives every pod far more than it needs.

  5. Question 13

    A user must be able to read secret values stored in Secret Manager for one application, but not manage the secrets. Which role should be granted on the secret?

    1. ASecret Manager Admin, granted at the project level so that the user can read every secret in the project
    2. BOwner, granted on the project, which includes access to all secrets and their versions automatically
    3. CSecret Manager Secret Accessor, granted on the specific secret
    4. DViewer on the project, which allows the user to read the secret value stored in the secret
    Show answer and explanation
    Correct answer: C

    Secret Manager Secret Accessor lets a principal read secret values on the granted secret without managing them. Admin grants management rights, owner over-grants, and Viewer does not provide access to the secret payload.

  6. Question 14

    A user needs to view Cloud Storage objects in a bucket but must not change or delete them. Which predefined role fits this need?

    1. AOwner on the project, which includes read access to the bucket along with every other project permission
    2. BStorage Admin, which allows full control of buckets and objects, including changing bucket settings
    3. CStorage Object Admin, which allows reading, creating, overwriting and deleting objects
    4. DStorage Object Viewer, which allows listing and reading objects without changing them
    Show answer and explanation
    Correct answer: D

    Storage Object Viewer allows reading and listing objects without changing them, which matches the need. Storage Object Admin and Storage Admin both allow changes, and project owner gives far more than storage read access.

  7. Question 15

    A security reviewer finds that several service accounts in a project have broad roles. Which TWO actions reduce the risk while keeping the workloads working? (Choose two.)

    1. AReview the IAM recommender suggestions and remove roles that the workloads have not used recently
    2. BReplace the broad roles with narrower predefined roles for the specific resources each workload needs
    3. CDelete all service accounts and give each application the owner role on the project so nothing breaks
    4. DCreate a service account key for each account and share the keys by email with each application team
    5. EDisable audit logging for IAM changes so the review is quieter and the roles are easier to read
    Show answer and explanation
    Correct answer: A, B

    The IAM recommender identifies unused permissions to remove, and narrower predefined roles limit each workload to what it needs. Owner for every application is the opposite of least privilege, shared keys leak credentials, and disabling audit logs removes the record a reviewer needs.

  8. Question 16

    A security team wants to make sure a Cloud Storage bucket cannot be made public by mistake. Which setting enforces this at the bucket level?

    1. AA bucket label that says private, which Cloud Storage reads and uses to block public grants automatically
    2. BObject versioning turned on, so that any object made public can be restored to its private version later
    3. CA comment in the bucket description telling administrators not to share its contents with the public
    4. DPublic access prevention on the bucket, which blocks grants that would make its contents public
    Show answer and explanation
    Correct answer: D

    Public access prevention blocks grants that would expose the bucket contents publicly and is enforced by Cloud Storage. A label does not enforce access, a description is advisory, and versioning restores older objects rather than preventing exposure.

Ensure the successful operation of a cloud solution (7 questions)

  1. Question 17

    A team wants an alert in Cloud Monitoring when a VM's CPU stays above 80 percent for 10 minutes, delivered to the on-call channel. Which configuration is needed?

    1. AAn alerting policy on the CPU utilization metric with a 10-minute duration condition and a notification channel
    2. BA scheduled Cloud Function that runs top on the VM every minute and writes the output to a text file
    3. CA Cloud Logging filter that counts CPU lines in the syslog file, reviewed by the operator each morning
    4. DA Cloud Audit Logs sink to a bucket, which the team checks once a week for any CPU-related entries
    Show answer and explanation
    Correct answer: A

    An alerting policy on the CPU utilization metric with a duration condition fires only after the threshold holds for 10 minutes and notifies the channel. A log filter reviewed each morning is too slow, a polling function writes a file nobody watches, and audit logs record administrative activity.

  2. Question 18

    An engineer needs to keep application logs for 400 days for audit, while keeping the cost of older logs low. Logs are written by Cloud Logging. Which approach should be used?

    1. AExport logs to a text file on a VM disk that is backed up by hand once a month to a removable drive
    2. BKeep all logs in the default Cloud Logging bucket for 400 days, which is the only way to meet the audit requirement
    3. CDelete logs after seven days and rely on the application team to write their own copies for audit purposes
    4. DRoute logs with a log sink to a Cloud Storage bucket with a lifecycle rule that moves older objects to a colder class
    Show answer and explanation
    Correct answer: D

    A log sink to Cloud Storage with a lifecycle rule keeps logs for the audit period while moving older objects to cheaper classes. The default bucket retention is shorter than 400 days without a custom setting, a VM disk backup by hand is fragile, and deleting after seven days fails the requirement.

  3. Question 19

    A VM instance has become unresponsive, and the operator needs to see the serial console output to find the boot error. Which action gives the operator that output?

    1. AStop the VM and create a new VM from the same disk without reading any of its logs or messages first
    2. BRestart the project so that all VM serial output is written to the default Cloud Logging bucket
    3. CRead the serial port output for the instance with gcloud or the console, which shows boot messages
    4. DAttach a second disk and copy the system log from the VM by hand after logging in through SSH
    Show answer and explanation
    Correct answer: C

    The serial port output shows the boot messages, which helps diagnose why the instance will not respond. Recreating the VM hides the evidence, copying logs needs an SSH login that is not available on an unresponsive VM, and restarting the project does not produce the serial output.

  4. Question 20

    A Cloud Run service returns errors after a new revision is deployed. The team wants to send traffic back to the previous working version immediately. What should the engineer do?

    1. AShift 100 percent of traffic back to the previous revision using the traffic settings for the service
    2. BEdit the code of the new revision in the console and redeploy it without any change to the traffic split
    3. CDelete the service and redeploy the old container image from a laptop, which takes about an hour to complete
    4. DWait for the new revision to finish its own errors and fix itself as the autoscaler adds more instances
    Show answer and explanation
    Correct answer: A

    Shifting traffic back to the earlier revision restores service immediately, which is the fastest rollback. Deleting and redeploying takes much longer, editing in place is not a rollback, and waiting for errors to resolve themselves is not an operational response.

  5. Question 21

    A team wants application logs from a Compute Engine VM to appear in Cloud Logging and in Cloud Monitoring. Which component must be installed on the VM?

    1. AA Cloud SQL Auth proxy, which connects the application to its database over an encrypted channel
    2. BA Cloud Armor security policy, which filters requests before they reach the application on the VM
    3. CA Cloud Scheduler job that periodically copies the application's files into the Cloud Logging bucket
    4. DThe Ops Agent on the VM, which collects logs and metrics and sends them to Cloud Logging and Cloud Monitoring
    Show answer and explanation
    Correct answer: D

    The Ops Agent collects logs and system and application metrics from the VM and sends them to Cloud Logging and Cloud Monitoring. The Cloud SQL proxy handles database connections, Cloud Scheduler does not copy files into logging, and Cloud Armor filters traffic rather than collecting telemetry.

  6. Question 22

    An operations team wants to be notified quickly when a production service degrades. Which THREE configurations help? (Choose three.)

    1. AUptime checks on the public endpoint, with an alerting policy when checks fail from several regions
    2. BAlerting policies on latency and error rate metrics with notification channels for the on-call rota
    3. CLog-based metrics that count error entries, with alerts when the count rises above an agreed threshold
    4. DA weekly email that summarizes all logs for the week, sent to a shared mailbox nobody checks daily
    5. EA dashboard that only the operator opens when they remember to check it during the working day
    Show answer and explanation
    Correct answer: A, B, C

    Uptime checks, latency and error alerts, and log-based metrics surface degradation as it happens and notify the on-call team. A weekly summary and an unwatched dashboard detect problems too late.

  7. Question 23

    A team wants to know which Compute Engine VMs were created or deleted last week and by whom. Which log source answers this?

    1. AThe Cloud Storage access logs for the boot disk bucket, which record each time the disk image was read
    2. BCloud Audit Logs, specifically the Admin Activity logs for the Compute Engine service
    3. CThe VM's serial port output, which records every login and every change made to the instance over time
    4. DThe Monitoring CPU chart for the project, which shows when each VM was started or stopped by the platform
    Show answer and explanation
    Correct answer: B

    Cloud Audit Logs Admin Activity records resource creation, deletion and configuration changes with the caller's identity. Serial output shows boot messages, storage access logs cover bucket reads, and CPU charts show load rather than who changed what.

Set up a cloud solution environment (7 questions)

  1. Question 24

    A new team needs to start building on Google Cloud. The company wants resources grouped by project, billed to the finance account, and governed by company-wide policies. Which structure should the engineer set up first?

    1. ACreate a single VM in the default project and run every team's workloads on it until a formal structure is approved
    2. BCreate a folder for each engineer and a separate billing account for every project so that costs are separated by person
    3. CCreate one shared project for everyone, with all teams using the default service account and the owner role on it
    4. DCreate an organization resource with a billing account linked, then create projects under folders for each team
    Show answer and explanation
    Correct answer: D

    An organization with a linked billing account and folders for teams gives a hierarchy where policies inherit and each project is billed. A shared project with owner access ignores least privilege, per-person folders and billing accounts fragment governance, and a single VM does not define structure at all.

  2. Question 25

    An engineer must install and authenticate the gcloud CLI on a laptop and set a default project and region so that commands do not need flags every time. Which set of commands does this?

    1. Agcloud auth login only, after which every command uses the project of the first resource it lists
    2. Bgcloud project default set, followed by gcloud region select for each new terminal session
    3. Cgcloud install configure, which sets the project and region in the shell profile automatically
    4. Dgcloud init, followed by gcloud config set project and gcloud config set compute/region
    Show answer and explanation
    Correct answer: D

    gcloud init walks through authentication and sets defaults, and gcloud config set stores the project and region for later commands. Login alone does not set a project, and the other two command names are not gcloud commands.

  3. Question 26

    A company must stop unexpected cloud spend. The finance team wants an email alert when monthly spend passes 80 percent of a set amount for a project. Which tool should the engineer configure?

    1. AA Cloud Logging sink that writes every billing line to a spreadsheet that finance opens each Friday
    2. BA billing budget on the billing account, scoped to the project, with threshold alerts at 80 percent
    3. CA Compute Engine instance schedule that shuts down all VMs when the monthly invoice total is checked
    4. DA quota increase on each project, which limits how much the team can spend in a single month
    Show answer and explanation
    Correct answer: B

    A billing budget scoped to the project with threshold alerts notifies finance when spend crosses 80 percent. An instance schedule stops VMs without any budget logic, a logging sink to a spreadsheet is delayed and manual, and quotas limit resource counts rather than spend.

  4. Question 27

    A team wants to make sure that a new project uses a service account for its workloads rather than the default Compute Engine service account, which has broad editor rights by default. Which step prevents the default account from being used?

    1. AKeep the default account and add a comment in the deployment file asking developers to use another account instead
    2. BGive the default service account the owner role so that every workload can use it without any extra configuration
    3. CDisable the default service account or remove its broad role, and create a user-managed service account for each workload
    4. DDelete the project and recreate it, since the default service account is automatically reset on each project creation
    Show answer and explanation
    Correct answer: C

    Disabling the default account or removing its broad role, and using dedicated user-managed accounts, is the standard control. Owner rights widen the risk, a comment is not an enforced control, and recreating the project does not change the default account's roles.

  5. Question 28

    A company wants new resources to be created only in approved regions for data residency. Which control enforces this across all projects?

    1. AA written policy shared with teams each quarter, reminding them which regions are approved for use
    2. BAn organization policy that restricts the allowed locations for resources, applied at the organization level
    3. CA VM startup script that checks the region of each instance and shuts the instance down if it is wrong
    4. DAn IAM role that lets people create resources in one region only, granted to each team separately
    Show answer and explanation
    Correct answer: B

    An organization policy on allowed resource locations is enforced for every project under the organization. A written reminder is not enforced, a startup script runs too late and only on VMs, and per-team IAM roles cannot restrict regions across all services.

  6. Question 29

    Which TWO practices help keep a Google Cloud organization well organized? (Choose two.)

    1. AUse folders to group projects by team or environment, so that policies inherit down the hierarchy
    2. BPut every environment into a single project to reduce the number of projects that need managing
    3. CLabel resources with owner and cost centre so that spend and responsibility can be grouped and reported
    4. DShare one service account across all projects for simplicity, so that no project needs its own identity
    5. ETurn off billing export so that the bill is smaller and easier to read for the finance team each month
    Show answer and explanation
    Correct answer: A, C

    Folders group projects so policies inherit, and labels make ownership and spend reportable. A single project for every environment removes separation, one shared service account links every project's risk, and turning off billing export removes the data finance needs.

  7. Question 30

    A company's engineers need access to a new project. The security team wants access granted to Google Groups rather than to individual accounts. What is the main benefit of this approach?

    1. AMembership changes are made in one place, and access follows the group without a grant on every project
    2. BEach user keeps a separate copy of the role so that removing one user never affects anyone else in the team
    3. CGroups remove the need for any IAM roles, since members automatically receive the owner role on each project
    4. DGroup access is only available in the default project, so the security team can see all membership in one list
    Show answer and explanation
    Correct answer: A

    Granting roles to a group means adding or removing a person from the group updates their access everywhere the group holds a role. Separate per-user copies create the admin work groups avoid, groups still need roles, and group access is not limited to the default project.