Study guide

8.2 Event-Driven Architectures: Pub/Sub, Cloud Storage Triggers & Eventarc

Google Cloud Associate Cloud Engineer ACE

Track your progress as you read

Finished sections get a check mark.

1 Chapter 1: Introduction & Exam Overview

1.1 About the GCP Associate Cloud Engineer Exam 1.2 How to Use This Study Guide & Build a Study Plan

2 Chapter 2: Resource Hierarchy, IAM Basics & Cloud Identity

2.1 The GCP Resource Hierarchy: Organizations, Folders & Projects 2.2 Organization Policies & Granting IAM Roles 2.3 Cloud Identity: Managing Users and Groups

3 Chapter 3: APIs, Quotas & Billing Configuration

3.1 Enabling APIs and Provisioning Cloud Operations Suite 3.2 Assessing and Requesting Quota Increases 3.3 Billing Accounts, Project Linking & Billing Exports 3.4 Billing Budgets and Alerts

4 Chapter 4: Planning Compute & Storage Resources

4.1 Choosing the Right Compute Option: GCE vs. GKE vs. Cloud Run vs. Cloud Functions 4.2 Spot VMs, Custom Machine Types & Cost-Optimized Compute Planning 4.3 Choosing a Data Storage Product: Cloud SQL, BigQuery, Firestore, Spanner & Bigtable 4.4 Cloud Storage Classes & Persistent Disk Types

5 Chapter 5: Planning Network Resources

5.1 Load Balancing Options and Use Cases 5.2 Regional Resource Placement & High Availability Planning 5.3 Network Service Tiers: Premium vs. Standard

6 Chapter 6: Deploying Compute Engine Workloads

6.1 Launching Compute Engine Instances: Disks, SSH Keys & Availability Policies 6.2 Managed Instance Groups, Instance Templates & Autoscaling 6.3 OS Login and VM Manager for Fleet Configuration

7 Chapter 7: Deploying Google Kubernetes Engine Workloads

7.1 Installing and Configuring kubectl 7.2 Deploying GKE Clusters: Autopilot, Regional, Private & GKE Enterprise 7.3 Deploying Containerized Applications to GKE

8 Chapter 8: Deploying Serverless & Event-Driven Applications

8.1 Deploying Applications to Cloud Run and Cloud Functions 8.2 Event-Driven Architectures: Pub/Sub, Cloud Storage Triggers & Eventarc

9 Chapter 9: Deploying Data Solutions

9.1 Deploying Data Products: Cloud SQL, Firestore, Spanner, BigQuery & AlloyDB 9.2 Deploying Pub/Sub, Dataflow & Loading Data into Google Cloud

10 Chapter 10: Deploying Networking Resources & Infrastructure as Code

10.1 Creating VPCs, Subnets & Shared VPC 10.2 Firewall Rules, Cloud VPN & VPC Network Peering 10.3 Infrastructure as Code: Terraform, Config Connector, Cloud Foundation Toolkit & Helm

11 Chapter 11: Managing Compute Engine & GKE in Production

11.1 Connecting to and Managing Running Compute Engine Instances 11.2 Working with Snapshots and Custom Images 11.3 Managing GKE Clusters: Node Pools, Workloads & Artifact Registry Access 11.4 Horizontal and Vertical Pod Autoscaling in GKE

12 Chapter 12: Managing Cloud Run, Storage & Database Operations

12.1 Managing Cloud Run Revisions, Traffic Splitting & Scaling 12.2 Managing and Securing Cloud Storage Objects & Lifecycle Policies 12.3 Querying, Estimating Costs, Backup & Job Monitoring for Databases (Cloud SQL, BigQuery, Spanner, Dataflow)

13 Chapter 13: Networking Operations, Monitoring & Logging

13.1 Networking Operations: Subnets, Static IPs, Cloud DNS & Cloud NAT 13.2 Cloud Monitoring: Alerts, Custom Metrics & Dashboards 13.3 Cloud Logging: Buckets, Log Analytics, Routers & Filtering 13.4 Diagnostics, Ops Agent, Managed Service for Prometheus & Audit Logs

