ECS driver does not work.
- Dominant language
- Python
- Stars
- 2.1k
- Forks
- 931
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 4
Description
## 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.
Contributor guide
Research direction
Start with libcloud/container/drivers/ecs.py, especially line 69 and the Elastic Container Service driver initialization. Run the documentation example with the reported region and inspect the generated host before calling list_clusters(). Done means the example can list ECS cluster names without InvalidURL or an AWS 500 response.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, python
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100