title: AWS secretsmanager error, unable to list the secrets with particular prefix
body: <p>I have added some secrets from an EC2 server to the AWS SM using the instance profile with the prefix <code>mysecrets*</code>. Now I'm trying to list the secrets that are created in the account, but I get the:</p>
  
  <blockquote>
    <p>error user is not authorize to perform ListSecrets operation</p>
  </blockquote>
  
  <p>The IAM policy allowed the action to <code>secretsmanager:ListSecrets</code> and the arn is <code>arn:aws:secretsmanger:region:accntid:secret:mysecrets*</code>.</p>
  
  <p>The command that I run:</p>
  
  <pre class="lang-sh prettyprint-override"><code>aws secretsmanager list-secrets --region us-east-1
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p>An error occurred (AccessDeniedException) when calling the ListSecrets operation: User: arn:aws:sts::xxxxxx:assumed-role/ec2-xxxx-dev-s3-role/xxxxx is not authorized to perform: secretsmanager:ListSecrets</p>
  </blockquote>