CmdID

CmdID / Commands

aws-ssm

Securely interact with and manage AWS resources. tldr-pages

On several platforms

Opens CmdID with your command. It is read in your browser and sent nowhere.

Several platforms

from tldr-pages, CC BY 4.0

Securely interact with and manage AWS resources. Note: Interactive sessions require the Session Manager plugin to be installed.

Run commands on instances

aws ssm send-command --instance-ids instance_id1 instance_id2 ... --document-name "AWS-RunShellScript" --parameters 'commands=["command"]'Identify
--instance-idsThe IDs of the managed nodes where the command should run. AWS CLI reference
--document-nameThe name of the Amazon Web Services Systems Manager document (SSM document) to run. AWS CLI reference
--parametersThe required and optional parameters specified in the document being run. AWS CLI reference

Check command invocations on an instance

aws ssm list-command-invocations --instance-id "instance_id"Identify
--instance-id(Optional) The command execution details for a specific managed node ID. AWS CLI reference

Check command output for a specific command invocation

aws ssm list-command-invocations --command-id "command_id" --detailsIdentify
--command-id(Optional) The invocations for a specific command ID. AWS CLI reference
--details(Optional) If set this returns the response of the command executions and any command output. AWS CLI reference

Start an interactive session with an instance

aws ssm start-session --target "instance_id"Identify
--targetThe managed node to connect to for the session. AWS CLI reference

Start a port forwarding session to a remote host

aws ssm start-session --target "instance_id" --document-name "AWS-StartPortForwardingSessionToRemoteHost" --parameters '{"portNumber":["remote_port"],"localPortNumber":["local_port"]}'Identify
--targetThe managed node to connect to for the session. AWS CLI reference
--document-nameThe name of the SSM document you want to use to define the type of session, input parameters, or preferences for the session. AWS CLI reference
--parametersThe values you want to specify for the parameters defined in the Session document. AWS CLI reference