DEV Community

Aisalkyn Aidarova
Aisalkyn Aidarova

Posted on

EC2, ASG, ALB, EBS, EFS, S3 questions and answers

EC2

  1. What is EC2?
    EC2 is a virtual server in AWS used to run applications.

  2. What is an AMI?
    A template containing OS, software, and configuration to launch EC2 instances.

  3. Difference between instance type and instance family?
    Family = category (t, m, c). Type = size (t3.micro).

  4. What happens if you stop an EC2 instance?
    Instance stops, data on root EBS persists, public IP changes.

  5. What happens if you terminate EC2?
    Instance is deleted; root volume deleted by default.

  6. Difference between stop and terminate?
    Stop = reversible. Terminate = permanent.

  7. What is a key pair?
    SSH authentication method for Linux instances.

  8. How do you connect to EC2?
    SSH for Linux, RDP for Windows.

  9. What is a security group?
    Stateful virtual firewall at instance level.

  10. Stateful vs stateless?
    Security groups are stateful; NACLs are stateless.

  11. What is an Elastic IP?
    Static public IPv4 address.

  12. When do you need Elastic IP?
    When IP must not change.

  13. What is user data?
    Script that runs at instance launch.

  14. Does user data run on reboot?
    No, only on first launch (unless configured).

  15. Difference between public and private IP?
    Public = internet access, Private = internal VPC.

  16. What is placement group?
    Controls how EC2 instances are placed on hardware.

  17. Types of placement groups?
    Cluster, Spread, Partition.

  18. What is hibernation?
    Saves RAM state to disk.

  19. Can you change instance type?
    Yes, stop instance first.

  20. What is EC2 metadata?
    Instance information accessible internally.

  21. Where is metadata available?
    http://169.254.169.254

  22. What is ENI?
    Elastic Network Interface.

  23. Can EC2 have multiple ENIs?
    Yes (instance-type dependent).

  24. What is Spot instance?
    Cheap instance with interruption risk.

  25. When to use Spot?
    Batch jobs, non-critical workloads.


Auto Scaling Group (ASG)

  1. What is ASG?
    Automatically manages EC2 count.

  2. Why use ASG?
    High availability and scalability.

  3. Minimum, desired, maximum?
    Min = lowest, Desired = normal, Max = highest.

  4. What happens if instance fails?
    ASG replaces it automatically.

  5. What is a launch template?
    Blueprint for EC2 in ASG.

  6. Launch template vs launch configuration?
    Launch configuration is deprecated.

  7. Does ASG need multiple AZs?
    Yes, for high availability.

  8. What is scaling policy?
    Rule that increases/decreases instances.

  9. Types of scaling?
    Manual, Scheduled, Dynamic.

  10. What metrics trigger scaling?
    CPU, memory (custom), ALB requests.

  11. What is cooldown?
    Time before next scaling action.

  12. Can ASG scale to zero?
    Yes (min = 0).

  13. What is health check type?
    EC2 or ELB health check.

  14. Difference between EC2 and ELB health check?
    ELB checks application health.

  15. What happens if AZ goes down?
    ASG launches instances in other AZs.

  16. Can ASG attach to ALB?
    Yes (recommended).

  17. ASG without ALB?
    Possible but not ideal.

  18. What happens if you delete instance manually?
    ASG recreates it.

  19. Can ASG update instances automatically?
    Yes (rolling updates).

  20. What is instance refresh?
    Gradual replacement of instances.


ALB (Application Load Balancer)

  1. What is ALB?
    Layer 7 load balancer.

  2. ALB vs NLB?
    ALB = HTTP/HTTPS, NLB = TCP/UDP.

  3. ALB vs Classic LB?
    Classic is legacy.

  4. What is a target group?
    Group of backend resources.

  5. Can one ALB have multiple target groups?
    Yes.

  6. What types of targets are supported?
    EC2, IP, Lambda.

  7. What is listener?
    Port/protocol configuration.

  8. Listener rules?
    Route traffic based on path/host.

  9. Example listener rule?
    /api → TG1, /app → TG2.

  10. What port does ALB use?
    80/443 typically.

  11. Is ALB public or private?
    Can be both.

  12. What is health check path?
    URL ALB uses to check app health.

  13. What happens if target is unhealthy?
    ALB stops sending traffic.

  14. Does ALB terminate SSL?
    Yes.

  15. Where is SSL certificate stored?
    ACM.

  16. Can ALB redirect HTTP to HTTPS?
    Yes.

  17. Is ALB stateful?
    No, stateless.

  18. Does ALB work across AZs?
    Yes.

  19. Can ALB work with ASG?
    Yes, automatically registers instances.

  20. Does ALB need security group?
    Yes.


EBS

  1. What is EBS?
    Block storage for EC2.

  2. Is EBS AZ-specific?
    Yes.

  3. EBS vs instance store?
    EBS is persistent.

  4. Types of EBS volumes?
    gp3, io2, st1, sc1.

  5. Can EBS be attached to multiple EC2?
    No (except io1/io2 Multi-Attach).

  6. What is snapshot?
    Backup of EBS.

  7. Snapshots stored where?
    S3 (managed by AWS).

  8. Can you resize EBS?
    Yes (online).

  9. Can snapshot be copied across regions?
    Yes.

  10. Root volume delete on terminate?
    Yes (by default).


EFS

  1. What is EFS?
    Managed NFS file system.

  2. EFS vs EBS?
    EFS = shared, EBS = single instance.

  3. Is EFS AZ-specific?
    No, regional.

  4. Can multiple EC2 mount EFS?
    Yes.

  5. What protocol does EFS use?
    NFS.

  6. Use case for EFS?
    Shared storage, containers.

  7. Performance modes?
    General Purpose, Max I/O.

  8. Throughput modes?
    Bursting, Provisioned.

  9. Is EFS encrypted?
    Yes (at rest & in transit).

  10. Can EFS be used with ECS/EKS?
    Yes.


S3

  1. What is S3?
    Object storage.

  2. Is S3 regional or global?
    Regional, globally accessible.

  3. Max object size?
    5 TB.

  4. Minimum object size?
    0 bytes.

  5. What is a bucket?
    Container for objects.

  6. Is bucket name unique?
    Globally unique.

  7. S3 storage classes?
    Standard, IA, Glacier, Deep Archive.

  8. What is versioning?
    Keeps object history.

  9. What is lifecycle policy?
    Automates storage class transitions.

  10. What is S3 encryption?
    SSE-S3, SSE-KMS, SSE-C.

  11. S3 vs EBS?
    Object vs block storage.

  12. S3 vs EFS?
    Object vs file system.

  13. Can S3 host a website?
    Yes (static).

  14. Is S3 private by default?
    Yes.

  15. How do you secure S3?
    Bucket policy, IAM, encryption.

Top comments (0)