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

'ECS' object has no attribute 'update_container_instances_state': AttributeError #2

Closed
veqryn opened this issue Feb 8, 2017 · 3 comments

Comments

@veqryn
Copy link

veqryn commented Feb 8, 2017

Seems impossible from the code, but it is happening and stopping it from working. Perhaps this function isn't available in lambda?

'ECS' object has no attribute 'update_container_instances_state': AttributeError
Traceback (most recent call last):
File "/var/task/asg_drain_ecs_tasks.py", line 166, in lambda_handler
tasksRunning, tmpMsgAppend = checkContainerInstanceTaskStatus(Ec2InstanceId)
File "/var/task/asg_drain_ecs_tasks.py", line 90, in checkContainerInstanceTaskStatus
ecsResponse = ecsClient.update_container_instances_state(cluster=clusterName,containerInstances=[containerInstanceId],status='DRAINING')
AttributeError: 'ECS' object has no attribute 'update_container_instances_state'
@veqryn
Copy link
Author

veqryn commented Feb 8, 2017

Nevermind, I figured it out: Lambda has boto 1.4, and packaging 1.5.8 with the lambda solved it.

@veqryn veqryn closed this as completed Feb 8, 2017
aigjermo pushed a commit to aigjermo/ecs-cid-sample that referenced this issue Mar 23, 2018
@dishu2511
Copy link

Hi
I am having a similar issue when calling list_tags_for_resource.
I have tried packaging boto (1.9.116) along with the lambda, but still getting the same error message. Ran the same script locally, it ran without any issues.

Thanks

@sjmiller609
Copy link

sjmiller609 commented Apr 23, 2019

It can also come from a version issue in botocore. In my case, the default python3.7 runtime's botocore version needed to be upgraded in order to ECS tag_resource to work.

'ECS' object has no attribute 'tag_resource'

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

3 participants