EC2 Advanced Networking & Features
Overview

EC2 Advanced Networking & Features

May 28, 2026
5 min read

Private vs. Public vs. Elastic IP

Understanding IP addressing behaviour is critical for the exam, especially regarding instance lifecycle events (Stop/Start).

Private

  • Definition: The internal IP address used for communication within the VPC.
  • Persistence: Retained for the life of the instance. If you Stop and Start the instance, the Private IP does not change.
  • Scope: Only reachable within the VPC or via VPN/Direct Connect (unless NAT is used).

Public

  • Definition: An IP address reachable from the internet.
  • Behaviour:
    • Assigned automatically if Auto-assign Public IP is enabled in the subnet settings or requested at launch.
    • Dynamic: If you Stop and Start the instance, the Public IP will change.
    • Hostname: Cannot be manually moved between instances.

Elastic IP (EIP)

  • Definition: A static, fixed Public IP address allocated to your AWS account.
  • Use Case: Masking instance failures by rapidly remapping the address to another instance.
  • Behaviour:
    • You own it until you release it.
    • Static: It does not change if you stop/start the instance.
    • Scope: Region-specific (cannot move an EIP from us-east-1 to us-west-2).
  • Cost:
    • Free if attached to a running instance and it is the only EIP attached.
    • Charges apply if: The instance is stopped, the EIP is unattached, or you have more than one EIP attached to a running instance.

EC2 Placement Groups

Placement groups determine how instances are placed on underlying hardware to optimize for performance, durability, or availability.

TypeDescriptionUse CaseConstraint
ClusterInstances are packed close together inside a single Availability Zone.
Provides low latency and high network throughput (10Gbps+).
High Performance Computing (HPC),
tightly coupled applications,
supercomputing
Single AZ only.
High risk of concurrent failure if the rack fails.
SpreadInstances are placed on distinct underlying hardware (different racks).
Maximizes availability.
Critical applications where individual instances must be isolated from each other’s hardware failure.Max 7 instances per AZ per placement group.
PartitionInstances are spread across logical partitions (groups of racks).
Instances in one partition do not share hardware with instances in other partitions.
Distributed & Big Data workloads: Hadoop, Cassandra, KafkaCan span multiple AZs.
Scales to 100s of instances.
Important (Exam Tip)

Match the keyword to the group: “low latency” / “HPC”Cluster, “critical” / “isolated from failure”Spread, “Hadoop / Cassandra / Kafka”Partition.

Elastic Network Interfaces (ENI) - Overview

An ENI is a logical networking component in a VPC that represents a virtual network card.

  • Scope: Bound to a specific Availability Zone (AZ). You cannot attach an ENI created in AZ A to an instance in AZ B.
  • Attributes: An ENI can have:
    • A primary private IPv4 address.
    • One or more secondary private IPv4 addresses.
    • One Elastic IP address (per private IPv4).
    • One public IPv4 address.
    • One or more security Groups
    • A MAC address.

Types of ENI Attachment

TypeInterfaceBehaviour
Primary ENIeth0Created automatically when the instance is launched. Cannot be detached from the instance.
Secondary ENIeth1+Can be created independently and attached/detached on the fly between instances.

ENI - Extra Reading

  • Failover Scenarios: You can build a low cost failover solution with a secondary ENI that holds a private IP and an Elastic IP. If the primary instance fails, move the ENI to a standby instance and traffic follows it.
  • Dual Homing: You might attach two ENIs to one instance:
    • ENI 1: Connected to a management subnet (for SSH/RDP access).
    • ENI 2: Connected to a data subnet (for application traffic).
  • Security Groups: Security Groups are attached to the ENI, not the instance itself. Different ENIs on the same instance can therefore have different security group rules.

EC2 Hibernate

EC2 Hibernate lets you pause an instance and resume it later while preserving the state of the RAM.

How it works: the contents of the RAM are written to the Root EBS Volume. On start, the RAM is reloaded from that disk, so the OS is never actually booted from scratch.

Benefits:

  • Much faster boot time than a full Stop/Start.
  • Applications do not need to “warm up” or reload their caches.

Requirements

RequirementDetail
EncryptionThe Root EBS Volume must be encrypted.
EnablementMust be enabled at launch — you cannot turn it on for an existing running instance.
Volume sizeThe root volume needs enough free space to hold the RAM contents.
UnsupportedBare metal instances and instances backed by Instance Store.

Lifecycle & Limits

AttributeOn Hibernate
Instance IDRetained
Private IPRetained
Elastic IPRetained
Public IP (standard)Lost (same as a normal Stop/Start)
Important (Exam Tip)

An instance cannot stay in hibernation for more than 60 days.
If a question wants a long running instance to resume with a warm cache or in-memory state intact, Hibernate is the answer — but only if the root volume is encrypted and Hibernate was enabled at launch.