cloudsploit
cloudsploit copied to clipboard
Missing region in config Error Message in AWS prevents running the collection/scan
Hi,
Thanks for creating this cloud assessment tool. I am actively using it.
When running the latest code for AWS, I am getting below error hence it does not complete the scan.
*** [INFO][REGIONS] Could not load all regions from EC2: {"message":"Missing region in config","code":"ConfigError", ...} ***
After that it goes to a retry loop -
Earlier code that I have (as of Sep 30th, 2021) do run properly for the same AWS account.
Is there anything I need to do in AWS to resolve it (i.e. configure regions, enable/disable, etc.) ? Or is this potentially a bug ?
When I am running this for a client, I cannot simply ask them to enable all regions just to run the scan (assuming that is the issue).
I did try specifying regions I want (as parameters/aws config) but still get the same results.
(I see that collectior.js and regions.js have been updated somewhat and they have more checks and explicit product-region mappings in the latest code).
Thanks for looking into it.
INFO: Found 273 API calls to make for aws plugins INFO: Collecting metadata. This may take several minutes... [INFO][REGIONS] Could not load all regions from EC2: {"message":"Missing region in config","code":"ConfigError", ...} Trying again in: 2.808 seconds Trying again in: 4.662 seconds Trying again in: 5.25 seconds
try exporting the region env variable like
export AWS_REGION='us-west-2'
this will get rid of the error message.
The trying again in seems like is caused by something different. I believe AWS may be rate limiting the api calls more aggressively these days. If you let it run, it should eventually complete as normal, but will definitely take a lot longer. It would be good for someone with more insite to take a look at this.
the export AWS_REGION='us-west-2'
env variable fixed it for me, but i already have region set in my AWS Credentials file, why doesn't it pick that up?
In my case AWS.config.update({region: "us-east-1"});
fixed it for me. and you can also fix it that way in the shell export AWS_SDK_LOAD_CONFIG=1
. Solution for windows users set AWS_SDK_LOAD_CONFIG=1
@joss12 Where in the code did you update it? AWS.config.update({region: "us-east-1"});