Complete the code to specify the AMI ID when launching an EC2 instance.
aws ec2 run-instances --image-id [1] --count 1 --instance-type t2.micro
The --image-id option requires the AMI ID, which identifies the Amazon Machine Image to use for the instance.
Complete the code to create a new AMI from an existing EC2 instance.
aws ec2 create-image --instance-id [1] --name "MyServerBackup"
The --instance-id option requires the ID of the EC2 instance you want to create an AMI from.
Fix the error in the command to deregister an AMI by filling the blank with the correct option.
aws ec2 deregister-image --image-id [1]The deregister-image command requires the AMI ID, which starts with 'ami-'. Using an instance ID or other values will cause an error.
Fill both blanks to create an AMI with a description and no reboot option.
aws ec2 create-image --instance-id [1] --name "BackupImage" --description [2] --no-reboot
The --instance-id requires the instance ID, and --description needs a string describing the AMI. The --no-reboot flag prevents reboot during image creation.
Fill all three blanks to launch an EC2 instance with a specific AMI, instance type, and key pair.
aws ec2 run-instances --image-id [1] --instance-type [2] --key-name [3] --count 1
The --image-id specifies the AMI, --instance-type sets the size of the instance, and --key-name provides the SSH key pair for access.