janiko71 / aws-inventory

Python script for AWS resources inventory (cheaper than AWS Config)
GNU General Public License v3.0
164 stars 64 forks source link

Issue about region specal endpoint #56

Closed coffeedev2k closed 2 weeks ago

coffeedev2k commented 2 years ago

$ docker run --name zolotnik-015291475736 -v /tmp/aws-inventory/output:/usr/src/app/output -e AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID_015291475736} -e AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY_015291475736} ${REGISTRY_OVH}/zolotnik:latest python ./inventory.py --services s3 ec2 rds dynamodb ecs cloudwatch route53 elb elbv2 ecr

Number of services : 10 Services List : ['s3', 'ec2', 'rds', 'dynamodb', 'ecs', 'cloudwatch', 'route53', 'elb', 'elbv2', 'ecr']

Exception in thread Thread-20: Traceback (most recent call last): File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner self.run() File "/usr/src/app/res/awsthread.py", line 48, in run config.global_inventory[self.aws_service] = self.function_name(*self.arg) File "/usr/src/app/res/storage.py", line 114, in get_s3_inventory for objects in page_objects: File "/usr/local/lib/python3.8/site-packages/botocore/paginate.py", line 269, in iter response = self._make_request(current_kwargs) File "/usr/local/lib/python3.8/site-packages/botocore/paginate.py", line 357, in _make_request return self._method(**current_kwargs) File "/usr/local/lib/python3.8/site-packages/botocore/client.py", line 508, in _api_call return self._make_api_call(operation_name, kwargs) File "/usr/local/lib/python3.8/site-packages/botocore/client.py", line 915, in _make_api_call raise error_class(parsed_response, operation_name) botocore.exceptions.ClientError: An error occurred (IllegalLocationConstraintException) when calling the ListObjectsV2 operation: The me-south-1 location constraint is incompatible for the region specific endpoint this request was sent to. Traceback (most recent call last): File "./inventory.py", line 573, in inventory[svc] = config.global_inventory[svc] KeyError: 's3'

janiko71 commented 1 year ago

Hi, sorry for the delay. Is your issue still present? Do you have the AWS_Regions_List.json file?