Comments (5)
This is caused by an older version of boto/botocore that do not yet have the ap-east-1 region updated as supported by GuardDuty. Ensure you have updated both boto3 and botocore packages to the latest version (boto3: 1.9.197 / botocore: 1.12.197)
I am afraid that issue is in the code implementation.
When the script is executed without providing any region explicitly, then function:
guardduty_regions = [str(item) for item in args.enabled_regions.split(',')]
will provide on the list of regions where GuardDuty is enabled also region "HongKong".
The problem is - according to the new AWS approach to the new regions, new region can be disabled and client needn't to want to enable this.
In such case in the loop which is several lines lower, the code will fail with the information that the session token is invalid, when it will try to list detectors in the region which is not enabled in the account:
detector_dict = list_detectors(gd_client, aws_region)
Script must be modified to provide on the list of guardduty_regions only these regions where GuardDuty is enabled AND which are enabled in the account.
from amazon-guardduty-multiaccount-scripts.
is this because of Aws cli version?
from amazon-guardduty-multiaccount-scripts.
the error is as attached.
from amazon-guardduty-multiaccount-scripts.
This is caused by an older version of boto/botocore that do not yet have the ap-east-1 region updated as supported by GuardDuty. Ensure you have updated both boto3 and botocore packages to the latest version (boto3: 1.9.197 / botocore: 1.12.197)
from amazon-guardduty-multiaccount-scripts.
@visenn You are correct, thanks for that - I just pushed an update that will correctly handle that error in the Master account and remove the region from the list.
from amazon-guardduty-multiaccount-scripts.
Related Issues (20)
- raised in error
- Document other tools for guard duty multi-account enablement in readme HOT 1
- Role for EC2 not defined HOT 2
- Issues with enabledguardduty script HOT 6
- Exceptions thrown in eu-west-3 HOT 1
- Script is stuck after creating detector for member account in ap-northeast-1 region HOT 1
- Released version
- New line character in windows is "\r\n", current enabler script only removes "\n" character from csv HOT 1
- disableguardduty.py does not work HOT 7
- enableguardduty script - argument to disable email invite? HOT 1
- Enable Guard Duty on Stolkhome region HOT 6
- Issues with disableguardduty.py HOT 1
- master_account type needs to be STR not INT on line 105 in disableguardduty.py HOT 1
- Frequency for updated findings HOT 3
- Most recent version of botocore/boto3 is not compatible with this code HOT 8
- Include Paris region, now that it supports GuardDuty HOT 1
- Organisation account in Removed state
- Issues with enabledguardduty script HOT 2
- Assume role with MFA condition HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amazon-guardduty-multiaccount-scripts.