builder/amazon/common: correct logic in deleting secutiry group