title: Users Get Access Key and Secret Key Stored to Secrets Manager in Cloud Formation
body: <pre><code>{
      &quot;AWSTemplateFormatVersion&quot;: &quot;2010-09-09&quot;,
      &quot;Description&quot;: &quot;Installing CloudAuth Application in Ubuntu 18.04 LTS&quot;,
      &quot;Parameters&quot;: {
          &quot;secretname&quot;: {
              &quot;Type&quot;: &quot;String&quot;,
              &quot;Description&quot;: &quot;A descriptive name that helps you find your secret later&quot;
          },
          &quot;myuser&quot;: {
              &quot;Type&quot;: &quot;String&quot;,
              &quot;Description&quot;: &quot;Enter existing user name&quot;
          }
      },
      &quot;Resources&quot;: {
          &quot;myaccesskey&quot;: {
              &quot;Type&quot;: &quot;AWS::IAM::AccessKey&quot;,
              &quot;Properties&quot;: {
                  &quot;UserName&quot;: {
                      &quot;Ref&quot;: &quot;myuser&quot;
                  }
              }
          },
          &quot;mysecrets&quot;: {
              &quot;Type&quot;: &quot;AWS::SecretsManager::Secret&quot;,
              &quot;Properties&quot;: {
                  &quot;Name&quot;: {
                      &quot;Ref&quot;: &quot;secretname&quot;
                  },
                  &quot;SecretString&quot;: &quot;{\&quot;Access_Key\&quot;:\&quot;${myaccesskey}\&quot;,\&quot;Secret_Key\&quot;:\&quot;${myaccesskey.SecretAccessKey}\&quot;}&quot;
              }
          }
      }
  }
  </code></pre>