跳至內容

AuthFailure when trying to assign ElasticIP

0

Hello,

I am trying to assign Elastic IP to a Network loadbalancer, but it always ends with AuthFailure :

$ aws ec2 associate-address --allocation-id "eipalloc-067f4b180718a6197" --network-interface-id "eni-0203fa6d581db8869" --region "eu-central-1"

An error occurred (AuthFailure) when calling the AssociateAddress operation: You do not have permission to access the specified resource.

Can you help please? I tried to add this below to my user and aws-elasticbeanstalk-ec2-role, but without any result

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "ec2:AssociateAddress", "ec2:DescribeNetworkInterfaces", "ec2:DescribeSubnets", "ec2:AllocateAddress", "ec2:DescribeAddresses" ], "Resource": "*" } ] }

Thanks for help

已提問 1 年前檢視次數 160 次
1 個回答
1
已接受的答案

The reason you can't associate an elastic IP with an existing NLB's ENI is because you can only specify the IP address attributes when you create the NLB or when you're telling the NLB to attach to a new subnet with a new ENI.

After each ENI of the NLB is created, it's owned by the AWS account where the Elastic Load Balancing team runs the load balancing infrastructure, and your account won't have the permission to modify their ENIs directly. You have to make modifications through the APIs of the Elastic Load Balancing v2 service, which only allows specifying the EIPs in the situations I mentioned.

The procedure for associating EIPs with your NLB is explained in more detail in this support article: https://repost.aws/knowledge-center/elb-attach-elastic-ip-to-public-nlb

In short, you'll need to recreate your NLB and specify the elastic IPs at creation time.

專家
已回答 1 年前
專家
已審閱 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。