title: Run aws cli looping over names from a text file - parameter store
body: <p>I'm trying to run an awscli command for multiple resources as a loop in a bash script.</p>
  <p>For example:</p>
  <pre><code>aws ssm get-parameters --name &quot;NAME1&quot;, &quot;NAME2&quot;, &quot;NAME3&quot;
  </code></pre>
  <p>I've added all the parameter names into a text file. How do I run the CLI command against each name in the file?</p>
  <p>Here is my script:</p>
  <pre><code>AWS_PARAM=&quot;aws ssm get-parameters --name&quot; $FILE
  FILE=&quot;parameters.txt&quot;
  
  for list in $FILE; do
   $AWS_PARAM $list
  done
  </code></pre>
  <p>The expected output should run the CLI on all the names in the file.
  I know the CLI is expecting the &quot;name&quot; of the parameter store. I'm hoping someone can help with looping the names from the list and running the CLI.</p>
  <p>Thank you!</p>