Elastic IP basics

Topic: Cloud aws core

Summary

Elastic IP is a static public IP you attach to an EC2 instance. Survives stop and start. You are charged if allocated but not attached. Use when you need a fixed public IP.

Intent: How-to

Quick answer

  • Allocate Elastic IP in VPC. Associate with instance. Instance keeps IP across stop and start.
  • Release when not needed to avoid charge. Billed when allocated but unassociated.
  • Use for bastions or NAT. Prefer load balancer or DNS for user-facing apps.

Prerequisites

Steps

  1. Allocate and associate

    Allocate address in EC2. Associate with instance. Verify public IP.

  2. Release

    Disassociate then release when not needed. Stops billing for that IP.

  3. Best practices

    Do not leave unassociated IPs. Use for bastion or NAT; ALB and DNS for apps.

Summary

Allocate and associate Elastic IP. Release when not needed. Use for bastion or NAT.

Prerequisites

Steps

Step 1: Allocate and associate

Allocate in EC2. Associate with instance. Verify.

Step 2: Release

Disassociate and release to stop billing.

Step 3: Best practices

No unassociated IPs. Bastion or NAT use; ALB for apps.

Verification

  • Instance has Elastic IP; survives stop/start; released when done.

Troubleshooting

Charge — Release unassociated IPs. Wrong IP — Check association.

Next steps

Continue to