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

scrape-ec2 fails in AWS-ISO-E partition #754

Open
corey-cole opened this issue Oct 17, 2024 · 0 comments
Open

scrape-ec2 fails in AWS-ISO-E partition #754

corey-cole opened this issue Oct 17, 2024 · 0 comments

Comments

@corey-cole
Copy link
Contributor

(This is probably more of a feature request than a bug report)

While running this in CodeBuild (i.e. directly in AWS), got the following error (removed unhelpful botocore stack trace lines):

  File "/root/.pyenv/versions/3.11.10/lib/python3.11/site-packages/urllib3/connection.py", line 206, in _new_conn
    raise NameResolutionError(self.host, self, e) from e
urllib3.exceptions.NameResolutionError: <botocore.awsrequest.AWSHTTPSConnection object at 0x7f3c14fcb550>: Failed to resolve 'ec2.eu-isoe-west-1.cloud.adc-e.uk' ([Errno -2] Name or service not known)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/codebuild/output/src2979722498/src/ec2instances.info/tasks.py", line 59, in scrape_ec2
    scrape(ec2_file)
  File "/codebuild/output/src2979722498/src/ec2instances.info/scrape.py", line 1234, in scrape
    add_pricing_info(all_instances)
  File "/codebuild/output/src2979722498/src/ec2instances.info/scrape.py", line 245, in add_pricing_info
    ec2.add_pricing(by_type)
  File "/codebuild/output/src2979722498/src/ec2instances.info/ec2.py", line 217, in add_pricing
    add_spot_pricing(imap)
  File "/codebuild/output/src2979722498/src/ec2instances.info/ec2.py", line 278, in add_spot_pricing
    for p in prices_iterator:
...
botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "https://ec2.eu-isoe-west-1.cloud.adc-e.uk/"

This is an uncommon partition, so it would be helpful if the NameResolutionError was handled the same way as a botocore ClientError (log and pass).

scrape-ec2 worked to that point, and scrape-rds completed successfully within the same CodeBuild execution.

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

1 participant