Back to feed
Dev.to
Dev.to
7/9/2026
The original title is: "Debugging Vertex AI on EC2 with Workload Identity Federation: Six Real-World Bugs"

The original title is: "Debugging Vertex AI on EC2 with Workload Identity Federation: Six Real-World Bugs"

Original: Everything That Goes Wrong With That Setup (And How I Debugged It)

Short summary

A detailed debugging walkthrough of deploying Google Gemini via Vertex AI on AWS EC2 using Workload Identity Federation. The author encountered six distinct bugs masquerading as '401 Unauthorized' errors, including a PM2 config filename typo, missing environment variables, and confusion between AWS and Google Cloud metadata services. Each issue is diagnosed with specific commands and explanations of the underlying infrastructure conventions.

  • Six distinct auth/config bugs encountered when deploying Vertex AI on EC2 with WIF
  • Key debugging technique: use pm2 env to verify environment variables reach the process
  • AWS and Google Cloud share the 169.254.169.254 metadata address, causing misleading error formats

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Comments

Failed to load comments. Please try again.

Explore more