@@ -592,6 +592,14 @@ List ip address of EC2 Instance(s)
592592 i-806d8f1592e2a2efd 10.178.243.63 54.214.244.90
593593
594594
595+ ### instance-profile
596+
597+
598+
599+ ### instance-profile-role
600+
601+
602+
595603### instance-ssh
596604
597605Establish SSH connection to EC2 Instance(s)
@@ -1059,16 +1067,16 @@ LOCAL_FILTER: grep results
10591067columnise
10601068
10611069
1062- ### function
1063- ad-user-upns
1070+ ### ad-user-upns
1071+
1072+
10641073
1074+ ### ad-user-upns
10651075
1066- ### function
1067- ad-user-upns
10681076
10691077
1070- ### function
1071- ad-user-names
1078+ ### ad-user-names
1079+
10721080
10731081
10741082### ad-users-graph
@@ -1135,29 +1143,29 @@ Usage: ad-app-owners APP [APP]
11351143 LC_ALL=C sort -t$'\t' -b -k 3
11361144
11371145
1138- ### function
1139- connectors
1146+ ### connectors
1147+
11401148Usage: connectors REMOTE_FILTER LOCAL_FILTER
11411149
11421150REMOTE_FILTER: filters on start of machineName
11431151LOCAL_FILTER: grep results
11441152
11451153
1146- ### function
1147- connector-groups
1154+ ### connector-groups
1155+
11481156Usage: connector-groups REMOTE_FILTER LOCAL_FILTER
11491157
11501158REMOTE_FILTER: filters on start of displayName
11511159LOCAL_FILTER: grep results
11521160
11531161
1154- ### function
1155- connector-group-apps
1162+ ### connector-group-apps
1163+
11561164Usage: connector-group-apps CONNECTOR_GROUP [ CONNECTOR_GROUP]
11571165
11581166
1159- ### function
1160- connector-group-members
1167+ ### connector-group-members
1168+
11611169Usage: connector-group-apps CONNECTOR_GROUP [ CONNECTOR_GROUP]
11621170
11631171
@@ -1858,6 +1866,207 @@ Remove an S3 Bucket, and delete all objects if it's not empty.
18581866
18591867
18601868
1869+ ## ssm-commands
1870+
1871+
1872+ ### ssm-instances
1873+
1874+ List Instances known to SSM
1875+
1876+ USAGE: ssm-instances [ filter]
1877+
1878+ $ ssm-instances
1879+ i-00a123b456d789012 Online Amazon Linux 2 192.168.1.10 server001.example.com
1880+ i-01b234c567e890123 Online Microsoft Windows Server 2019 Datacenter 10.0.17763 192.168.1.20 winserver002.example.com
1881+ i-02c345d678f901234 Online Ubuntu 20.04 192.168.1.30 ubuntu003.example.com
1882+ i-03d456e789a012345 Online Ubuntu 20.04 192.168.1.40 ubuntu004.example.com
1883+ i-04e567f89b1234567 Online Amazon Linux 2 192.168.1.50 server005.example.com
1884+ * Optionally provide a filter string for a ` | grep ` effect with tighter columisation:*
1885+
1886+ $ ssm-instances Windows
1887+ i-00a123b456d789012 Online Microsoft Windows Server 2019 Datacenter 68.0.11111 192.168.1.10 server001.example.com
1888+ i-01b234c567e890123 Online Microsoft Windows Server 2022 Datacenter 68.0.11112 192.168.1.20 winserver002.example.com
1889+
1890+
1891+ ### ssm-send-command
1892+
1893+ Run a command locally on EC2 instance(s) running Linux
1894+
1895+ USAGE: ssm-send-command COMMAND instance-id [instance-id]
1896+
1897+ $ ssm-send-command 'date +%F' i-0fict1234abcd
1898+ Command ID: 12345abc-de67-f890-gh12-34ij56kl789m
1899+ Waiting for command to complete...
1900+ i-0fict1234abcd 2023-12-01
1901+
1902+ $ ssm-instances | grep Linux | ssm-send-command 'date +%F'
1903+ Command ID: 98b7c6d2-e3f4-11ac-8d20-47a56db09c8f
1904+ Waiting for command to complete...
1905+ i-0fake1234a567bcd 2023-12-01
1906+ i-0fake2345b678cde 2023-12-01
1907+ i-0fake3456c789def 2023-11-30
1908+ i-0fake4567d890efa 2023-11-30
1909+ i-0fake5678e901fgh 2023-12-01
1910+ i-0fake6789f012ghi 2023-12-01
1911+
1912+ See also: ssm-send-command-windows
1913+ Escape double quotes in command
1914+ Send command
1915+
1916+
1917+ ### ssm-send-command-windows
1918+
1919+ Run a command locally on EC2 instance(s) running Windows
1920+
1921+ USAGE: ssm-send-command-windows COMMAND instance-id [instance-id]
1922+
1923+ $ ssm-send-command 'Get-Hotfix' i-0fict1234abcd
1924+ Command ID: 12345abc-de67-f890-gh12-34ij56kl789m
1925+ Waiting for command to complete...
1926+ i-0fict1234abcd 2023-12-01
1927+
1928+ $ ssm-instances Windows | ssm-send-command-windows Get-Hotfix
1929+ Command ID: a0eeeddc-2edf-42bc-b0c7-122f5bc50956
1930+ Waiting for command to complete...
1931+ i-0fake1234abcd
1932+ Source Description HotFixID InstalledBy InstalledOn
1933+ ------ ----------- -------- ----------- -----------
1934+ FAKEAPP01234 Update KB1234567 NT AUTHORITY\SYSTEM 10/11/2023 12:00:00 AM
1935+ FAKEAPP01234 Update KB8901234 NT AUTHORITY\SYSTEM 12/12/2018 12:00:00 AM
1936+ FAKEAPP01234 Security Update KB5678901 NT AUTHORITY\SYSTEM 12/12/2018 12:00:00 AM
1937+ FAKEAPP01234 Update KB2345678 NT AUTHORITY\SYSTEM 1/9/2019 12:00:00 AM
1938+ FAKEAPP01234 Update KB3456789 NT AUTHORITY\SYSTEM 3/11/2021 12:00:00 AM
1939+ FAKEAPP01234 Security Update KB4567890 NT AUTHORITY\SYSTEM 4/21/2019 12:00:00 AM
1940+ FAKEAPP01234 Security Update KB5678901 NT AUTHORITY\SYSTEM 5/15/2019 12:00:00 AM
1941+ FAKEAPP01234 Security Update KB6789012 NT AUTHORITY\SYSTEM 6/12/2019 12:00:00 AM
1942+ ---Output truncated---
1943+ i-0fake1234abcd
1944+ Source Description HotFixID InstalledBy InstalledOn
1945+ ------ ----------- -------- ----------- -----------
1946+ FAKEAPP01234 Update KB1234567 NT AUTHORITY\SYSTEM 10/11/2023 12:00:00 AM
1947+ FAKEAPP01234 Update KB8901234 NT AUTHORITY\SYSTEM 12/12/2018 12:00:00 AM
1948+ FAKEAPP01234 Security Update KB5678901 NT AUTHORITY\SYSTEM 12/12/2018 12:00:00 AM
1949+
1950+ See also: ssm-send-command-windows
1951+
1952+
1953+ ### ssm-automation-executions
1954+
1955+ List recent SSM Automation Executions
1956+ USAGE: ssm-automation-executions [ filter]
1957+
1958+ $ ssm-automation-executions
1959+ 1234abcd-ef56-7890-gh12-ijk3456lmnop UpdateAndSecureNodes None Failed 2023-07-20T09:00:00.000000+00:00 None
1960+ 5678efgh-ijkl-9012-mnop-qrstuvwx3456 UpdateAndSecureNodes i-0a1b2c3d4e5f67890 Failed 2023-07-20T09:00:10.000000+00:00 None
1961+ 90abijkl-mnop-4567-qrst-uvwxyza12345 UpdateAndSecureNodes i-1b2c3d4e5f6g78901 Failed 2023-07-20T09:00:20.000000+00:00 None
1962+ cdefmnop-qrst-8910-uvwx-yzab1234cdef UpdateAndSecureNodes i-2c3d4e5f6g7h89012 Failed 2023-07-20T09:00:30.000000+00:00 None
1963+ ghijqrst-uvwx-2345-yzab-abcd5678efgh UpdateAndSecureNodes i-3d4e5f6g7h8i90123 Failed 2023-07-20T09:00:40.000000+00:00 None
1964+
1965+
1966+ ### ssm-automation-execution
1967+
1968+ Show details for an SSM Automation Execution
1969+
1970+ USAGE: ssm-automation-execution execution_id [execution_id]
1971+
1972+ $ ssm-automation-executions | head | ssm-automation-execution
1973+ 1234abcd-5678-9def-ghij-klmnopqrstuv DeployNewFeatures i-01234a5b6c7d8e9f0 Failed 2023-09-10T10:10:10.000000+00:00 2023-09-10T10:10:20.000000+00:00
1974+ 9876fedc-ba98-7654-c321-onmlkjihgfed DeployNewFeatures i-09876b5c4d3e2f1g0 Failed 2023-09-10T10:20:30.000000+00:00 2023-09-10T10:20:40.000000+00:00
1975+ abcd1234-efgh-5678-ijkl-9mnopq7rstuv DeployNewFeatures i-0a1b2c3d4e5f6g7h8 Failed 2023-09-10T10:30:50.000000+00:00 2023-09-10T10:31:00.000000+00:00
1976+ ijkl8765-ghij-4321-klmn-5opq4rstu3vw DeployNewFeatures i-0i8j7k6l5m4n3o2p1 Failed 2023-09-10T10:40:10.000000+00:00 2023-09-10T10:40:20.000000+00:00
1977+
1978+
1979+ ### ssm-associations
1980+
1981+ List SSM associations
1982+
1983+ USAGE: ssm-associations [filter]
1984+
1985+ $ ssm-associations
1986+ Task-RunSecurityScan cron(30 2 * * SUN) 2023-01-15T02:30:00.000000+00:00 Failed
1987+ Task-UpdateSystemPackages cron(0 4 * * SAT) 2023-04-22T04:00:00.000000+00:00 Success
1988+ Service-ConfigureNetworkSettings rate(7 days) 2023-05-07T11:00:00.000000+00:00 Success
1989+ Script-DeployMonitoringTools cron(15 3 * * FRI) 2023-03-03T03:15:00.000000+00:00 Failed
1990+
1991+
1992+ ### ssm-association-executions
1993+
1994+ List SSM Association Executions
1995+
1996+ USAGE: ssm-associations [filter]
1997+
1998+ $ ssm-associations
1999+ 12345678-9abc-def0-1234-56789abcdef0 a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890 Success {Success=10} 2023-07-21T10:30:00.000000+00:00
2000+ 12345678-9abc-def0-1234-56789abcdef0 b1c2d3e4-f5g6-7890-b1c2-d3e4f5g67890 Success {Success=15} 2023-07-22T11:00:00.000000+00:00
2001+ 12345678-9abc-def0-1234-56789abcdef0 c1d2e3f4-g5h6-7890-c1d2-e3f4g5h67890 Success {Success=13} 2023-07-23T09:45:00.000000+00:00
2002+ 12345678-9abc-def0-1234-56789abcdef0 d1e2f3g4-h5i6-7890-d1e2-f3g4h5i67890 Failed {Failed=2, Success=12} 2023-07-24T12:30:00.000000+00:00
2003+ 12345678-9abc-def0-1234-56789abcdef0 e1f2g3h4-i5j6-7890-e1f2-g3h4i5j67890 Failed {Failed=3, Success=11} 2023-07-25T14:15:00.000000+00:00
2004+
2005+
2006+ ### ssm-association-execution-targets
2007+
2008+ List targets for SSM Association Execution
2009+
2010+ USAGE: ssm-association-execution-targets association-id execution-id
2011+
2012+ $ association-execution-targets abcd1234-ef56-7890-gh12-ijk3456lmnop 12345678-90ab-cdef-1234-567890abcdef
2013+ abcd1234-ef56-7890-gh12-ijk3456lmnop 12345678-90ab-cdef-1234-567890abcdef i-01234abcde56789f0 Success Success 2023-08-10T11:30:00.000000+00:00
2014+ abcd1234-ef56-7890-gh12-ijk3456lmnop 12345678-90ab-cdef-1234-567890abcdef i-02345bcdef67891g1 Success Success 2023-08-10T11:30:10.000000+00:00
2015+ abcd1234-ef56-7890-gh12-ijk3456lmnop 12345678-90ab-cdef-1234-567890abcdef i-03456cdefg78912h2 Success Success 2023-08-10T11:30:20.000000+00:00
2016+ abcd1234-ef56-7890-gh12-ijk3456lmnop 12345678-90ab-cdef-1234-567890abcdef i-04567defgh89123i3 Success Success 2023-08-10T11:30:30.000000+00:00
2017+
2018+ Note: Can't use skim-stdin as it requires to arguments
2019+
2020+
2021+ ### ssm-parameters
2022+
2023+ List SSM Parameters
2024+
2025+ USAGE: ssm-parameters [ filter]
2026+
2027+ $ ssm-parameters
2028+ /company/ad/a1234567/username
2029+ /ami/Ubuntu-20.04-proxy
2030+ /cloudwatch-agent/config/general
2031+ /cnf/staticSite/B1P2V34SR5KF0Z/encryptionKeyArn
2032+ /ops/CloudMetrics/linux
2033+ /ops/CloudMetrics/windows
2034+
2035+
2036+ ### ssm-parameter-value
2037+
2038+ Print SSM Parameter Value
2039+
2040+ USAGE: ssm-parameter-value ssm-parameter [ ssm-parameter]
2041+
2042+ $ ssm-parameters | ssm-parameter-value
2043+ /ops/Monitoring/metrics/unix
2044+ {
2045+ "agent": {
2046+ "metrics_collection_interval": 60,
2047+ "logfile": "/var/log/aws-monitoring/aws-monitoring-agent.log"
2048+ },
2049+ "logs": {
2050+ "logs_collected": {
2051+ "files": {
2052+ <snip >
2053+
2054+
2055+ ### instance-ssm-platform-type
2056+
2057+ Show platform type (OS) for instance
2058+
2059+ USAGE: instance-ssm-platform-type instance-id [instance-id]
2060+
2061+ $ instances | instance-ssm-platform-type
2062+ i-0c1d2e3f4a567890b None
2063+ i-0d1c2b3a4e5f6789c Linux
2064+ i-0e1f2d3c4b5a6789d Linux
2065+ i-0f1e2d3c4b5a6789e None
2066+ i-0a9f8e7d6c5b4a312 None
2067+ i-01b2a3c4d5e6f7893 Windows
2068+
2069+
18612070## sts-commands
18622071
18632072
0 commit comments