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-10: 2643ad795e21d296b577516823e6878dab2fb1e2