Developer Documents Six Stacked Bugs in Gemini Vertex AI AWS Deployment
A developer building a keyless EC2 deployment using Google Gemini via Vertex AI and Workload Identity Federation encountered six distinct bugs that all initially appeared as variations of the same 401 Unauthorized error. The first issue was a 502 Bad Gateway caused by a filename typo in the PM2 ecosystem config file, which silently prevented environment variables from loading into the app process. Once the app was correctly started, a missing credentials error surfaced, followed by an unbranded XHTML 401 page that was traced not to Google or AWS S3, but to the AWS EC2 Instance Metadata Service (IMDS) at the internal address 169.254.169.254. The post details the exact commands and reasoning used to isolate each failure layer by layer, emphasizing that similar-looking errors can have entirely different root causes. The account serves as a practical debugging guide for developers setting up cloud-to-cloud authentication without static credentials.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in