Skip to main content
All CollectionsKnowledge BaseAWS WorkloadsTroubleshooting - AWS Workloads
Password is not available the instance was launched from custom AMI or the default password has changed
Password is not available the instance was launched from custom AMI or the default password has changed

Password is not available the instance was launched from custom AMI or the default password has changed

Updated over 3 months ago

Problem description

  • When performing cross-account or cross-region operations, generating a new password can result in an error.

  • This issue arises because EC2 Key Pairs differ between accounts and regions, preventing the generation of a new password with the key in the target account or region.

  • Consequently, you need to use the original password generated in the source account to access the instance.

Cause

  • EC2 Key Pairs are specific to the account and region where they are created. Therefore, when instances are launched from custom AMIs, they inherit the administrator password from the source instance.

  • AWS documentation specifies that the password for the new instance must match the administrator password of the source instance: “Instances that you launch from custom AMIs take the administrator password from the source instance.

  • However, you can change the default password for the administrator account in the source instance that you used to create the AMI. In this case, the new instance takes the same password. To successfully connect to a new instance, the instance's password must match the administrator password.” (For reference: AWS Knowledge Center)

Solution/Workaround:

  • To access the instance, use the original password from the source EC2 instance.

  • You can also reset the password, follow the instructions provided in the AWS documentation: Resetting Admin Password.

Did this answer your question?