You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 27, 2023. It is now read-only.
Use the commands below to provide key information from your environment:
You do NOT have to include this information if this is a FEATURE REQUEST
-->
Description
Preface:
I am an AWS novice, so there is a chance that this is not an actual bug, however after quite a bit of research and investigaiton I do not know what I am doing wrong.
Every time I create an ECS cluster with docker compose -f production.yml up the cluster is created in region us-east-1, despite having region = eu-west-2 in my ~/.aws/config file, and "Profile": "default" in the ecs context I'm using to create the cluster.
Things I have tried to resolve this.
Removing my ecs context and adding it again using the docker context rm and docker context create ecs myecscontext commands.
Installing the latest version of the cli
Manually checking both my ~/.aws/config and /home/roger/.docker/contexts/meta/48f62a86e3f14dab7bbecff064a56ea130fac8dc96b1a1442e5019bdc724be7a/meta.json files for any issues.
Steps to reproduce the issue:
Create a new ecs context with the docker context create ecs myecscontext command
Select 'An existing AWS profile' when asked what credentials to use.
Switch to the context with docker context use myecscontext.
Create a cluster with docker compose -f production.yml up.
See that the cluster is being created in AWS in the us-east-1 region.
Inspect the generated Cloudformation code with docker compose -f production.yml convert.
Notice a number of occurrences of us-east-1 in the generated YAML as per below
See above, the cluster is created in region us-east-1
Describe the results you expected:
The cluster is created in region eu-west-2 as per my AWS CLI settings.
Additional information you deem important (e.g. issue happens only occasionally):
I have a feeling that upstream something is failing and us-east-1 is being selected because it's an AWS default region.
Output of docker version:
Client: Docker Engine - Community
Cloud integration: 1.0.4
Version: 19.03.14
API version: 1.40
Go version: go1.13.15
Git commit: 5eb3275d40
Built: Tue Dec 1 19:20:26 2020
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 19.03.14
API version: 1.40 (minimum version 1.12)
Go version: go1.13.15
Git commit: 5eb3275d40
Built: Tue Dec 1 19:18:53 2020
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.3.9
GitCommit: ea765aba0d05254012b0b9e595e995c09186427f
runc:
Version: 1.0.0-rc10
GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd
docker-init:
Version: 0.18.0
GitCommit: fec3683
Output of docker context show:
You can also run docker context inspect context-name to give us more details but don't forget to remove sensitive content.
I have a feeling that there's something funny going on with fetching the correct ENV vars. Previously I only had export AWS_DEFAULT_REGION="eu-west-2" in my .zshrc.
The error is still hapenning for me, even despite the workaround of setting AWS_REGION and AWS_PROFILE envs. Wtf? Pretty broken behaviour for something that is displayed in the docs...
I was able to fix it using
aws configure set default.region eu-central-1
It seems the all "select a profile" thing ain't properly working
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
BUG REPORT INFORMATION
Use the commands below to provide key information from your environment:
You do NOT have to include this information if this is a FEATURE REQUEST
-->
Description
Preface:
I am an AWS novice, so there is a chance that this is not an actual bug, however after quite a bit of research and investigaiton I do not know what I am doing wrong.
Every time I create an ECS cluster with
docker compose -f production.yml up
the cluster is created in regionus-east-1
, despite havingregion = eu-west-2
in my~/.aws/config
file, and"Profile": "default"
in the ecs context I'm using to create the cluster.Things I have tried to resolve this.
docker context rm
anddocker context create ecs myecscontext
commands.~/.aws/config
and/home/roger/.docker/contexts/meta/48f62a86e3f14dab7bbecff064a56ea130fac8dc96b1a1442e5019bdc724be7a/meta.json
files for any issues.Steps to reproduce the issue:
docker context create ecs myecscontext
commanddocker context use myecscontext
.docker compose -f production.yml up
.us-east-1
region.docker compose -f production.yml convert
.us-east-1
in the generated YAML as per belowDescribe the results you received:
See above, the cluster is created in region
us-east-1
Describe the results you expected:
The cluster is created in region
eu-west-2
as per my AWS CLI settings.Additional information you deem important (e.g. issue happens only occasionally):
I have a feeling that upstream something is failing and
us-east-1
is being selected because it's an AWS default region.Output of
docker version
:Output of
docker context show
:You can also run
docker context inspect context-name
to give us more details but don't forget to remove sensitive content.Output of
docker info
:Additional environment details (AWS ECS, Azure ACI, local, etc.):
The text was updated successfully, but these errors were encountered: