wiki/info/landscape/aws-automation.md
... ...
@@ -80,7 +80,58 @@ To reach the SAP instance by a specific URL (e.g. wcsantander2017.sapsailing.com
80 80
81 81
[image2]
82 82
83
-### AWS Command Line Interface
83
+### AWS Command Line Interface (AWS CLI)
84
+
85
+Information about installation and configuration of the AWS CLI can be found here https://aws.amazon.com/de/cli/.
86
+
87
+Example command and response of the AWS CLI to get information about all existing EC2 instances of a region:
88
+
89
+Command: aws --region eu-west-2 ec2 describe-instances
90
+
91
+Response:
92
+<pre>
93
+{
94
+“Reservations”: [
95
+ {
96
+“Instances”: [
97
+ {
98
+“Monitoring”: {
99
+“State”: “disabled”
100
+ },
101
+“PublicDnsName”: “ec2-35-178-117-16.eu-west-2.compute.amazonaws.com”,
102
+“State”: {
103
+“Code”: 16,
104
+“Name”: “running”
105
+ },
106
+“EbsOptimized”: false,
107
+“LaunchTime”: “2018-04-06T04:09:29.000Z”,
108
+“PublicIpAddress”: “35.178.117.16”,
109
+“PrivateIpAddress”: “172.31.38.162”,
110
+“ProductCodes”: [],
111
+“VpcId”: “vpc-e5ba568c”,
112
+“StateTransitionReason”: “”,
113
+“InstanceId”: “i-066952116fe71fa65”,
114
+“ImageId”: “ami-39f3e25d”,
115
+“PrivateDnsName”: “ip-172-31-38-162.eu-west-2.compute.internal”,
116
+“KeyName”: “leonradeck-keypair”,
117
+[...]
118
+</pre>
119
+
120
+##### Filtering
121
+Limit instances that are returned by passing a parameter:
122
+
123
+aws ec2 describe-instances _--instance-ids i-066952116fe71fa65_
124
+
125
+##### Querying
126
+Get value of specific attribute:
127
+
128
+aws ec2 describe-instances --instance-ids i-066952116fe71fa65 _--query ‘Reservations[*].Instances[*].
129
+PublicDnsName’_
130
+
131
+
132
+
133
+
134
+
84 135
85 136
86 137