A CloudFormation template to create a security group that allows inbound DNS traffic on TCP and UDP port 53.

CloudFormation Template