I have a AWS instance on which I perform a ssh login and operate.Os is Ubuntu 16.04.3. I didn’t select it’s AMI and neither do I have the access to its AWS console.

I wanted to know that what instance is it like, is it t2.small or m3.large?

I did found a command lscpu which tells me that it has 1 CPU and 1 Core per socket,

And on running free -m I can see that it has 2GB of available memory.

Based on these things I am making a guess that it is a t2.small instance. Is there a way to be sure about it that what instance is it?

When I use the describe-intances command i get the following output:

aws ec2 describe-instances
You must specify a region. You can also configure your region by running "aws configure".

And I am not aware of the region of my instance as well.

Also I needed an EBS Provisioned IOPS SSD or SSD instance store volumes specifically. But if it is a t2.micro instance then according to the table shown by was while selecting instances, it is EBS only.

So how can I find that whether the instance I am using contains a EBS IOPS SSD or SSD instance store volumes or not?

  • Have you configured aws cli ? first you need to install and configure aws cli docs.aws.amazon.com/cli/latest/userguide/installing.html – sanjayparmar Sep 14 '18 at 11:04
  • I didn't used pip, instead I used sudo apt intall. And when I am running aws version command I get a output as described in the link, like this aws-cli/1.11.84 Python/3.6.2 Linux/4.4.0-59-generic botocore/1.5.47 – abhishek ranjan Sep 14 '18 at 11:10
  • now run command $ aws configure and provide details AWS Access Key ID [None]: AKIAIOSFODNN7EXAMPLE AWS Secret Access Key [None]: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY Default region name [None]: us-west-2 Default output format [None]: json – sanjayparmar Sep 14 '18 at 11:14
  • if you already login into instance you can get metadata curl -s | sed 's/\(.*\)[a-z]/\1/' – sanjayparmar Sep 14 '18 at 11:16
  • Metadata will give you full details of instance curl for more info. - docs.aws.amazon.com/AWSEC2/latest/UserGuide/… – sanjayparmar Sep 14 '18 at 11:17

Step 1. Determine your EC2 instance ID:


Step 2: Figure out your region


Step 3: Using the AWS CLI describe your instance. A lot of this information is also available thru the metadata referenced in Step 1.

aws ec2 --region region_from_step_2 describe-instances --instance-ids instance_id_from_step_1

The output will be nicely formatted json with a wealth of information about your EC2 instance.

Almost all of this information is available from metadata. This is organized much like a file system directory.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.