Agent suddenly not connecting due to `/api/v2/workspaceagents/aws-instance-identity` 404 / 400

This is the case both for new workspaces and for existing workspaces that worked yesterday. The workspace agent log is attached, the relevant bit is:
[ 12.556546] cloud-init[1056]: 2025-11-08 21:56:37.708 [debu] sdk request method=POST url=https://coder.mycompany.com/api/v2/workspaceagents/aws-instance-identity body=""
[ 12.682532] cloud-init[1056]: 2025-11-08 21:56:37.834 [debu] sdk response method=POST url=https://coder.mycompany.com/api/v2/workspaceagents/aws-instance-identity status=404 body="" trace_id="" span_id=""
[ 12.556546] cloud-init[1056]: 2025-11-08 21:56:37.708 [debu] sdk request method=POST url=https://coder.mycompany.com/api/v2/workspaceagents/aws-instance-identity body=""
[ 12.682532] cloud-init[1056]: 2025-11-08 21:56:37.834 [debu] sdk response method=POST url=https://coder.mycompany.com/api/v2/workspaceagents/aws-instance-identity status=404 body="" trace_id="" span_id=""
5 Replies
alex
alex3w ago
I ran into the same issue as well. The strange thing is, if I don’t specify a domain, it automatically uses a coder.app domain, and through that domain, the workspace can be created successfully ,the agent works fine in that case.
ShamesBond
ShamesBondOP3w ago
What are you doing to not specify a domain @alex ? If I comment out my CODER_ACCESS_URL I do see the agent trying to connect to https://myassignedproxy.pit-1.try.coder.app but it still gets a 400
ShamesBond
ShamesBondOP3w ago
GitHub
bug: aws-instance-identity fails intermittently on v2.27.3 · Issue...
Is there an existing issue for this? I have searched the existing issues Current Behavior After upgrading to Coder v2.27.3, workspace agents fail to authenticate intermittently when using aws-insta...
ShamesBond
ShamesBondOP3w ago
The only way I was able to get around this issue was to roll back before the 2.7 update to 2.6.3
matifali
matifali3w ago
GitHub
bug: aws-instance-identity fails intermittently on v2.27.3 · Issue...
Is there an existing issue for this? I have searched the existing issues Current Behavior After upgrading to Coder v2.27.3, workspace agents fail to authenticate intermittently when using aws-insta...

Did you find this page helpful?