aws-solutions / automated-security-response-on-aws

Automated Security Response on AWS is an add-on solution that works with AWS Security Hub to provide a ready-to-deploy architecture and a library of automated playbooks. The solution makes it easier for AWS Security Hub customers to resolve common security findings and to improve their security posture in AWS.
https://aws.amazon.com/solutions/implementations/aws-security-hub-automated-response-and-remediation/
Apache License 2.0
381 stars 108 forks source link

Multi-Account multi-region setup - Failing ap-south-2 region #182

Closed pitkanenjesse closed 10 months ago

pitkanenjesse commented 10 months ago

Describe the bug

We run a multi-account/region kind of setup with the Administrator centralized in one account, we deploy thru CfCT, we already had us-east-1 us-east-2 ap-south-1 and other regions enabled, when we enabled region ap-south-2, we got an error in the "Get Automation Document State" only in this region. To isolate roles and permission issues, we created a dummy Lambda using the same role Administrator and Member cross-account, and we were able to Get the document. I believe the issue its somewhere in the layer when passing the arguments to awsapi_cached_client.py BotoSession. We updated the whole solution to 2.0.2 to be sure everything its up-to-date and in sync.

The error is "An unhandled client error ocurred: UnrecognizedClientException"

To Reproduce

Centralized setup running on us-east-1, try to run any automation for any control thru Security Hub automation on ap-south-2 region.

Invoking the lambda manually passing any other "Region" argument works fine.

Expected behavior

The Get Document State step and whole solution to run without errors on ap-south-2

Please complete the following information about the solution:

To get the version of the solution, you can look at the description of the created CloudFormation stack. For example, "(SO0111) AWS Security Hub Automated Response & Remediation Administrator Stack, v1.4.0". You can also find the version from releases

Screenshots If applicable, add screenshots to help explain your problem (please DO NOT include sensitive information).

Additional context Add any other context about the problem here.

tmekari commented 10 months ago

Hi @pitkanenjesse, I can confirm that this should be fixed in our next release. We've addressed a bug regarding remediations not being able to execute in opt-in regions that I believe should extend to your issue here. Thank you for your detailed explanation and for using our solution.

pitkanenjesse commented 7 months ago

Hi @tmekari , any estimates for when this release will be available?

kroeter commented 7 months ago

Hi @pitkanenjesse - This release is scheduled for late Q1 or early Q2, i'll provide an update on this thread once its out.