14 Chapter 14: IAM Policies & Role Types

14.1 IAM Policies: Structure, Bindings & Policy Hierarchy 14.2 IAM Role Types: Basic, Predefined & Custom Roles

15 Chapter 15: Service Accounts & Security Configuration

15.1 Creating Service Accounts & Assigning Least-Privilege Permissions 15.2 Assigning Service Accounts to Resources & Managing SA IAM Policies 15.3 Service Account Impersonation & Short-Lived Credentials

16 Chapter 16: Exam Readiness — Scenarios & Test-Day Strategy

16.1 Common ACE Exam Scenarios & Decision Frameworks 16.2 Test-Day Logistics, Time Management & Final Review Checklist

8.2 Event-Driven Architectures: Pub/Sub, Cloud Storage Triggers & Eventarc

Key Takeaways Explain This Topic AI

Pub/Sub message retention defaults to 7 days and is configurable from a 10-minute minimum to a 31-day maximum on both topics and subscriptions.

Cloud Storage fires OBJECT_FINALIZE, OBJECT_DELETE, OBJECT_METADATA_UPDATE, OBJECT_ARCHIVE (versioned buckets only), and OBJECT_INITIALIZE (zonal buckets) events, capped at 100 notification configs per bucket and 10 per event type.

Eventarc routes direct events, Cloud Audit Log events, and third-party events (Standard only) to destinations in the standardized CloudEvents format with at-least-once delivery and a default 24-hour retry retention window.

Invoking a Cloud Run service via Eventarc requires the trigger's service account to hold both roles/eventarc.eventReceiver and roles/run.invoker — a missing invoker role is a classic silent-failure trap.

One topic with multiple independent subscriptions implements Pub/Sub fan-out so that each downstream consumer gets its own full copy of every message.

Last updated: July 2026

Why This Sub-Domain Matters

The official ACE exam guide lists "Deploying an application for receiving Google Cloud events (e.g., Pub/Sub events, Cloud Storage object change notification events, Eventarc)" as its own explicit bullet under sub-topic 3.3, and Pub/Sub reappears again in sub-topic 3.4 as one of the named data products you must know how to deploy and load data into. Event-driven deployment is therefore tested from two angles: knowing which event source is firing, and knowing the plumbing that connects that source to your Cloud Run service or Cloud Run function. Because this pairs directly with the compute choices from the previous section, expect combined scenario questions that require both the right compute target and the right trigger mechanism in the same answer.

Cloud Pub/Sub Fundamentals

Pub/Sub is Google Cloud's fully managed, asynchronous messaging service built around two core objects:

A topic is the named channel a publisher sends messages to.

A subscription attaches to a topic and represents a stream of messages a subscriber consumes. Multiple subscriptions on one topic implement a fan-out pattern — every subscription gets its own independent copy of each message.

Subscriptions deliver messages one of two ways:

Delivery type How it works Typical use

Pull Subscriber client actively calls Pub/Sub to retrieve messages Batch workers, GKE/Compute Engine consumers polling on their own schedule

Push Pub/Sub sends an HTTP POST to a configured endpoint (such as a Cloud Run URL) Serverless consumers (Cloud Run, Cloud Run functions) that shouldn't have to run a polling loop

Pub/Sub guarantees at-least-once delivery — a subscriber may occasionally see a duplicate message and must be built to handle that (idempotent processing). Key configurable numbers:

Message retention : default 7 days ; configurable down to a minimum of 10 minutes or up to a maximum of 31 days — and this applies to both topics (for replay/seek) and subscriptions (for unacknowledged messages).

Messages can carry an ordering key to guarantee delivery order for messages sharing that key.

A dead-letter topic can be configured on a subscription so that messages exceeding a maximum delivery-attempt count are routed aside for inspection instead of being retried forever.

Cloud Storage Object Change Notifications

