title: Unable to get password for the instance created from AMI
body: <p>The following code successfully creates an instance.</p>
  
  <pre><code>try {
          $ec2 = new Ec2Client($options);
          $result = $ec2-&gt;runInstances([
               'ImageId' =&gt; 'ami-xxxxxxxx', // REQUIRED
               'InstanceInitiatedShutdownBehavior' =&gt; 'stop',
               'InstanceType' =&gt; 't1.micro',
               'MaxCount' =&gt; 1, // REQUIRED
               'MinCount' =&gt; 1, // REQUIRED,
               'EbsOptimized' =&gt; false, // SEE COMMENT
               'KeyName' =&gt; 'TestCloud',
               'Monitoring' =&gt; [
                  'Enabled' =&gt; true // REQUIRED
                ]
          ]);
      }catch(Exception $exc) {
          var_dump($exc);
      }
  </code></pre>
  
  <p>But when I try to retrieve the password to connect (RDP) to that instance from the <code>aws console</code>, I get the following error:</p>
  
  <pre><code>Password is not available.
  This instance was launched from a custom AMI, or the default password has changed. 
  A password cannot be retrieved for this instance. If you have forgotten your password, 
  you can reset it using the Amazon EC2 configuration service. For
  more information, see Passwords for a Windows Server Instance.
  </code></pre>
  
  <p>Earlier I created the <code>AMI</code> directly from a running <code>EC2</code> instance.</p>
  
  <p>What could be the reason for this? What is the thing being missed?</p>