AWS Cant assign Elastic IP to Network Interface
Asked Answered
C

4

14

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?

Cauldron answered 30/9, 2016 at 15:31 Comment(0)
S
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.

Snitch answered 22/9, 2017 at 5:33 Comment(0)
G
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/

Grandiloquence answered 6/6, 2018 at 20:38 Comment(1)
aws.amazon.com/premiumsupport/knowledge-center/… suggests it is possibleSmokeproof
M
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.

Marabout answered 30/9, 2016 at 15:34 Comment(4)
And how are you doing that exactly? Via the Elastic IP page in the web console?Marabout
If you are actually logged in with the root account for that AWS account then you shouldn't be getting that error.Marabout
how can i verify i am root user?Cauldron
You said you are the account owner. You should know what logins you have configured for your account.Marabout
B
0

I had the same error, it said "Elastic IP address x.x.x.x: You do not have permission to access the specified resource"

The thing is that you need to associate the Elastic IP while creating the Network Load Balancer, you can't do it afterwards. For reference you can check this guide or this post

Hope this may help someone

Bragdon answered 2/8 at 22:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.