Cloud Storage can fire a Pub/Sub notification whenever an object changes state in a bucket. The event types you need to recognize:

OBJECT_FINALIZE — a new object (or new generation of an existing object) is successfully written. This is the event most "process this file the moment it lands" pipelines trigger on.

OBJECT_DELETE — an object is permanently deleted.

OBJECT_ARCHIVE — only fires when a bucket has object versioning enabled; marks the moment a live object version becomes non-current.

OBJECT_METADATA_UPDATE — object metadata changes without the object's data changing.

OBJECT_INITIALIZE — fires when object creation begins, specific to zonal buckets.

A single bucket supports up to 100 total notification configurations , with a cap of 10 configurations per individual event type . These are created directly against Cloud Storage with a command such as gcloud storage buckets notifications create gs://BUCKET --topic=TOPIC --event-types=OBJECT_FINALIZE .

Eventarc: The Unified Event Router

Eventarc is the managed platform that routes events from a source to a destination "without having to implement, customize, or maintain the underlying infrastructure." It recognizes three categories of event source:

Direct events — native events emitted straight from a Google Cloud service (for example, a Pub/Sub message being published, or a Cloud Storage object being finalized).

Audit Log events — events derived from Cloud Audit Logs , giving Eventarc visibility into 90+ additional API-call-level event types beyond the direct sources.

Third-party events — events from external SaaS and custom application sources (Eventarc Standard only).

Eventarc delivers every event in the standardized CloudEvents format, with at-least-once delivery and automatic retry with exponential backoff over a default 24-hour retention window for events that can't yet be delivered. Supported destinations differ by edition:

Edition Supported destinations

Eventarc Standard Cloud Run functions/services, internal HTTP endpoints inside a VPC, public GKE service endpoints, Workflows

  • Eventarc Advanced (adds to Standard) Cloud Run jobs, Eventarc buses, Pub/Sub topics
  • Wiring a Pub/Sub-Triggered Cloud Run Service

Because Cloud Run itself has no native "trigger" concept, Pub/Sub-to-Cloud-Run integration goes through Eventarc:

The event filter is type=google.cloud.pubsub.topic.v1.messagePublished .

The trigger's service account identity needs the roles/eventarc.eventReceiver role (to receive the event) and roles/run.invoker (to actually invoke the target Cloud Run service).

The account performing the deployment (not the trigger identity) separately needs Cloud Build Editor, Cloud Run Admin, Eventarc Admin, Service Account Admin/User, and Project IAM Admin — a broader set of roles than the trigger identity itself needs.

By default, Cloud Run uses the Compute Engine default service account ( PROJECT_NUMBER-compute@developer.gserviceaccount.com ) unless a dedicated service account is specified.

Newly created triggers can take up to two minutes to become fully active — a detail that explains "my trigger isn't firing yet" scenario questions.

Exam Scenarios

Scenario 1 — Fan-out order processing. An e-commerce order service publishes an OrderCreated message to a single Pub/Sub topic. Three independent services — inventory, billing, and customer notifications — each need their own copy of every order event, and each must be able to fall behind or fail without affecting the others. The correct design is one topic with three separate subscriptions , one per consumer, not three publishers or a single shared subscription (which would let only one consumer receive each message).

Scenario 2 — Image pipeline with a missing role. A team configures an Eventarc trigger so that uploads to a Cloud Storage bucket ( OBJECT_FINALIZE ) invoke a Cloud Run function that generates a thumbnail. The trigger shows as created, but the function never runs and Cloud Logging shows permission-denied errors. The most likely root cause: the trigger's service account is missing roles/eventarc.eventReceiver and/or roles/run.invoker — a classic, testable ACE trap, since the trigger object itself can exist and appear healthy while IAM is still misconfigured.

Scenario 3 — Retention and replay. A subscriber service is down for 20 hours during a maintenance window. Because Pub/Sub's default message retention is 7 days (far longer than the 20-hour outage), no messages are lost — they simply queue up and are delivered once the subscriber reconnects, as long as retention was not shortened below the outage window.