amazon-web-servicesamazon-ec2aws-security-group

Can I add dns name in aws security group


I have to connect my dynamic IP(which changes every time) to the AWS EC2 machine.
For this I mapped my public IP to the domain name(xyz.com), now I am trying to add it to security group.
But AWS security group not allowing to add DNS names. Is it the right process to do it, if not please suggest me.


Solution

  • Security Groups and ACLs are not able to resolve DNS hostnames.

    You can use the AWS CLI to script the update of your IP dynamic address:

    aws ec2 authorize-security-group-ingress --group-id --protocol tcp --port 22 --cidr /24

    http://docs.aws.amazon.com/cli/latest/userguide/cli-ec2-sg.html