Ad space (banner)
AD

Got the fundamentals? A structured AWS course is a fast way to level up.

Find AWS courses on Udemy

Affiliate link. Costs you nothing extra.

☁️AWS Lessons
Lesson 26 / 41

Stopping an Instance with aws ec2 stop-instances

When you want to pause a server without destroying it, use aws ec2 stop-instances. It stops the instance, and compute charges stop with it.

The syntax is aws ec2 stop-instances --instance-ids id.

Running it returns the instance's current and previous state, showing the transition from running to stopping.

A common stumble is expecting all charges to stop. Compute charges do, but attached storage keeps costing while the instance exists.

In real work, development and test servers are stopped outside business hours, which cuts their cost substantially.

AWS
Try it (type this into the pseudo terminal)
aws ec2 stop-instances --instance-ids i-0123456789abcdef0

🧑‍💻 You can type this command into the AWS pseudo terminal to try it yourself (this page itself has no interactive terminal).

Ad space (banner)
Ad space (in-article)