aws / aws/aws-toolkit-azure-devops

AWS_REGION env var on EKS pods overrides region set in task configuration

Open
#612 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
258
Forks
114
PR merge metrics
No merged PRs in 30d

Description

**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**

1. Host a self-hosted Azure DevOps agent inside an EKS pod.
2. Ensure the pod has AWS_REGION set (e.g. us-east-1) - this is commonly injected automatically by EKS/IRSA.
3. 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).
4. Run the pipeline.
5. 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

Contributor guide

Open the contributing guide

Research direction

Start by tracing how AWS Toolkit tasks resolve regions, using the S3 Upload and CloudFormation Deploy tasks named in the report, and reproduce the behavior with AWS_REGION set in an EKS agent pod. Done means an explicitly configured task region is selected instead of the environment variable, with the affected tasks behaving consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, azure, kubernetes, typescript
Domain
cloud, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.