AWS documentation - Specify need of AWS_DEFAULT_REGION variable
Summary
aws ecs
fails to run if no region is specified.
Steps to reproduce
- Remove the
AWS_DEFAULT_REGION
CI variable in your project - Run a
Deploy/ECS
deployment
The following error pops up:
$ ecs update-task-definition
You must specify a region. You can also configure your region by running "aws configure".
The AWS documentation should be updated to include this variable along with the two other mandatory variables (AWS_SECRET_ACCESS_KEY
and AWS_ACCESS_KEY_ID
). Even this variable is lacking for ECS deployments, I think it may be worth documenting this in the "higher level" AWS paragraph.
What is the current bug behavior?
Example when no AWS_DEFAULT_REGION
CI variable is entered: https://gitlab.com/ebaque/rails-docker-ecs/-/jobs/568472321
What is the expected correct behavior?
aws ecs
commands should be able to run.
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)
Possible fixes
Add AWS_DEFAULT_REGION
to the AWS documentation: https://docs.gitlab.com/ee/ci/cloud_deployment/#aws