Fix awsservicemap download, added more logging to all commands/sdk calls #109
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
AWS recently changed the format of https://api.regional-table.region-services.aws.a2z.com/index.json. Cloudfox uses that file, via
awsservicemapto download all supported regions and services so that it avoids making calls to service endpoints when that service doesn't exist in that region. But, this dependency made it so that once the JSON format changed, cloudfox was dead in the water. It would always return 0 regions and would skip all of the checks.FWIW, the json file used to look like this:
It used to look like this:
The ID used to be
service:regionand now, (I think this changed within the last week or two), it now looks like this:
The ID is now
sha265:region.This PR uses the newer version of
awsservicemap, which correctly parses the JSON. While I was at it, I fixed a bunch of logging issues. I also got inspired to createcloudfox-info.logwhich will now log every successfully AWS API call via SDK, which I think will be helpful. This accounts for most of the changes toaws/sdk/*.gofiles. Lastly, fixedcloudfox-error.logto record more things.Additional Context
I'm pretty sure this means that any version of cloudfox below
v1.17.0will just not work and will never work again, as they all use the old version ofawsservicemap. Everyone that uses cloudfox will have to upgrade to versionv1.17.0once it is released.