I have given a limited access to a AWS account.
I already created an EC2 instance but when I try to associate an elastic ip, I got the error below:
An error occurred while attempting to associate the address Network vpc-(security id) is not attached to any internet gateway
This error occurs because the VPC is not associated with an Internet Gateway. To solve this: Go to VPC, then click on Internet Gateway. If none exists, Create one(probably will need admin permission) and then attach it to the target VPC-id. And try again associating the Elastic IP address to the EC2 instance.
To tag an Elastic IP address Open the Amazon VPC console at https://console.aws.amazon.com/vpc/ . In the navigation pane, choose Elastic IPs. Select the Elastic IP address and choose Tags. Choose Manage tags, enter the tag keys and values as required, and choose Save.
You are using the new Amazon Virtual Private Cloud instead of the EC2 Classic. The cloud you are using lacks the internet gateway virtual component that is necessary for the cloud to be reachable from the public internet.
You need to add an internet gateway to your private cloud for it to be able to connect to internet; with that in place, you can use Elastic IPs (after all, they are internet addressable; your VPC instances can have static instance IPs), and add a routing entry for internet addresses (0.0.0.0/0, or a narrower space).
This error occurs because the VPC is not associated with an Internet Gateway. To solve this: Go to VPC, then click on Internet Gateway. If none exists, Create one(probably will need admin permission) and then attach it to the target VPC-id. And try again associating the Elastic IP address to the EC2 instance. Hope it helps :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With