Name three AWS services that can help you run serverless applications.

AWS Lambda (compute without servers).
Amazon API Gateway (expose APIs without servers).
Amazon DynamoDB (serverless NoSQL DB).

Bonus: S3 for static hosting, Step Functions for orchestration.

How can you encrypt data at rest in S3?

Options:
SSE-S3 → Managed by S3.
SSE-KMS → AWS KMS keys for more control.
SSE-C → Customer-provided keys.
Client-side encryption → Encrypt before upload.

Example: Company uses SSE-KMS for audit and key rotation.

What is the difference between EBS and EFS?

EBS (Elastic Block Store): Block storage attached to a single EC2 instance. Like a hard disk.
EFS (Elastic File System): Shared file system that can be mounted on multiple EC2s.

Example:

EBS → Database storage.
EFS → Shared web server content across multiple instances.

Explain the difference between vertical scaling and horizontal scaling in AWS.

Vertical Scaling: Increasing instance size (e.g., t2.micro → m5.4xlarge).
Horizontal Scaling: Adding more instances behind a load balancer (scaling out).
Example:

Vertical = upgrading to a bigger RDS DB.
Horizontal = adding more EC2s in an Auto Scaling Group.

How does AWS Route 53 perform DNS failover?

Route 53 checks the health of endpoints.
If primary endpoint fails, it automatically routes traffic to a healthy secondary endpoint.

Example: Route traffic to EC2 in Virginia, but if it fails, redirect to EC2 in Oregon.