title: How to terminate multiple EC2 instances in AWS via CLI?
body: <p>I'm looking for terminating multiple <code>EC2</code> instances via <code>AWS</code> <code>CLI</code>. Yes, can able to terminate an EC2 instance by executing the below command.</p>
  <p><strong>Syntax</strong>:
  <code>aws ec2 terminate-instances --instance-ids &lt;intance id&gt; --profile &lt;profile name&gt;</code></p>
  <p><strong>Example</strong>:
  <code>aws ec2 terminate-instances --instance-ids &lt;i-...&gt; --profile xxx</code></p>
  <p>But I have a big list of instances that I need to terminate so I'm searching for a solution to terminating a batch of EC2 instances by providing the list of instance ids. I tried with multiple instance ids as below but those not working.</p>
  <ul>
  <li><code>aws ec2 terminate-instances --instance-ids (&quot;instance-id1&quot;, &quot;intance-id2&quot;) --profile xxx</code></li>
  <li><code>aws ec2 terminate-instances --instance-ids (&quot;instance-id1intance-id2&quot;) --profile xxx</code></li>
  <li><code>aws ec2 terminate-instances --instance-ids (instance-id1,intance-id2) --profile xxx</code></li>
  </ul>
  <p>Kindly let me know if there is any possibility to terminate a batch of instances.</p>