This CloudFormation template creates a network ACL with ingress and egress rules to whitelist specific ports (in this case SSH port 22)

CloudFormation Template