Unlock the secrets of Amazon EC2 with these AWS EC2 MCQ questions and answers. From instance types and launching your first instance to managing AMIs and connecting securely, this guide helps professionals enhance their cloud computing expertise. Perfect for those diving into AWS EC2 for scalable and flexible cloud solutions.
Chapter 2: Launching and Managing EC2 Instances
Instance Types and Their Use Cases
Which instance type is best suited for general-purpose applications? a) T2 b) M5 c) R6g d) P3
Which instance type is optimized for memory-intensive workloads? a) M5 b) C5 c) R6g d) T3
What does the “Spot Instance” pricing model in EC2 offer? a) Reserved capacity with no upfront payment b) Discounts for short-term, interruptible workloads c) Always-on, fixed-rate pricing d) Automatic scaling of resources
Which instance type is designed for machine learning workloads? a) G4 b) P3 c) T2 d) M6i
What is a key use case for burstable performance instances like T3? a) Consistently high CPU workloads b) Periodic CPU usage spikes c) Large-scale database operations d) GPU-intensive tasks
Which storage type is recommended for high IOPS workloads? a) EBS General Purpose SSD b) EBS Provisioned IOPS SSD c) EBS Magnetic d) EBS Throughput Optimized HDD
Launching Your First Instance
What is the first step in launching an EC2 instance? a) Choose an AMI b) Select an instance type c) Configure networking d) Configure storage
What is the default storage type assigned to a new EC2 instance? a) Instance Store b) Elastic Block Store (EBS) c) S3 Bucket d) DynamoDB
What does the “key pair” in EC2 enable? a) Configuring security groups b) Secure login to instances c) Setting up IAM policies d) Assigning public IP addresses
During instance creation, which field specifies the virtual private cloud (VPC)? a) Subnet ID b) Security Group c) Network Configuration d) IAM Role
What is the default instance state immediately after launching? a) Running b) Stopped c) Pending d) Terminated
How can you assign a static public IP to an instance? a) Attach an Elastic IP b) Configure a NAT gateway c) Edit the security group d) Enable DNS resolution
Working with AMIs (Amazon Machine Images)
What does an AMI include? a) Only the operating system b) A pre-configured virtual server c) Instance metadata d) VPC configurations
Which AMI type is designed for custom configurations? a) AWS Marketplace AMI b) Public AMI c) Private AMI d) Shared AMI
How do you create a custom AMI? a) By taking a snapshot of the root volume b) By cloning an instance c) By exporting EBS to S3 d) By configuring a new VPC
What is the purpose of the AMI ID? a) To identify the operating system version b) To uniquely identify an AMI for launching instances c) To track storage usage d) To manage security groups
How can you share a private AMI with another AWS account? a) Through IAM policies b) By copying it to a public AMI c) By modifying the AMI permissions d) By exporting it to S3
What happens when you deregister an AMI? a) It deletes all associated instances b) It removes the AMI from the registry c) It terminates all instances using it d) It invalidates related snapshots
Connecting to Instances (SSH/RDP)
What is the default username for SSH access to Amazon Linux instances? a) ec2-user b) admin c) root d) ubuntu
Which port is typically used for SSH access to an EC2 instance? a) 3389 b) 22 c) 8080 d) 443
What is required to connect to an EC2 instance via SSH? a) Private key file (.pem) b) Elastic IP c) AMI ID d) Security Group ID
How do you connect to a Windows EC2 instance? a) Use the AWS CLI b) Use Remote Desktop Protocol (RDP) c) Use SSH with a key pair d) Use the AWS Console
What should you do if the private key file for SSH is lost? a) Reset the key pair b) Terminate the instance c) Create a new AMI d) Recreate the instance
What happens if port 22 is not allowed in the security group? a) SSH connections will fail b) The instance cannot connect to the internet c) Public IP assignment fails d) Instance storage becomes unavailable
What happens when an EC2 instance is stopped? a) The instance is permanently deleted b) The instance is charged for compute time c) The instance retains its EBS volumes d) All data is lost
What is a potential impact of terminating an EC2 instance? a) EBS volumes are detached but not deleted b) Instance data is preserved c) Public IP is reassigned d) Instance data is permanently deleted
How can you automate instance recovery in case of failure? a) Use CloudWatch alarms b) Enable Auto Scaling c) Configure Elastic IPs d) Use S3 for backup
Which action is irreversible in EC2 management? a) Stopping an instance b) Terminating an instance c) Rebooting an instance d) Modifying instance type
What is the result of rebooting an EC2 instance? a) The instance data is deleted b) The instance restarts with no data loss c) The instance stops temporarily d) A new public IP is assigned
How can you ensure an instance automatically starts after stopping? a) Enable Elastic Load Balancing b) Configure an Auto Scaling group c) Use AWS Systems Manager d) Enable persistent state in the settings
Answers Table
QNo
Answer (Option with Text)
1
a) T2
2
c) R6g
3
b) Discounts for short-term, interruptible workloads
4
b) P3
5
b) Periodic CPU usage spikes
6
b) EBS Provisioned IOPS SSD
7
a) Choose an AMI
8
b) Elastic Block Store (EBS)
9
b) Secure login to instances
10
c) Network Configuration
11
c) Pending
12
a) Attach an Elastic IP
13
b) A pre-configured virtual server
14
c) Private AMI
15
a) By taking a snapshot of the root volume
16
b) To uniquely identify an AMI for launching instances