
Answer-first summary for fast verification
Answer: Create a serverless VPC access connector. Configure the serverless service to use the connector for communication to the microservices.
The correct approach is to use a single Serverless VPC Access connector. Serverless services like Cloud Run and Cloud Functions cannot be deployed directly into a VPC subnet. Instead, a Serverless VPC Access connector acts as a bridge, enabling serverless services to communicate with resources in the VPC. Creating one connector (Option D) minimizes cost since multiple serverless services can share the same connector, avoiding the expense of multiple connectors (Option B). VPC peering (Option A) is unnecessary here, as the microservices are already in the existing VPC. Option C is invalid because serverless services cannot be deployed directly into a VPC subnet. Configuring a single connector and ensuring firewall rules allow traffic from the connector's IP range to the microservices meets the requirements cost-effectively.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You have multiple microservices deployed in a private subnet within an existing VPC. You need to deploy new serverless services using Cloud Run and Cloud Functions that require access to these microservices. The network traffic between the serverless services and private microservices is minimal, but each serverless service must be able to communicate with any microservice. Your goal is to implement a cost-optimized solution. What should you do?
A
Deploy your serverless services to the serverless VPC. Peer the serverless service VPC to the existing VPC. Configure firewall rules to allow traffic between the serverless services and your existing microservices.
B
Create a serverless VPC access connector for each serverless service. Configure the connectors to allow traffic between the serverless services and your existing microservices.
C
Deploy your serverless services to the existing VPConfigure firewall rules to allow traffic between the serverless services and your existing microservices.
D
Create a serverless VPC access connector. Configure the serverless service to use the connector for communication to the microservices.
No comments yet.