zabuqasem/SSM Run Command

Execute commands on AWS EC2 instances via SSM — no SSH required. Supports OIDC, multi-line commands, and static credentials.

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
aws-access-key-idAWS IAM access key ID. Not required when using OIDC.no
aws-secret-access-keyAWS IAM secret access key. Not required when using OIDC.no
aws-session-tokenAWS session token for temporary STS credentials. Not required when using OIDC or long-lived keys.no
aws-regionAWS region where your EC2 instance lives (e.g. us-east-1).yes
instance-idsOne or more EC2 instance IDs (max 50), newline-separated. Mutually exclusive with 'targets'; exactly one must be provided.no
targetsTargets to run the command on, in AWS CLI format (max 5 lines, newline-separated). Each line: Key=<key>,Values=<v1>[,<v2>...] Valid keys: InstanceIds, tag:<name>, resource-groups:Name, resource-groups:ResourceTypeFilters. Example: Key=tag:env,Values=prod Mutually exclusive with 'instance-ids'; exactly one must be provided. no
document-nameSSM document to execute. Defaults to AWS-RunShellScript (bash). Use AWS-RunPowerShellScript for Windows targets, or provide a custom document name or document ARN. The document must accept 'commands' and 'workingDirectory' parameters. noAWS-RunShellScript
commandBash command(s) to execute. Each non-empty line runs as a separate SSM command sequentially.noecho $(date) >> logs.txt
working-directoryAbsolute path on the instance where commands will execute.no/home/ubuntu
commentComment attached to the SSM Run Command entry (max 100 chars).noExecuted by Github Actions
wait-for-outputIf true, wait for the command to finish and log stdout/stderr per instance. Sets the 'output' action output.nofalse
wait-timeoutMaximum seconds to wait when wait-for-output is true (1-3600). Defaults to 60.no60
namedescription
command-idThe SSM Run Command UUID. Use with aws ssm get-command-invocation to check execution status.
outputCombined stdout from all targeted instances. Only set when wait-for-output is true. SSM truncates per-invocation output at 24 000 bytes.