Describe the bug
When using self-hosted Azure DevOps agents hosted in Amazon EKS, the pods have an AWS_REGION environment variable injected by the cluster (e.g. via IAM Roles for Service Accounts / pod identity or node-level defaults). The AWS Toolkit tasks appear to read this environment variable instead of (or with higher priority than) the region explicitly configured in the task definition, causing tasks to run against the wrong region or fail entirely.
To reproduce
- Host a self-hosted Azure DevOps agent inside an EKS pod.
- Ensure the pod has AWS_REGION set (e.g. us-east-1) - this is commonly injected automatically by EKS/IRSA.
- Configure an AWS Toolkit task (e.g. S3 Upload, CloudFormation Deploy) with a different region explicitly set in the task parameters (e.g. eu-west-1).
- Run the pipeline.
- Observe that the task targets the region from the environment variable, not the one defined in the task.
Expected behavior
The region explicitly set in the task configuration should always take precedence over any AWS_REGION environment variable present in the agent's environment. The task-level setting should be the authoritative source of truth.
Screenshots
Your Environment
- On-prem or cloud based?: Cloud
- AWS Toolkit for Azure DevOps version: 1.24.0
- Agent type: Self-hosted, running in Amazon EKS
Describe the bug
When using self-hosted Azure DevOps agents hosted in Amazon EKS, the pods have an AWS_REGION environment variable injected by the cluster (e.g. via IAM Roles for Service Accounts / pod identity or node-level defaults). The AWS Toolkit tasks appear to read this environment variable instead of (or with higher priority than) the region explicitly configured in the task definition, causing tasks to run against the wrong region or fail entirely.
To reproduce
Expected behavior
The region explicitly set in the task configuration should always take precedence over any AWS_REGION environment variable present in the agent's environment. The task-level setting should be the authoritative source of truth.
Screenshots
Your Environment