Why do I receive a “No Instances in Tag" message from my Systems Manager maintenance window?

2 minute read

I created a maintenance window that runs an AWS Systems Manager Run Command targeting Amazon Elastic Compute Cloud (Amazon EC2) instance tags. When the command runs, I receive a "No Instances in Tag" message.

Short description

When you run a maintenance window targeting instances that use Amazon EC2 instance tags, the instance IDs for managed instances resolve when the command runs. The instance ID won't resolve as a target if the instance isn't reporting to Systems Manager as Online. When a maintenance window can't resolve instance ID targets, you receive the "No Instances in Tag" message.

The "No Instances in Tag" message also appears when the EC2 resource tag and the tag registered as a maintenance window target are mismatched. Systems Manager uses a string match method to resolve targets to tags. As a result, the tags are case-sensitive and character-sensitive. Any extra spaces entered into either the EC2 resource tag or the maintenance window target tag result in a "No Instance in Tag" message.


To troubleshoot an instance that isn't reporting as Online, see Why is my EC2 instance not displaying as a managed node or showing a "Connection lost" status in Systems Manager?

To identify a mismatched tag, use AWS CloudTrail to help isolate the exact value that is passed by the maintenance window.

  1. Open the CloudTrail console, and then choose Event history to view events in the Region where you created the maintenance window.
  2. Change the search dropdown filter to Event name. For Enter an event name, enter SendCommand to view all Run Command API events. It's a best practice to set the time filter to the time that the maintenance window ran.
  3. Choose the hyperlinked Event name to view the API call in JSON format.
  4. Navigate to the "targets" section of the API call to view the exact tag values passed from the maintenance window. Then, compare the API call tag value to the EC2 instance tag assigned to your instance.
  5. Update the maintenance window targets or the EC2 instance tag so that both values match exactly.

Related information

Viewing CloudTrail events in the CloudTrail console

Troubleshooting Amazon EC2 managed node availability

Why do I receive a “No Invocations to Execute" message from my Systems Manager maintenance window?

AWS OFFICIALUpdated 3 years ago