Launch EC2 Instance via AWS CLI

Level 1 - Task 38
Getting key pair error(not found nautikus-kp) and how to add instance name - nautilus-ec2

could you share how to resolve this.

aws ec2 run-instances --image-id ami-0cd59ecaf368e5ccf --instance-type t2.micro --key-name -nautilus-kp pair

Capture3

Hi @venkat2123

The error says the named RSA key was not available. you need to pass the path of the key. If it’s not available locally, you need to create it.
You need to create a key parie named natilus-kp and the run the command.

aws ec2 run-instances --image-id ami-0cd59ecaf368e5ccf --instance-type t2.micro --key-name -devops-kp

getting error agin

Ahh. The tasks says you need to create the key-pair named devops-kp in instruction -4. Once you’ve created one, you can proceed.