The Simplest Way to Make Cloud Storage and Vertex AI Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

Teams use cloud storage and vertex ai to store raw files and train models. The storage service holds datasets while the AI platform reads them to build predictions. This workflow supports batch jobs, model training, and artifact storage in one cloud project. Getting the permissions right between these two services prevents data leaks and broken pipelines. When roles are clear, data scientists can run experiments without waiting on manual ticket approvals. How data and roles flow between cloud

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

Teams use cloud storage and vertex ai to store raw files and train models. The storage service holds datasets while the AI platform reads them to build predictions.

This workflow supports batch jobs, model training, and artifact storage in one cloud project. Getting the permissions right between these two services prevents data leaks and broken pipelines. When roles are clear, data scientists can run experiments without waiting on manual ticket approvals.

How data and roles flow between cloud storage and vertex ai

Data moves between these two services through cloud identities and bucket permissions. First, your team uploads training data, text files, or images into a storage bucket. Next, a training job or notebook starts inside the machine learning platform. That job needs a cloud service identity to read files from the bucket.

Google Cloud creates default service agents when you turn on the AI APIs. You can also make a custom service account with narrow roles for each job. When the training run finishes, the job writes model files back to the bucket. Prediction endpoints then read those saved model files to serve live traffic.

Each step depends on identity and role checks at the bucket level. If a role is missing, the training job fails right away with a permission error. If the bucket sits in another region, data transfer takes longer and costs more. Keeping the bucket and the compute job in the same region speeds up training.

Common failure modes and how to scope roles and network paths

Many teams hit permission errors and respond by granting broad project editor roles. A shared service account with wide permissions puts every bucket in the project at risk. If one notebook has a flaw, an attacker can read or delete all buckets. Downloaded service account keys on laptops create another huge risk for your cloud account.

Unlogged reads are another big problem when datasets hold customer records. Training data often includes emails, phone numbers, card numbers, or national IDs. Without data access audit logs turned on, you cannot see who read which file. Masking tools can rewrite matched fields in results before a job reads the text.

AI Agent Security: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

To fix these issues, create one custom service account per workload or team. Grant read roles only on the specific bucket that holds the needed training dataset. Grant write roles only on the separate bucket that stores output model artifacts. Turn on uniform bucket level permissions so object ACLs do not override your rules.

You should also lock down the network path between storage and compute nodes. Set up private service controls so jobs run without public internet addresses. Use service perimeters to stop data from moving to buckets outside your cloud project. Enable audit logs for storage reads and writes so security teams can check activity.

Managing human and notebook permissions in daily work

Automated pipelines are only half of the story for most machine learning teams. Engineers and analysts also run interactive notebooks to test prompts and inspect raw files. When every user shares the default notebook identity, audit logs lose track of individuals. You see the notebook service account in the log instead of the real person.

Assigning individual identities or short-term roles for interactive work keeps logs clean. Teams should separate experimental buckets from production model buckets across different projects. That way, a quick test in a notebook cannot overwrite a live model artifact. Clear boundaries between development and production keep your machine learning workflows safe and stable.

Add runtime guardrails and masking beside your databases and APIs

Login rules, role grants, and CI checks govern who connects to your stack. Yet any allowed script, engineer, or AI agent still runs commands with the full scope of its role. For workloads on Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes, SSH, or internal HTTP services, hoop.dev sits beside the service as an open-source proxy, a sidecar for your database or API.

Before a query runs, hoop.dev guardrails check the statement against your rules. An AI Analyzer you configure can score intent or hold risky calls for human review. Next, hoop.dev data masking rewrites sensitive fields in responses, and each verdict is logged per listener. Explore the MIT-licensed project on GitHub.

Frequently asked questions

Why does my training job fail to read files from my bucket?

The service account running the job likely lacks read permissions on that specific bucket. Check the job identity and grant it object viewer permissions on the source bucket.

Should I use the default service agent or a custom service account?

Use a custom service account for production jobs and user notebooks. Default agents often have broad project permissions that let jobs read unrelated buckets.

How do I keep training data from leaving my private network?

Run your training jobs inside a private network and set up service perimeters. This blocks anyone from copying bucket files to an outside cloud project.

The query runs. The emails stay hidden.