AWS Assignment– 1

AWS EC2 for Linux Learners

Basic Questions

  1. Log in to the AWS Console and explore the EC2 Dashboard.
  2. Launch a free-tier t2.micro EC2 instance using Amazon Linux 2 AMI from the console.
  3. Connect to your EC2 instance using EC2 Instance Connect.
  4. Create a new key pair and use it to SSH into your instance.
  5. Restrict inbound SSH access in a Security Group to your IP only.
  6. Allow inbound HTTP (port 80) in your Security Group.
  7. Install Apache web server manually on your EC2 instance.
  8. Deploy a static HTML page under /var/www/html and verify it loads in the browser.
  9. Use a User Data script to auto-install Apache on launch.
  10. Allocate an Elastic IP and associate it with your instance.
  11. Detach the Elastic IP and reassign it to another instance.
  12. Create an EBS volume in the same AZ and attach it to your EC2 instance.
  13. Format and mount the EBS volume to /data.
  14. Write a file into the mounted volume and verify persistence after stop/start.
  15. Create a snapshot of your EBS volume.
  16. Create an AMI from your EC2 instance.
  17. Launch a new EC2 instance from your AMI.
  18. Compare EBS vs Instance Store in a short note.
  19. Stop, start, and terminate your instance, noting behavior of storage and Elastic IP.
  20. Document EC2 pricing models (On-Demand, Reserved, Spot).

Intermediate Questions

  1. Launch an Ubuntu EC2 instance and install Nginx.
  2. Configure Security Group to allow HTTPS (port 443).
  3. Create multiple EC2 instances and test manual load balancing.
  4. Create and configure a CloudWatch alarm for CPU utilization.
  5. Trigger a CloudWatch alarm by generating CPU load.
  6. Use AWS CLI to list all running instances in your account.
  7. Use AWS CLI to stop and start an instance.
  8. Configure CloudWatch logs agent to send EC2 logs to CloudWatch.
  9. Create and assign IAM Role that allows EC2 to access S3.
  10. Upload files to S3 from EC2 and verify IAM Role permissions.
  11. Use AWS Systems Manager (SSM) Session Manager to connect to your instance.
  12. Tag your EC2 instances with environment tags (dev, test, prod).
  13. Filter EC2 instances by tags using the AWS Console.
  14. Create a Bastion Host in a public subnet to SSH into private EC2s.
  15. Explore Elastic Network Interfaces (ENI) by attaching an extra ENI to your instance.
  16. Create and test a Security Group rule that only allows access from another Security Group.
  17. Use AWS CLI to create and attach an EBS volume.
  18. Use AWS CLI to take an EBS snapshot.
  19. Use EC2 Auto Recovery (from console) and test recovery of a failed instance.
  20. Document 5 best practices for securing EC2 instances.

Advanced Questions

  1. Set up a two-tier architecture with EC2 web server and EC2 database server.
  2. Configure Security Groups to allow DB access only from the web server.
  3. Implement SSL certificate on Apache running in EC2.
  4. Automate Apache installation using a longer User Data script.
  5. Configure EBS volume auto-mount on reboot.
  6. Perform cost analysis using AWS Cost Explorer for EC2 usage.
  7. Create a backup and restore workflow using EBS snapshots.
  8. Create an EC2 instance with encrypted root EBS volume.
  9. Configure Linux firewall (iptables/ufw) inside EC2 in addition to Security Groups.
  10. Deliver a mini-project: Deploy a secure web server on EC2 with Elastic IP, Security Groups, EBS storage, snapshot, and backup strategy.