Unable to create nitro enclaves using aws cli

0

I am trying to create an AWS nitro enclave as per the documentation

aws ec2 run-instances --image-id ami_id --count 1 --instancetype supported_instance_type --key-name your_key_pair --enclave-options 'Enabled=true'

The command throws the following error

aws ec2 run-instances --image-id ami-<id> --count 1 --instance-type c5.2xlarge --key-name dev_nitro.pem --region us-east-1 --enclave-options 'Enabled=true'

An error occurred (VPCIdNotSpecified) when calling the RunInstances operation: No default VPC for this user. GroupName is only supported for EC2-Classic and default VPC

What will be the solution for this? Cannot see any solutions to the AWS nitro documentation. How to solve this issue?

1개 답변
1

Hi - Please try specifying the subnet id while creating the instance.

EC2 Run-instances cli - https://docs.aws.amazon.com/cli/latest/reference/ec2/run-instances.html

Launches the specified number of instances using an AMI for which you have permissions.

You can specify a number of options, or leave the default options. The following rules apply:

EC2-VPC = If you don't specify a subnet ID, we choose a default subnet from your default VPC for you. If you don't have a default VPC, you must specify a subnet ID in the request.

So try this instead:

aws ec2 run-instances --image-id ami-<id> --count 1 --instance-type c5.2xlarge --key-name dev_nitro.pem --region us-east-1 --enclave-options 'Enabled=true' --subnet-id <subnet-id>
AWS
전문가
Gokul
답변함 2년 전
  • It throws this error after I assigned a subnet-it An error occurred (InvalidSubnetID.NotFound) when calling the RunInstances operation: The subnet ID 'vpc-<created-vpc-id>' does not exist

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