You must restrict Cloud Functions invocations to authorized services following Google best practices. What should you do?
Choose an answer
Tap an option to check your answer.
Correct answer: Create a service account with the Cloud Functions Invoker role. Use that service account to invoke the function..
Why this is the answer
To restrict Cloud Functions invocations to authorized services, Google best practices recommend using a service account with the Cloud Functions Invoker role. This role grants permission to invoke HTTP-triggered functions. The authorized service can then use this service account to authenticate its requests, ensuring only services with the appropriate permissions can trigger the function. Using Identity-Aware Proxy (IAP) is for securing access to web applications and resources, not directly for programmatic Cloud Functions invocation. Creating a service account with the Cloud Functions Viewer role only allows viewing function metadata, not invoking it. While OAuth 2.0 client IDs are used for authentication, using a service account with the specific Cloud Functions Invoker role is the more direct and recommended method for service-to-service authentication for Cloud Functions.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed