Interview Prep/AWS/VPC and Networking

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 →

  1. Allocate: aws ec2 allocate-address --domain vpc
  2. Associate with an instance or NAT gateway
  3. List unassociated: aws ec2 describe-addresses --query 'Addresses[?AssociationId==null]'
  4. 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.

aws All AWS questions Roadmap: AWS core services

More on VPC and Networking