Automatically tag EC2 instances with OS

I was surprised that a blog post doesn’t already exist (or at least I didn’t find one), so, this post covers how to automatically add a tag to EC2 instances upon creation with OS of the instance. After the below components are deployed, EC2 instances should automatically have either a os:linux or os:windows tag.

  1. First, create a Lambda function with the following code. I called my function autoTagEC2OS. Use Python 3.12:

Continue reading “Automatically tag EC2 instances with OS”

Create a free website or blog at WordPress.com.

Up ↑