"Refresh sub accounts" on AWS Master account may show error, even if the "Amazon AWS Organizations" pattern succeeds


Description

"Refresh sub accounts" on AWS Master account may show error, even if the "Amazon AWS Organizations" pattern succeeds.

This could be caused by custom mandatory fields on "cmdb_ci_cloud_service_account" table.

Check dictionary to see if there's any mandatory fields on cmdb_ci_cloud_service_account table which don't have value in the ecc_queue input payload of "Amazon AWS Organizations" pattern.

Workaround is to open below script include:

SubAccountsDiscoveryAjax

Then comment out below line by changing it from:

   return (patternPayload.status == 'SUCCEED' && mandatoryFieldsNotEmpty) ? 'success' : 'mandatory_field_empty';

to

   //return (patternPayload.status == 'SUCCEED' && mandatoryFieldsNotEmpty) ? 'success' : 'mandatory_field_empty';