Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--region isn't fully supported #12

Open
gavacho opened this issue Jan 25, 2017 · 1 comment
Open

--region isn't fully supported #12

gavacho opened this issue Jan 25, 2017 · 1 comment

Comments

@gavacho
Copy link

gavacho commented Jan 25, 2017

I attempted to call ecs-deploy-py like so:

ecs-deploy-py --region us-west-1 --cluster my-cluster --service-name my-service --image "docker.io/myorg/myrepo:${TRAVIS_COMMIT}"

But I get the following error:

Traceback (most recent call last):
  File "/home/travis/virtualenv/python3.5.2/bin/ecs-deploy-py", line 11, in <module>
    sys.exit(CLI())
  File "/home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages/ecs_deploy.py", line 31, in __init__
    self.client = boto3.client('ecs', **credentials)
  File "/home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages/boto3/__init__.py", line 83, in client
    return _get_default_session().client(*args, **kwargs)
  File "/home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages/boto3/session.py", line 263, in client
    aws_session_token=aws_session_token, config=config)
  File "/home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages/botocore/session.py", line 836, in create_client
    client_config=config, api_version=api_version)
  File "/home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages/botocore/client.py", line 70, in create_client
    verify, credentials, scoped_config, client_config, endpoint_bridge)
  File "/home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages/botocore/client.py", line 224, in _get_client_args
    verify, credentials, scoped_config, client_config, endpoint_bridge)
  File "/home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages/botocore/args.py", line 45, in get_client_args
    endpoint_url, is_secure, scoped_config)
  File "/home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages/botocore/args.py", line 103, in compute_client_args
    service_name, region_name, endpoint_url, is_secure)
  File "/home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages/botocore/client.py", line 297, in resolve
    service_name, region_name)
  File "/home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages/botocore/regions.py", line 122, in construct_endpoint
    partition, service_name, region_name)
  File "/home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages/botocore/regions.py", line 135, in _endpoint_for_partition
    raise NoRegionError()
botocore.exceptions.NoRegionError: You must specify a region.

I can avoid the error if I execute ecs-deploy-py like this:

AWS_DEFAULT_REGION=us-west-1 ecs-deploy-py --cluster my-cluster --service-name my-service --image "docker.io/myorg/myrepo:${TRAVIS_COMMIT}"
@samirbaaz
Copy link

samirbaaz commented Apr 12, 2017

This should be fixed when PR #16 is merged in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants