For IndividualsFor Educators
ExpertMinds LogoExpertMinds
ExpertMinds

Ace your certifications with Practice Exams and AI assistance.

  • Browse Exams
  • For Educators
  • Blog
  • Privacy Policy
  • Terms of Service
  • Cookie Policy
  • Support
  • AWS SAA Exam Prep
  • PMI PMP Exam Prep
  • CPA Exam Prep
  • GCP PCA Exam Prep

© 2026 TinyHive Labs. Company number 16262776.

    PracticeGCP Associate Cloud Engineer (ACE)GCP Associate Cloud Engineer Practice Exam 1Question 47
    Medium1 markMultiple Choice
    Domain 5.2: Managing service accountsService AccountsAuthenticationDomain 5.2

    GCP ACE · Question 47 · Domain 5.2: Managing service accounts

    You need to run a script on your local on-premises workstation that interacts with GCP APIs. The script needs to authenticate as a service account. Which TWO steps are required? (Select TWO)

    Answer options:

    A.

    Generate a JSON key for the service account.

    B.

    Attach the service account to your local workstation.

    C.

    Set the GOOGLE_APPLICATION_CREDENTIALS environment variable to point to the key file.

    D.

    Run gcloud auth login with your personal account.

    E.

    Enable Identity-Aware Proxy (IAP).

    How to approach this question

    Identify how external applications authenticate to GCP using service accounts.

    Full Answer

    When code runs outside of Google Cloud (like on an on-premises workstation), it cannot use the metadata server to get credentials. You must generate a Service Account Key (usually a JSON file), download it, and set the `GOOGLE_APPLICATION_CREDENTIALS` environment variable to the file path. Google Cloud client libraries automatically detect this variable and use the key to authenticate.

    Common mistakes

    Thinking you can 'attach' a service account to an on-prem machine.
    Question 46All questionsQuestion 48

    Practice the full GCP Associate Cloud Engineer Practice Exam 1

    50 questions · hints · full answers · grading

    Sign up freeTake the exam

    More questions from this exam

    Q01What is the highest level of the Google Cloud resource hierarchy?EasyQ02You need to enable the Compute Engine API in a new project using the command line. Which command ...EasyQ03You are setting up a new GCP environment. You need to grant a group of developers access to view ...MediumQ04You want to receive an email notification when your GCP spending exceeds $1000 this month. What s...EasyQ05You need to analyze your GCP billing data using complex SQL queries to understand cost trends acr...Medium
    View all 50 questions →