question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

EC2 describe_images timeout

See original GitHub issue

Facing a lambda timeout issue using EC2 client describe_images(**kwargs). There are ~10000 AMI’s owned by account. Is there a workaround since there is no equivalent MaxResults as available in the describe_snapshots method?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
JordonPhillipscommented, May 31, 2016

You can increase the read timeout by providing it in the config. The default value is 60 seconds. Ex:

import boto3
from botocore.config import Config

ec2 = boto3.client('ec2', config=Config(read_timeout=120))

It would also probably be useful to request that EC2 add pagination to this operation. You can do this on their service forum.

Let me know if that works.

0reactions
sm-azurecommented, Jun 8, 2017

@JordonPhillips Had raised the issue with AWS. They mentioned that it was a fringe case.

@jonathanwcrane Have they updated the API to include pagination? I had used the timeout coupled with loops and sqs queues to deregister and then delete. The queue was used since the de-registration process is not instantaneous.

Read more comments on GitHub >

github_iconTop Results From Across the Web

EC2 describe Images API takes a lot of time to return results
EC2 describe Images API takes a lot of time to return results ... I specifically checked this twice or thrice and it takes...
Read more >
describe-images with owners timeout bug · Issue #4794 - GitHub
For some reason, when I filter these images with owners, it hangs for a very long time. Without ownerId, its fine. This test...
Read more >
describe-images — AWS CLI 1.27.34 Command Reference
If the value is set to 0, the socket read will be blocking and not timeout. The default value is 60 seconds. --cli-connect-timeout...
Read more >
describe-images — AWS CLI 2.9.7 Command Reference
The maximum socket read time in seconds. If the value is set to 0, the socket read will be blocking and not timeout....
Read more >
Amazon EC2 - Jenkins Plugins
By default, instances are terminated when the idle timeout period expires. You can change this by specifying the Stop/Disconnect on Idle ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found