Good afternoon! When attempting to scan my aws environment across all regions by passing the --allregions flag, I noticed the following error telling me that I needed to specify a region.
shotop@SHOTOP-M-M5DY ansible % ghostbuster scan aws --profile kenna_us_prod --allregions
Obtaining Route53 hosted zones for AWS profile: kenna_us_prod.
Obtained 324 DNS A records so far.
Traceback (most recent call last):
File "/usr/local/bin/ghostbuster", line 8, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/click/decorators.py", line 73, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/ghostbuster/scan.py", line 265, in aws
ec2 = boto3.client("ec2")
File "/usr/local/lib/python3.9/site-packages/boto3/__init__.py", line 93, in client
return _get_default_session().client(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/boto3/session.py", line 270, in client
return self._session.create_client(
File "/usr/local/lib/python3.9/site-packages/botocore/session.py", line 870, in create_client
client = client_creator.create_client(
File "/usr/local/lib/python3.9/site-packages/botocore/client.py", line 91, in create_client
client_args = self._get_client_args(
File "/usr/local/lib/python3.9/site-packages/botocore/client.py", line 360, in _get_client_args
return args_creator.get_client_args(
File "/usr/local/lib/python3.9/site-packages/botocore/args.py", line 71, in get_client_args
final_args = self.compute_client_args(
File "/usr/local/lib/python3.9/site-packages/botocore/args.py", line 148, in compute_client_args
endpoint_config = self._compute_endpoint_config(
File "/usr/local/lib/python3.9/site-packages/botocore/args.py", line 234, in _compute_endpoint_config
return self._resolve_endpoint(**resolve_endpoint_kwargs)
File "/usr/local/lib/python3.9/site-packages/botocore/args.py", line 320, in _resolve_endpoint
return endpoint_bridge.resolve(
File "/usr/local/lib/python3.9/site-packages/botocore/client.py", line 441, in resolve
resolved = self.endpoint_resolver.construct_endpoint(
File "/usr/local/lib/python3.9/site-packages/botocore/regions.py", line 181, in construct_endpoint
result = self._endpoint_for_partition(
File "/usr/local/lib/python3.9/site-packages/botocore/regions.py", line 215, in _endpoint_for_partition
raise NoRegionError()
botocore.exceptions.NoRegionError: You must specify a region.
Good afternoon! When attempting to scan my aws environment across all regions by passing the --allregions flag, I noticed the following error telling me that I needed to specify a region.