Limit SecurityGroups Packer can use

Packer’s documentation claims that it is possible to restrict/limit the SecurityGroups that Packer can use, by taking advantage of the packer prefix[1] of the SecurityGroupName. I do not see how to do this, since IAM only allows you to restrict based on the SecurityGroupId[2], not the SecurityGroupName.

[1] (search for “prefix packer” in the page)

Any help would be appreciated. Thank you,