libcloud icon indicating copy to clipboard operation
libcloud copied to clipboard

ECS driver does not work.

Open gguta opened this issue 4 years ago • 2 comments

Summary

ECS driver does use wrong host name; if I fix this in the code the package send a request to AWS causing internal server error.

Detailed Information

apache-libcloud==3.3.1/Python 3.8.5/ubuntu20.04

Running the example provided in the documentation:

cls = get_driver(Provider.ECS)

conn = cls(access_id=os.getenv('AWS_ID'),
           secret=os.getenv('AWS_KEY'),
           region=os.getenv('AWS_REGION'))

for cluster in conn.list_clusters():
    print(cluster.name)

This results an error message: requests.exceptions.InvalidURL: Failed to parse: https://ecs.%s.amazonaws.com/

If I change the line 69 in libcloud/container/drivers/ecs.py to super(ElasticContainerDriver, self).__init__(access_id, secret, host=ECR_HOST % (region)), I get a response 500 from AWS.

Expected behavior: list the ECS cluster names.

gguta avatar Jun 05 '21 13:06 gguta

Make sure the AWS_REGION you are using is the default region or you can then specify your won region also

Asiwaju887 avatar Dec 01 '21 07:12 Asiwaju887

Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically marking is as stale. If this issue is not relevant or applicable anymore (problem has been fixed in a new version or similar), please close the issue or let us know so we can close it. On the contrary, if the issue is still relevant, there is nothing you need to do, but if you have any additional details or context which would help us when working on this issue, please include it as a comment to this issue.

stale[bot] avatar Apr 17 '22 05:04 stale[bot]