Explanation
In IAM, deny policies always take precedence over allow policies, ensuring tighter security.
Q22
Which service is best for serverless application deployment?
ACloud Functions
BCompute Engine
CApp Engine
DCloud Storage
Explanation
Cloud Functions is specifically designed for serverless functions, while others require more management or are not serverless.
Q23
A company needs low-latency access to its databases across multiple regions. Which option fulfills this requirement?
ACloud Spanner
BCloud SQL
CFirestore
DBigQuery
Explanation
Cloud Spanner is designed for global distribution and low-latency access, unlike the others which are better for specific use cases.
Q24
What happens when you set IAM roles on a project but not on any individual resources?
ARoles apply to all resources
BNo roles are recognized
COnly some roles apply
DRoles conflict with service accounts
Explanation
IAM roles granted at the project level apply to all resources within that project by default.
Q25
Which service should a developer use for managing event-driven applications?
ACloud Functions
BCloud Storage
CCloud App Engine
DCloud Run
Explanation
Cloud Functions is designed for event-driven architectures, while others aren't.
Q26
You are configuring a VPC and need to control access to your APIs. Which feature should you enable?
ACloud Deployment Manager
BVPC Service Controls
CCloud Pub/Sub
DStackdriver Monitoring
Explanation
VPC Service Controls enhance security by defining perimeter boundaries.
Q27
What happens when you set a Cloud Storage object's ACL to 'private'?
APublic access granted for everyone
BOnly owner can access object
CAll project members gain access
DObject is deleted permanently
Explanation
A 'private' ACL restricts access only to the owner.
Q28
Which service is best for serverless application deployment?
AGoogle Cloud Functions
BGoogle Kubernetes Engine
CGoogle Compute Engine
DGoogle App Engine
Explanation
Google Cloud Functions is designed for event-driven, serverless applications; GKE and GCE are more for containerized and VM deployments respectively.
Q29
You are configuring Cloud Pub/Sub. What happens when a subscriber is too slow to process messages?
AMessages are deleted immediately.
BMessages are stored forever.
CMessages are temporarily stored.
DMessages are sent to other subscribers.
Explanation
Messages are temporarily retained until acknowledged or the retention duration expires; they are not deleted nor sent elsewhere.
Q30
A company needs to ensure its Compute Engine instance can access Google Cloud Storage securely. What should they use?
AOAuth 2.0 tokens
BService accounts
CIAM roles
DVPC Peering
Explanation
Service accounts grant the instance authorized access to GCS resources, while IAM roles define what actions can be done.