Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS Cant assign Elastic IP to Network Interface

I have a website that I am hosting on AWS. The ec2 instance is stored in a VPC. The instance is attached to an ELB and Network Interface. What I am trying to do is assign an Elastic IP to the Network interface so that my website has a static IP, while staying on the ELB. The issue is that when I try and assign the elastic IP to the Network Interface, I get the error

"An error occurred while attempting to associate the address You do not have permission to access the specified resource."

I am the owner of the account. Is what i am trying to do possible? I must have a static IP because the firewall we have goes by IP Address. Do i need to take it off of the load balancer?

like image 442
Monzingo Avatar asked Sep 30 '16 15:09

Monzingo


People also ask

Can we assign Elastic IP to NLB?

Note: After a Network Load Balance is created, you can't change its subnets and Elastic IP addresses. However, you can use subnets for other Availability Zones to deploy additional NLB nodes with either AWS-assigned or Elastic IP addresses.

Can't connect to Elastic IP?

Short description. If you can't connect to an Amazon EC2 instance or an elastic network interface that has an attached Elastic IP address, be sure that: Security group rules for inbound traffic allow connection to the port or protocol.

How do you allocate an elastic IP address?

To allocate an Elastic IP addressOpen the Amazon EC2 console at https://console.aws.amazon.com/ec2/ . In the navigation pane, choose Network & Security, Elastic IPs. Choose Allocate Elastic IP address.


Video Answer


2 Answers

Check if the network interface already has an EIP association. When you try to associate an EIP to a network interface with an association already, the error "You do not have permission to access the specified resource." is thrown.

like image 159
Anush Arvind Avatar answered Oct 07 '22 00:10

Anush Arvind


You can't assign Elastic IP to LB Network Interfaces. The right way is to use Route 53 point your CNAME or alias to your Load Balancer DNS.

That's it.

See this thread https://www.reddit.com/r/aws/comments/5sm1ni/attaching_elastic_ip_to_load_balancer/

like image 24
Trying to help you Avatar answered Oct 06 '22 23:10

Trying to help you