BlogWikiAbout

Kyle Pericak

"It works in my environment"

Create & Terminate EC2 Instances from Python

Create & Terminate EC2 Instances from Python

Created: 2020-01-09, Modified: 2020-01-09

Launch and terminate EC2 instances from Python using boto3, with a working example covering Ubuntu AMIs, security groups, tags, and wait_until_running.

Blog code last updated on 2026-05-23: 69fb0a25ee445afedbd0b2098cfb9334ed7b38fb