No, you cannot change the instance type of a running EC2 instance. You must first stop the instance, then change the instance type, and finally start the instance again. This process causes downtime and changes the public IP (unless using an Elastic IP).
Resizing an EC2 instance (changing its type) is a common operational task when a workload grows or shrinks. However, it requires the instance to be in a stopped state. The process is straightforward but does involve a brief downtime window. For zero-downtime resizing in production, you typically launch a new instance of the desired type and swap it behind a load balancer.
Downtime is required — the instance must be stopped, which interrupts all running services
Public IP changes — unless you have an Elastic IP attached, the public IPv4 address will change after the restart
Instance store data is LOST — if the current instance has instance store volumes, all data on them is wiped on stop
EBS volumes are preserved — all EBS-backed volumes remain intact and reattach after the type change
Virtualization compatibility — some older instance types use HVM while newer ones use Nitro. Most modern instance types are compatible.
CPU architecture compatibility — you cannot switch from an x86 instance type (e.g., m5) to an ARM/Graviton instance type (e.g., m6g) without reinstalling or recompiling your application binaries
License implications — Windows instances with BYOL (Bring Your Own License) may have licensing tied to physical host characteristics
Launch a new EC2 instance of the desired type using the same AMI
Configure the new instance (install app, set environment variables)
Register the new instance with the Application Load Balancer (ALB) target group
Gradually shift traffic using weighted target groups or connection draining
Deregister and terminate the old instance once all connections have drained
This approach is fully automated with Auto Scaling Groups and Launch Templates