Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set AWS region using docker compose up with ECS context

I'm using the new docker compose ECS integration to create an ecs context for deploying as described here and here. I selected during docker context create ecs my-context for it to use an existing AWS profile which has us-west-2 configured as its default region. However, docker compose up always results in it deploying to us-east-1. I tried exporting DEFAULT_AWS_REGION but that didn't work either. Is there a way to set the region in the context? It looks like the older docker ecs setup command asked for the region but that cmd is now deprecated.

like image 747
stowns Avatar asked Nov 06 '22 03:11

stowns


1 Answers

I was able to fix this via the AWS CLI directly.

aws configure set default.region eu-central-1

Source: https://awscli.amazonaws.com/v2/documentation/api/latest/reference/configure/set.html

like image 102
Marc Qualie Avatar answered Nov 14 '22 14:11

Marc Qualie