Run commands on EC2 instances via AWS Systems Manager

Starting promptUse this prompt as a starting point to build your workflow.

Build a workflow triggered with target instance IDs (or a tag filter) and the command to run. Invoke SSM SendCommand, poll the invocation until complete, and collect stdout/stderr per instance. Handle instances not managed by SSM, command timeouts, and partial failures, and require approval for sensitive commands. Output the per-instance command results.

New to Tines?Sign up free for Tines 3B Explore Edition

What this prompt builds

Execute a command on EC2 instances through SSM Run Command and capture the output.

The problem

Running commands across EC2 fleets means SSHing into boxes or building bespoke tooling, which is slow and inconsistent and leaves no record. Ad-hoc access also widens risk.

Solution and impact

This workflow uses AWS Systems Manager Run Command to execute a command on target instances and returns the output to the workflow. Remote operations become agentless, auditable, and repeatable.

Run commands on EC2 instances via AWS Systems Manager | Tines 3B examples | Tines