Debug School

rakesh kumar
rakesh kumar

Posted on • Updated on

How to launch EC2 Instance

Question

How to see running instances and total no of resource in EC2 dashboard
What kind of os image available while launching EC2dashboard

you will create a new Amazon EC2 instance running Ubuntu. Before launching and connecting to an Amazon EC2 instance, you need to create a key pair, unless you already have one. You can create a key pair using the Amazon EC2 console and launch your EC2 instance.

  1. Open the AWS console
  2. Search for ec2

Image description

  1. EC2 Dashboard will be opened, choose instances(running).

Image description

  1. Click launch instances.

Image description

  1. Name the instance and choose the OS image — (Ubuntu)

Image description

  1. Select the instance type — (here we choose t2.micro)

  2. Choose the key-pair if it already exists or else click create new key pair

  • click create new key-pair
  • Name the key
  • choose RSA
  • Choose .pem
  • click create key pair save the .pem key in your local machine, (so, while connecting navigate to the .pem key location and connect with the remote machine)

Image description

  1. Keep the network settings as follows, setting it to ‘My IP’ will save you money.

Image description

  1. Check for the summary and launch instance

Image description

  1. It will take a few seconds to create an instance and display the success status.

Image description

  1. Now, go inside the instance and check for status(running)

  2. To connect with the remote machine, do as follow

  • In instance summary, choose to connect
  • choose SSH Client
  • In your terminal, navigate to the .pem key location, and paste the 3rd command.
  • Paste the last command and connect with the remote system

Image description

Now, you are ready to work on the remote system

  1. To exit, just type ‘exit’

Image description

  1. To select an instance, do as follow
choose the instance
actions → delete
Enter fullscreen mode Exit fullscreen mode

Image description

In conclusion, creating an EC2 instance can seem like a daunting task, but it is a fundamental aspect of using Amazon Web Services. With the right knowledge and guidance, anyone can create an EC2 instance and launch their virtual server in the cloud. By following the steps outlined in this article, you can create your instance and start exploring the many features and capabilities of AWS. With EC2 instances, the possibilities are endless, and you have the power to scale your infrastructure to meet the demands of your application. So, take the first step today and create your own EC2 instance to begin your cloud computing journey.
Resolution
To launch a new EC2 instance from an custom AMI, follow these steps:

  1. Open the EC2 console.
  2. Note: Be sure to select the AWS Region that you want to launch the instance in.
  3. In the navigation pane, choose EC2 Dashboard, and then choose Launch instance.
  4. Under Names and tags, for Name, enter a name for your instance.
  5. Under Application and OS Images (Amazon Machine Image), find the AMI that you want to use to launch a new instance:
  6. To search for the custom AMI, enter the name of the custom AMI in the search bar.
  7. To use a custom AMI that you created, choose Browse more AMIs, choose My AMIs, and then choose Owned by me.
  8. To use a custom AMI that was shared with you, choose Browse more AMIs, choose My AMIs, and then choose Shared with me.
  9. Under Instance type, choose an instance type.
  10. Under Key pair (login), for Key pair name, choose a key pair. Or, create a new one.
  11. (Optional) Under Network settings, choose Edit, and then choose your VPC and Subnet.
  12. (Optional) Under Configure storage, choose your GiB and Root volume size.
  13. Under Summary, choose Launch instance.
  14. Choose View all Instances to check the status of your instance .

Troubleshoot errors or issues after you launch the custom AMI

Error: "Password is not available yet. Please wait at least 4 minutes after launching an instance before trying to retrieve the auto-generated password."

This error might occur when you don't use Sysprep with a custom Windows AMI to launch the instance. Wait a few minutes, and then try to launch the instance again. Or, reset the administrator password on the EC2 Windows instance.

To create a reusable custom Windows AMI, see How can I use Sysprep to create and install custom reusable Windows AMIs?

Error: "The AMI may no longer exist or may be specific to another account or region."

Make sure that the AMI ID is correct and that you launched the custom AMI in the correct AWS Region. If you created the custom AMI in the wrong AWS Region, then copy it to another AWS Region.

If you copied the custom AMI and can't launch the instance, then see Why can't I launch EC2 instances from my copied AMI?

Shared custom AMIs with encrypted snapshots

You can't share AMIs with encrypted snapshots that use the default AWS managed key. You can share custom AMIs with encrypted snapshots that use only a customer managed key.

Note: If users in another AWS account want to copy a shared AMI, then you must grant them read permissions for the storage that backs the AMI. For more information, see Cross-account copying.

Driver issues

To avoid driver install issues, manually install or upgrade drivers for the instance type. For more information, see Migrate to latest generation instance types.

Refrence
launch-instance-custom-ami
LaunchingAndUsingInstances
task1-launch-ec2-instance

Top comments (0)