What is the purpose of an Elastic IP and what is the downside of leaving them unattached?
BeginnerScenarioVPC and Networking
Answer
Situation read → EIP is a static public IPv4 owned by the account.
What I'd do →
- Allocate:
aws ec2 allocate-address --domain vpc - Associate with an instance or NAT gateway
- List unassociated:
aws ec2 describe-addresses --query 'Addresses[?AssociationId==null]' - Release those you do not need
Why → Public IPv4 addresses are billed hourly whether or not attached.
Interview tip → Prefer DNS and load balancers over EIPs for services.
More on VPC and Networking
What is a VPC and what are the CIDR constraints?BeginnerWhat makes a subnet public or private?BeginnerHow do route tables work, including the local route and longest-prefix match?IntermediateInternet Gateway vs NAT Gateway: what does each do?BeginnerNAT Gateway vs NAT instance?IntermediateSecurity group vs network ACL: compare them.Beginner