Deploy-ECS.gitlab-ci.yml AWS_REGION variable

Problem to solve

I’m on gitlab.com and tried deploying to AWS ECS using the instructions for including the Deploy-ECS.gitlab-ci.yml template found here. I ended up with the error.

$ ecs update-task-definition
You must specify a region. You can also configure your region by running "aws configure".

Further details

I was able to fix the error by adding the AWS_REGION variable to my .gitlab-ci.yml file.

variables:
  CI_AWS_ECS_CLUSTER: testing
  CI_AWS_ECS_SERVICE: sample-app-service
  CI_AWS_ECS_TASK_DEFINITION: first-run-task-definition
  AWS_REGION: us-east-1

Looking at it further, it might be better to include it in the environment variables. The documentation refers to setting up the AWS environment variables here, but doesn't include the AWS_REGION variable.

Proposal

I suggest adding that to the documentation.

Who can address the issue

Other links/references

Edited by David Specht