Giter VIP home page Giter VIP logo

Comments (5)

visenn avatar visenn commented on August 22, 2024 1

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.

dasbiswajit avatar dasbiswajit commented on August 22, 2024

is this because of Aws cli version?

from amazon-guardduty-multiaccount-scripts.

dasbiswajit avatar dasbiswajit commented on August 22, 2024

the error is as attached.

from amazon-guardduty-multiaccount-scripts.

ryanholland avatar ryanholland commented on August 22, 2024

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.

ryanholland avatar ryanholland commented on August 22, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.