The Marketplace of AWS provides various solutions, including various AMI (Application and OS Images), which the user can install on the EC2 virtual machine. However, EC2 images can be launched directly from the marketplace only after the user has subscribed to the AMI. The AMI for the EC2 VM subscriptions usually costs the user hourly, and they do not incur charges when the instance is in a stopped or terminated state. This post will teach how to launch an EC2 instance from the AWS Marketplace.
Directly Launching EC2 From Marketplace
To directly launch an EC2 instance, first head over to the AWS Marketplace and search for any particular image that you want. For example, if you want to install an AMI that comes with NodeJS development environment preconfigure, then search for NodeJS in the search bar:
After that, in the search results, under the refine results section, make sure to enable only AMIs:
After that, select the AMI from the marketplace that you prefer and click on it:
This will bring you to the product detail page, from where you can read all about this particular AMI:
Once you are sure that you want to install this AMI in the EC2 instance, then subscribe to this AMI by clicking on the subscribe button:
This will take you to the Product Subscription page, where you need to click on the “Accept Terms” button:
After that, the subscription validation process will begin:
Once the subscription validation is complete, you will be able to see a date, and the prompt will show the following:
After that, you can move on to the EC2 configuration by simply clicking on the “Continue to Configuration” button:
On the next configuration page, choose the region where you want to deploy the EC2 instance and then click on the “Continue to Launch” button:
For the launch action on the launch page, open the drop-down list and select “Launch From EC2”:
Doing this will display a “Launch” button. Click on it to open up the EC2 Management Console’s launch wizard in a new tab:
In the EC2 launch wizard, give a name to your EC2 instance:
The AMI section will already have the marketplace AMI pre-selected:
Scroll down to the Key pair section and select a Key pair from the list (or create a new one). Remember this Key pair will be used to connect to your EC2 therefore make sure that you have this Key pair on your machine (The key pair is downloaded at the time of creation):
After that, click on the “Launch Instance” button from the summary:
This will create the EC2 instance with your selected Marketplace AMI:
Head to the EC2 Instances dashboard to verify the creation:
This confirms that you were able to launch an EC2 from the Marketplace after subscribing to the AMI.
Note: To learn how to connect with an EC2 instance, read this guide!
Conclusion
To launch an instance from the AWS Marketplace, head over to the marketplace and browse for the AMI that you want to run on your EC2. After that, click on it to head over to its detail page. From the detail page, subscribe to the marketplace product. After that, click on the “Continue to Configure” button to set the basic configuration, and after that, follow the EC2 launch wizard to launch your EC2 instance with the Marketplace AMI pre-selected.