Following error occurs when trying to enable 'pci-dss'
Enabling the following Security Hub Standards for enabled account(s) and region(s): ['arn:aws:securityhub:::stardards/pci-dss/v/3.2.1']
Assumed session for 111111111111.
Won't try to link master account 111111111111 to itself
Assumed session for 111111111111.
Beginning 111111111111 in ap-northeast-1
Error Processing Account 111111111111
---------------------------------------------------------------
Failed Accounts
---------------------------------------------------------------
111111111111:
InvalidInputException('An error occurred (InvalidInputException) when calling the BatchEnableStandards operation: Invalid StandardsSubscriptionRequest(s): [{"StandardsArn":"arn:aws:securityhub:ap-northeast-1::arn:aws:securityhub:::stardards/pci-dss/v/3.2.1"}]',)
---------------------------------------------------------------
Therefore I fixed else context of the function in order to ensure proper arn format for non-CIS stardards.
Confirmed working properly with ENABLE_STANDARDSs shown below
Issue #, if available: N/A
Description of changes:
Following error occurs when trying to enable 'pci-dss'
I guess that's because given arn/ENABLE_STANDARDS is not parsed properly. When calling the function it passes arn.
Therefore I fixed
else
context of the function in order to ensure proper arn format for non-CIS stardards. Confirmed working properly with ENABLE_STANDARDSs shown belowThanks
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.