fix: support arn:aws-us-gov partition for GovCloud regions
Author: bestickleyCreated Sep 2, 2026Updated Sep 10, 2026
Problem
Two issues block running Artillery in AWS GovCloud (us-gov-*) regions:
- ARN partition hardcoded. The Lambda platform, Fargate/ECS platform, and legacy ECS cluster runner hardcode ARN prefixes to
arn:aws/arn:aws-cnonly. GovCloud uses partitionaws-us-gov, so IAM policies and role ARNs built forus-gov-*regions end up malformed. - ECR image pull permissions missing. GovCloud has no reachable public worker image, so
WORKER_IMAGE_URLmust point at a private ECR repo. The Fargate worker IAM role only grantsecr:GetAuthorizationToken(needed for docker login), but notecr:BatchGetImage,ecr:GetDownloadUrlForLayer, orecr:BatchCheckLayerAvailability, so the task can authenticate but can't actually pull image layers.
Fix
I have a fix ready on my fork: https://github.com/bestickley/artillery/tree/fix/govcloud-arn-partition
- Added a shared
getArnPrefix(region)helper (arn:aws/arn:aws-cn/arn:aws-us-gov) and wired it intoaws-lambda/index.ts,aws-ecs/ecs.ts, andaws-ecs/legacy/run-cluster.ts, replacing the duplicated ternaries. Also extended the--task-role-nameARN-prefix check in the legacy ECS runner to acceptarn:aws-us-gov:iam. - Added
ecr:BatchGetImage,ecr:GetDownloadUrlForLayer, andecr:BatchCheckLayerAvailabilityto the Fargate worker role's ECR policy statement inaws-ecs/ecs.ts, alongside the existingecr:GetAuthorizationToken.
I tried to open a PR but got: "An owner of this repository has limited the ability to open a pull request to users that are collaborators on this repository." Could someone either grant PR access or pull the branch directly? Happy to answer questions or split this into two PRs if preferred.
Source: artilleryio/artillery