From 2e6d0bfa8596a4c47934d57e325f04de7155fde4 Mon Sep 17 00:00:00 2001 From: Brooke McKim Date: Tue, 30 Apr 2024 15:00:18 -0400 Subject: [PATCH] fix: Add region. --- scrape.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scrape.py b/scrape.py index 68e6caa..c532cd0 100755 --- a/scrape.py +++ b/scrape.py @@ -268,7 +268,6 @@ def fetch_data(url): def add_eni_info(instances): client = boto3.client('ec2', region_name='us-east-1') - # need to add region to client and set up accordingly response = client.describe_instance_types(Filters=[{'Name': 'instance-type', 'Values': ['*']}]) instance_types = response['InstanceTypes'] @@ -463,8 +462,7 @@ def add_vpconly_detail(instances): def add_instance_storage_details(instances): """Add information about instance storage features.""" - client = boto3.client('ec2') - # need to add region to client and set up accordingly + client = boto3.client('ec2', region_name='us-east-1') response = client.describe_instance_types(Filters=[{'Name': 'instance-storage-supported', 'Values': ['true']},{'Name': 'instance-type', 'Values': ['*']}]) instance_types = response['InstanceTypes']