07 Route53,CDN,S3 - gannurohith/devops-interview-wiki GitHub Wiki
📁 09 - CloudWatch & CloudTrail (Basic to Intermediate Q&A)
-
What is Amazon CloudWatch? A monitoring service for AWS resources and applications that collects and visualizes metrics, logs, and events.
-
What is Amazon CloudTrail? A service that enables governance, compliance, and auditing by logging all API activity in your AWS account.
-
What types of data can CloudWatch collect? Metrics, logs, events, and alarms.
-
What are custom metrics in CloudWatch? User-defined metrics sent from applications or EC2 instances using AWS CLI or SDK.
-
How do you monitor disk space or memory usage in CloudWatch? Install and configure the CloudWatch agent on the instance.
-
What is a CloudWatch alarm? A condition that watches a metric and triggers actions such as notifications or auto-scaling.
-
What are CloudWatch dashboards? Visual displays of your metrics and alarms in a single pane.
-
What is the difference between CloudWatch Logs and Metrics?
- Logs: Captures application/system logs.
- Metrics: Numeric data points over time.
-
What are metric filters in CloudWatch Logs? Patterns used to extract metric data from logs.
-
How do you reduce log storage cost in CloudWatch? Set retention policies and remove unnecessary logs.
-
What is CloudWatch Logs Insights? Interactive log analytics tool using SQL-like queries.
-
How does CloudWatch Events differ from EventBridge? EventBridge is the evolved version with advanced routing and integration.
-
How can CloudWatch automate actions? By integrating alarms with Auto Scaling, SNS, or Lambda functions.
-
What are common use cases for CloudWatch?
- EC2 health monitoring
- Lambda invocations
- Custom app metrics
- Real-time alerting
-
What is a CloudWatch namespace? A container for CloudWatch metrics.
-
What is the default metric resolution in CloudWatch? 5 minutes (standard); 1-minute with detailed monitoring.
-
What is the max retention period for logs in CloudWatch? Indefinite unless retention is configured.
-
How is CloudTrail different from CloudWatch?
- CloudTrail: Tracks who did what in your AWS account.
- CloudWatch: Monitors what is happening on the system level.
-
What is a CloudTrail trail? A configuration that enables CloudTrail to deliver log files to an S3 bucket.
-
What kind of activities does CloudTrail capture? All management events, some data events, and all read/write operations.
-
Can CloudTrail log data plane operations? Yes, like S3 object-level events and Lambda function invocations.
-
Where does CloudTrail store its logs? In S3 buckets and optionally send to CloudWatch Logs.
-
What is multi-region trail in CloudTrail? Collects events from all AWS regions for centralized monitoring.
-
How can you secure CloudTrail logs? Enable encryption, use access policies, and log file validation.
-
How do you monitor unauthorized API activity in CloudTrail? Use CloudWatch Alarms on specific API calls (e.g.,
DeleteBucket
,CreateUser
). -
How do you automate response to an event in CloudTrail? Use EventBridge rules to trigger Lambda functions or notifications.
-
What is log file integrity validation in CloudTrail? Ensures the logs haven’t been tampered with using SHA-256 and digest files.
-
How do you analyze CloudTrail logs?
- Use Athena queries
- CloudWatch Insights
- SIEM tools
-
How long are CloudTrail logs stored by default? As long as the S3 bucket retains them.
-
How do CloudWatch and CloudTrail work together? CloudTrail logs API activity → Events routed via EventBridge → Actions/alarms managed in CloudWatch.
📁 08 - Route53, CDN, and S3 (Basic to Intermediate Q&A)
-
What is Amazon Route 53? A scalable and highly available Domain Name System (DNS) web service.
-
What are the main functions of Route 53?
- Domain registration
- DNS resolution
- Health checking and routing traffic
-
What types of routing policies does Route 53 support?
- Simple, Weighted, Latency-based, Failover, Geolocation, Geoproximity, Multi-value answer
-
What is a hosted zone? A container for DNS records for a specific domain.
-
What is an A record in Route 53? Maps a domain name to an IPv4 address.
-
What is an alias record in Route 53? A record that maps to AWS resources like ELB, CloudFront, or S3 static websites.
-
How does health checking work in Route 53? Probes endpoints to check availability and routes traffic accordingly.
-
How do you route traffic to the nearest region using Route 53? Use latency-based routing policy.
-
What is Amazon CloudFront? A Content Delivery Network (CDN) that delivers content with low latency via edge locations.
-
How does CloudFront improve performance? By caching content at edge locations near users.
-
What are origin and edge locations in CloudFront?
- Origin: source of content (e.g., S3, EC2)
- Edge: CDN servers globally distributed
-
What is an origin access control (OAC) in CloudFront? Grants CloudFront permission to access private content in S3.
-
How do you secure a CloudFront distribution?
- HTTPS only
- Signed URLs or cookies
- Restrict viewer access
-
How do you invalidate objects from CloudFront cache? Use invalidation requests to remove outdated files.
-
What is Amazon S3? Simple Storage Service – object storage for storing and retrieving any amount of data.
-
What are S3 storage classes?
- Standard, Intelligent-Tiering, One Zone-IA, Glacier, Deep Archive
-
How do you make an S3 bucket publicly accessible? Update bucket policy and remove Block Public Access settings (not recommended in prod).
-
How do you restrict access to an S3 bucket? Use bucket policies, IAM roles, or VPC endpoint policies.
-
What is an S3 bucket policy? A resource-based policy in JSON format to control access at the bucket level.
-
How do you encrypt data in S3?
- SSE-S3, SSE-KMS, SSE-C (at rest)
- HTTPS/TLS (in transit)
-
What is versioning in S3? Keeps multiple versions of an object in the same bucket.
-
How do you enable static website hosting in S3? Enable website hosting in bucket properties and add index/error document.
-
What is S3 lifecycle policy? Automatically transitions objects between storage classes or deletes them after a period.
-
How does S3 integrate with CloudFront? S3 is set as the origin; CloudFront caches the content.
-
What is pre-signed URL in S3? A URL generated to grant temporary access to a private object.
-
What is S3 Transfer Acceleration? Speeds up uploads using CloudFront’s edge locations.
-
What is a multipart upload in S3? Used to upload large files in parts for faster and more reliable uploads.
-
What are common causes of 403 errors in S3?
- Missing permissions
- Block Public Access enabled
- Invalid bucket policy
-
How do you monitor S3 access and changes? Use S3 access logs, CloudTrail, or CloudWatch events.
-
How do you connect an S3 bucket to a custom domain using Route 53? Point Route 53 alias record to the S3 website endpoint (with static hosting enabled).
08. Route53, CDN, and S3 (Q&A)
-
What is Route53 and its primary use case in AWS? Answer: Route53 is a scalable DNS web service used for domain registration, DNS routing (public/private), and health checking.
-
Explain how routing policies work in Route53. Answer: Routing policies include: Simple, Weighted, Latency-based, Failover, Geolocation, and Multivalue Answer.
-
How do you configure a custom domain name with an S3 static website? Answer: Point Route53 alias/A record to the S3 website endpoint. Enable static hosting in S3 and match bucket name to domain.
-
What is an S3 bucket policy and how does it differ from IAM policy? Answer: Bucket policies are resource-based, attached directly to the bucket. IAM policies are identity-based and attached to users, roles, or groups.
-
How do you restrict S3 access to only requests from your CloudFront distribution? Answer: Use OAC (Origin Access Control) or OAI (legacy) with a bucket policy allowing access only from that identity.
-
Explain how CloudFront works with dynamic and static content. Answer: CloudFront caches static content at edge locations and forwards dynamic content to origin servers like EC2 or ALB.
-
What are the use cases for different S3 storage classes? Answer: Standard (frequent), IA (infrequent), One Zone-IA (lower durability), Glacier/Deep Archive (long-term), Intelligent-Tiering (automated tiering).
-
How do you troubleshoot 403 errors from S3? Answer: Check bucket policy, IAM policy, object ACLs, and ensure correct URL usage.
-
How does CloudFront reduce latency? Answer: By delivering content from globally distributed edge locations close to users.
-
What is a TTL in CloudFront and how does it affect caching? Answer: TTL (Time to Live) defines how long objects are cached at edge. Short TTL = frequent fetch; Long TTL = higher cache hit.
-
What is the use of invalidation in CloudFront? Answer: Invalidation removes cached objects before TTL expiry. Useful for forcing updates.
-
How to set up Route53 failover for a multi-region deployment? Answer: Create health checks and use failover routing policy with primary and secondary records.
-
What is a hosted zone in Route53? Answer: A container for DNS records of a domain, either public or private.
-
Can you point Route53 to a non-AWS resource? Answer: Yes, by creating an A or CNAME record pointing to an external IP or domain.
-
How does versioning in S3 work? Answer: Allows multiple versions of objects. Deletes become non-permanent unless all versions are deleted.
-
What is S3 lifecycle policy and why use it? Answer: Automates transition of objects between storage classes or expiration to manage cost and compliance.
-
Explain signed URLs and signed cookies in CloudFront. Answer: Used for secure access to private content. URLs grant time-limited access; cookies work for session-based access.
-
How do you prevent hotlinking of content in CloudFront? Answer: Use signed URLs or restrict referrer headers in behavior settings.
-
Can CloudFront serve HTTPS content? How? Answer: Yes. Attach an ACM certificate and enforce HTTPS-only behavior in distribution settings.
-
What are origin groups in CloudFront? Answer: Allow failover between two origins, such as S3 and EC2, improving availability.
-
How do you use S3 for log storage from CloudFront or ELB? Answer: Enable logging in CloudFront/ELB settings and specify the S3 bucket destination.
-
What’s the difference between CloudFront and Global Accelerator? Answer: CloudFront is for HTTP/HTTPS content delivery; Global Accelerator is for improving latency and availability of TCP/UDP apps.
-
How to ensure high availability for static websites using S3 + CloudFront? Answer: Use multiple S3 buckets in different regions, Route53 failover routing, and CloudFront with fallback origins.
-
What is the maximum number of records per hosted zone in Route53? Answer: 10,000 records (soft limit), can be increased via support.
-
What monitoring tools are available for Route53 and S3? Answer: Route53: Health checks, query logs, CloudWatch. S3: CloudWatch metrics, CloudTrail, server access logs.