13

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?

Yashwardhan Pauranik
  • 5,370
  • 5
  • 42
  • 65
Monzingo
  • 391
  • 1
  • 7
  • 17

3 Answers3

8

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.

Anush Arvind
  • 386
  • 3
  • 6
6

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/

  • 1
    https://aws.amazon.com/premiumsupport/knowledge-center/elb-attach-elastic-ip-to-public-nlb/?nc1=h_ls suggests it is possible – toing_toing Feb 22 '21 at 16:09
2

Are you trying to assign the Elastic IP to the instance or the load balancer? You can't assign an Elastic IP to a load balancer. If you assign an Elastic IP to the instance and use that IP to access the server then you will be bypassing the load balancer completely.

Mark B
  • 183,023
  • 24
  • 297
  • 295