I am trying to get k6 running in Amazon ECS.
I’m building my scripts into a docker image as part of our build pipeline. My dockerfile:
FROM loadimpact/k6:0.26.1 ENV SCRIPT card-payment.js COPY ./test /test WORKDIR /test ENTRYPOINT  # override the base image so we can run scripts inside the container CMD ["sh", "-c", "k6 run $SCRIPT"]
When I run this via the docker command line it works as expected and I’m able to pass in the K6 environment variables:
docker run --rm -it -e K6_VUS=2 loadtests:latest
However, when I run the image in ECS with my environment variables set in the task definition, the K6 variables are ignored and my test is always run with 1 VU.
Any idea why this might be the case?