Docker-compose up unable or no option to set region

Hi! I am using docker-compose up --debug command with an “ecs” context and would like to set the AWS region that the command should use.

So far I have tried:
#1. set region on my windows machine AWS profile located at .aws/credentials folder.

aws_access_key_id     = XXXXX
aws_secret_access_key = XXXXX
region                = ap-southeast-2

Above doesn’t seem to work.

#2 Set Default AWS region on my powershell Set-DefaultAWSRegion -Region ap-southeast-2 still don’t work

When I run docker compose up --debug I get
time="2021-02-02T15:58:50+08:00" level=debug msg="deploying on AWS with region=\"us-east-1\""

which looks weird. Doesn’t honor the default CLI region, and the region I set on my AWS Profile

I was having a similar problem. I used the aws cli to set the default region, which ended up working for me. (in my case, it deployed to us-east-2 instead of us-east-1) Here is the command that I ran, with your region substituted for my own.

aws configure set default.region ap-southeast-2