Validation Quiz - MODULE 3
This 30-question quiz allows you to validate your knowledge on EC2 troubleshooting before moving on to the practical lab.
Question 1
What is the first recommended step to troubleshoot an inaccessible EC2 instance?
A) Terminate and recreate the instance
B) Check the instance status in the AWS console
C) Contact AWS support
D) Change the instance type
See the answer
Answer: B
The first step is always to check the instance status in the AWS console or via AWS CLI. The status can indicate if the instance is running, stopped, or if it has status check issues. This guides the next steps in the diagnosis.
Question 2
What are "Status Checks" in EC2?
A) Billing checks
B) Automated tests that verify the instance's accessibility and health
C) Security logs
D) Performance metrics
See the answer
Answer: B
Status Checks are automated tests performed by AWS every minute. There are two types: System Status Check (checks the underlying AWS infrastructure) and Instance Status Check (checks the instance's operating system). A failure indicates an issue to investigate.
Question 3
What is the difference between System Status Check and Instance Status Check?
A) No difference
B) System checks AWS infrastructure, Instance checks the operating system
C) System is for Linux, Instance for Windows
D) System is free, Instance is paid
See the answer
Answer: B
System Status Check verifies AWS infrastructure (power, network, host hardware). A failure often requires AWS intervention or a restart on another host. Instance Status Check verifies the operating system (network configuration, kernel, file system). A failure requires user intervention.
Question 4
An EC2 instance fails the System Status Check. What action is recommended?
A) Modify the Security Group
B) Stop and start the instance to migrate it to another host
C) Reboot the instance
D) Change the AMI
See the answer
Answer: B
A System Status Check failure indicates an issue with the underlying AWS infrastructure. A stop/start (not a simple reboot) forces the instance to restart on a new physical host, which generally resolves the issue. A reboot keeps the instance on the same host.
Question 5
What is the difference between "Reboot" and "Stop/Start" for an EC2 instance?
A) No difference
B) Reboot keeps the instance on the same host, Stop/Start can migrate it to a new host
C) Reboot is slower
D) Stop/Start retains the public IP
See the answer
Answer: B
Reboot restarts the operating system but keeps the instance on the same physical host. Stop/Start completely stops the instance and potentially restarts it on a new host. Stop/Start changes the public IP (except Elastic IP) and resets the instance store.
Question 6
You cannot connect via SSH to an instance. What is the most likely cause?
A) The instance doesn't have enough RAM
B) The Security Group does not allow traffic on port 22
C) The AMI is corrupted
D) The instance type is incorrect
See the answer
Answer: B
The most common cause of inability to connect via SSH is a Security Group that does not allow inbound traffic on port 22 from your IP address. Check that the inbound rule allows port 22 (SSH) with the appropriate source (your IP or 0.0.0.0/0).
Question 7
What does the error "Permission denied (publickey)" during an SSH connection indicate?
A) The SSH port is blocked
B) An authentication issue with the private key
C) The instance is stopped
D) The network is down
See the answer
Answer: B
This error indicates a key-based authentication issue. Possible causes: wrong private key used, wrong username (ec2-user, ubuntu, etc.), incorrect permissions on the .pem file (should be 400), or missing/incorrect public key in the instance.
Question 8
What is the default username for an Amazon Linux instance?
A) root
B) admin
C) ec2-user
D) amazon
See the answer
Answer: C
Amazon Linux uses "ec2-user" as the default user. Other examples: Ubuntu uses "ubuntu", Debian uses "admin", CentOS uses "centos" or "ec2-user", RHEL uses "ec2-user". Using the wrong user causes the "Permission denied" error.
Question 9
What does the error "Connection timed out" during an SSH connection generally indicate?
A) Wrong password
B) Network issue: Security Group, NACL, route, or instance inaccessible
C) Wrong SSH key
D) Overloaded instance
See the answer
Answer: B
"Connection timed out" means the connection could not be established at the network level. Check: the Security Group (port 22 open), subnet NACLs, routing table, Internet Gateway, the instance's public IP, and that the instance is running in a public subnet.
Question 10
How to check the system logs of an EC2 instance from the AWS console?
A) Via CloudWatch only
B) Actions > Monitor and troubleshoot > Get system log
C) It's not possible
D) Via S3
See the answer
Answer: B
In the EC2 console, select the instance, then Actions > Monitor and troubleshoot > Get system log. This displays the startup logs (console output) which can reveal boot errors, disk issues, or configuration errors.
Question 11
An EC2 instance remains stuck in the "pending" state. What to check?
A) The Security Group
B) Available capacity in the region/AZ and account limits
C) The SSH key
D) CloudWatch logs
See the answer
Answer: B
An instance stuck in "pending" may indicate: lack of capacity in the AZ for that instance type, account limit reached, issue with the AMI, or exceeded instance quota. Check service limits and try another AZ or instance type.
Question 12
What does the error "InsufficientInstanceCapacity" mean?
A) The instance lacks memory
B) AWS doesn't have enough available capacity for that instance type in the AZ
C) The AWS account is suspended
D) The disk is full
See the answer
Answer: B
This error indicates that AWS doesn't have the physical capacity available to launch the requested instance type in the selected availability zone. Solutions: wait and retry, choose another AZ, or choose a different instance type.
Question 13
What does the error "InstanceLimitExceeded" mean?
A) The instance is too powerful
B) The maximum instance quota for the account is reached
C) The network is saturated
D) The AMI is invalid
See the answer
Answer: B
Each AWS account has limits (quotas) on the number of EC2 instances per region. "InstanceLimitExceeded" indicates that this limit is reached. Solution: request a quota increase via Service Quotas in the AWS console.
Question 14
How to increase the EC2 quotas (limits) of your account?
A) It's not possible
B) Via Service Quotas in the AWS console or a support ticket
C) By paying more
D) Automatically after 30 days
See the answer
Answer: B
Quotas can be increased via the "Service Quotas" service in the AWS console. Search for the desired quota and click "Request quota increase". Some increases are automatic, others require manual approval.
Question 15
Which AWS CLI command displays the status checks of an instance?
A) aws ec2 get-status
B) aws ec2 describe-instance-status
C) aws ec2 check-instance
D) aws ec2 instance-health
See the answer
Answer: B
The command aws ec2 describe-instance-status --instance-ids i-xxxxx displays status check information for an instance. It shows the state of System Status Checks and Instance Status Checks, as well as scheduled events.
Question 16
An EC2 instance is unresponsive but the status check is OK. What to check?
A) Only the Security Group
B) The application, operating system, memory, and CPU
C) Billing
D) The AMI
See the answer
Answer: B
If the status checks are OK but the instance is unresponsive, the issue is likely at the application or OS level. Check: is the application running, is the system overloaded (CPU/memory at 100%), is there a configuration issue, is the internal firewall (iptables) blocking traffic.
Question 17
How to access a Linux instance if SSH doesn't work?
A) It's impossible
B) EC2 Instance Connect, Session Manager, or via a recovery instance
C) Only by recreating the instance
D) Via RDP
See the answer
Answer: B
Alternatives to SSH: EC2 Instance Connect (via AWS console), AWS Systems Manager Session Manager (if the SSM agent is installed), Serial Console (for Nitro instances), or detach the root volume and attach it to a recovery instance to fix the configuration.
Question 18
What is AWS Systems Manager Session Manager?
A) A user session management tool
B) A service allowing connection to instances without opening SSH ports
C) A password manager
D) A backup service
See the answer
Answer: B
Session Manager allows access to instances via the AWS console or CLI without opening the SSH port (22) in the Security Group. It requires the SSM agent on the instance and appropriate IAM permissions. It's more secure as no inbound port is required.
Question 19
An EC2 instance cannot access the Internet. What is the first check?
A) Verify that the instance is in a public subnet with a route to the Internet Gateway
B) Reinstall the instance
C) Change the instance type
D) Contact AWS
See the answer
Answer: A
To access the Internet, an instance must be in a public subnet with: a public IP or Elastic IP, a route in the routing table to the Internet Gateway (0.0.0.0/0 -> igw-xxx), and a Security Group allowing outbound traffic.
Question 20
Which CloudWatch metric indicates high CPU usage?
A) NetworkIn
B) CPUUtilization
C) DiskReadOps
D) StatusCheckFailed
See the answer
Answer: B
CPUUtilization is the CloudWatch metric that indicates the percentage of CPU usage. A high value (close to 100%) can explain slowness or unresponsiveness. Basic metrics are free with a 5-minute granularity.
Question 21
What does the error "Client.UserInitiatedShutdown" in EC2 logs mean?
A) AWS stopped the instance
B) The instance was stopped by a user action or an internal script
C) Hardware failure
D) Billing issue
See the answer
Answer: B
This shutdown reason indicates that the instance was stopped by a user command (console, CLI, API) or by a shutdown command executed from the instance itself (shutdown, poweroff). It's not a failure but an intentional action.
Question 22
What does "Server.SpotInstanceTermination" mean?
A) The instance was terminated for maintenance
B) The Spot instance was reclaimed by AWS because the Spot price exceeded your bid
C) User error
D) Security issue
See the answer
Answer: B
Spot instances can be interrupted by AWS with a 2-minute notice when AWS needs the capacity or when the Spot price exceeds the defined maximum. This is expected behavior for Spot instances and applications should be designed to handle it.
Question 23
What does the error "InvalidKeyPair.NotFound" during launch indicate?
A) The private key is corrupted
B) The specified key pair does not exist in the region
C) SSH is disabled
D) The instance is running
See the answer
Answer: B
This error means that the specified key pair name does not exist in the region where you are trying to launch the instance. Key pairs are regional. Check the exact name and ensure you are in the correct region, or create the key pair in that region.
Question 24
How to diagnose why an instance is not starting correctly?
A) Only look at the Security Group
B) Check the System Log (console output) and status checks
C) Change the AMI
D) Wait 24 hours
See the answer
Answer: B
The System Log (Get system log in the console) displays the operating system's startup messages, revealing boot errors, disk mount issues, kernel errors, etc. Status checks indicate if the instance passed its health checks.
Question 25
An instance shows "0/2 checks passed". What does this message mean?
A) The instance is working perfectly
B) Both status checks (System and Instance) failed
C) Two instances are down
D) The security check failed
See the answer
Answer: B
"0/2 checks passed" means that both status checks failed: System Status Check AND Instance Status Check. It's a critical situation that requires immediate investigation. "2/2 checks passed" means everything is OK.
Question 26
What troubleshooting methodology is recommended?
A) Try solutions randomly
B) Symptom -> Hypotheses -> Tests -> Fix -> Verification
C) Always recreate the instance
D) Contact support immediately
See the answer
Answer: B
The structured methodology is: 1) Identify the exact symptom, 2) Formulate hypotheses about possible causes, 3) Test each hypothesis methodically, 4) Apply the fix, 5) Verify that the issue is resolved. Document each step.
Question 27
The instance is "running" but you get "No route to host". What to check?
A) The SSH key
B) The routing table and the Internet Gateway
C) The instance type
D) The AMI
See the answer
Answer: B
"No route to host" is a network error indicating there is no path to the instance. Check: the subnet's routing table, the presence of an Internet Gateway (for public subnets), the default route (0.0.0.0/0), and that the instance has a public IP.
Question 28
Why might an instance lose connectivity after a reboot?
A) The reboot deletes the Security Groups
B) A network service (like NetworkManager) did not start correctly
C) The AMI was deleted
D) The AWS account expired
See the answer
Answer: B
After a reboot, services may not start correctly, including network services. Check system logs for service startup errors. Other possible causes: incorrect network configuration in the OS, error in a startup script.
Question 29
What information can the "Screenshot" of a Windows EC2 instance provide?
A) Nothing useful
B) The current screen of the instance, useful for seeing boot errors or blue screens
C) SSH logs
D) CPU metrics
See the answer
Answer: B
For Windows instances (and some Linux), the "Get instance screenshot" function captures the current screen. It's useful for seeing blue screens (BSOD), boot errors, blocked login prompts, or any visible screen issue.
Question 30
A user reports degraded performance on a T3 instance. Which metric to check first?
A) NetworkIn
B) CPUCreditBalance and CPUCreditUsage
C) DiskWriteOps
D) StatusCheckFailed
See the answer
Answer: B
T3 instances are burstable and use CPU credits. If CPUCreditBalance drops to zero, the instance is limited to its baseline performance. Check CPUCreditBalance (remaining credits) and CPUCreditUsage (consumed credits). If credits are regularly exhausted, consider a larger instance type.
Result
Count your correct answers:
- 27-30: Excellent - You master EC2 troubleshooting
- 22-26: Good - Some points to review
- 17-21: Average - Review the course before the lab
- Less than 17: Insufficient - Retake the course from the beginning
Proceed to the Troubleshooting Lab once you have achieved at least 22 correct answers.