title: Requesting 2 secrets from AWS Secrets Manager in One API Call with JavaScript
body: <p><strong>Background</strong></p>
  
  <p>I am using AWS Secrets Manager to store a few different passwords and secret values in AWS. The first entry is specifically for AWS RDS information. </p>
  
  <p>To enter arbitrary secret data in Secrets Manager you must select a different entry than RDS. </p>
  
  <p><a href="https://i.stack.imgur.com/mHMsS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mHMsS.png" alt="enter image description here"></a></p>
  
  <p>I did this and then created a few key value pairs to be stored. Now that I have done this I have 2 sets of SecretIds. The SecretIds is what is used to return the correct secret from Secrets Manager. I have 2 different SecretIds and need to return 2 different sets of secrets. I am hoping I can do this without having to make 2 separate API calls.  </p>
  
  <p><strong>Example</strong></p>
  
  <p>Originally this was the secretId for returning the RDS username and password. </p>
  
  <pre><code>const secretRds = 'some/thing/something';
  </code></pre>
  
  <p>I was able to return this data like this, </p>
  
  <pre><code>client.getSecretValue({ SecretId: secretRds }, {...}
  </code></pre>
  
  <p><strong>Question</strong></p>
  
  <p>Now that I have a second secretId I have 2 sets that look like this, </p>
  
  <pre><code>const secretRds = 'some/thing/something';
  const secretConfigs = 'some/thing/sopmethingElse';
  </code></pre>
  
  <p>Since the original secretId was passed into the <code>SecretId</code> key as the value in the <code>getSecretValue</code> params, how do I pass a second <code>secretId</code> in?</p>
  
  <p>Looking at the documentation <a href="https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/SecretsManager.html" rel="nofollow noreferrer">here</a>, I can not seem to find anything explaining this.</p>
  
  <p>Something like this is what I am trying to accomplish,</p>
  
  <p><em>Obviously this wont work because the key is named twice.
   I need to understand how to pass 2 secretIds in to the same secretId.</em></p>
  
  <pre><code>const secretRds = 'some/thing/something';
  const secretConfigs = 'some/thing/sopmethingElse';
  
  client.getSecretValue({ SecretId: secretRds: SecretId: secretConfigs }, {...}
  </code></pre>