AWS Assignment– 1
AWS EC2 for Linux Learners
Basic Questions
- Log in to the AWS Console and explore the EC2 Dashboard.
- Launch a free-tier t2.micro EC2 instance using Amazon Linux 2 AMI from the console.
- Connect to your EC2 instance using EC2 Instance Connect.
- Create a new key pair and use it to SSH into your instance.
- Restrict inbound SSH access in a Security Group to your IP only.
- Allow inbound HTTP (port 80) in your Security Group.
- Install Apache web server manually on your EC2 instance.
- Deploy a static HTML page under /var/www/html and verify it loads in the browser.
- Use a User Data script to auto-install Apache on launch.
- Allocate an Elastic IP and associate it with your instance.
- Detach the Elastic IP and reassign it to another instance.
- Create an EBS volume in the same AZ and attach it to your EC2 instance.
- Format and mount the EBS volume to /data.
- Write a file into the mounted volume and verify persistence after stop/start.
- Create a snapshot of your EBS volume.
- Create an AMI from your EC2 instance.
- Launch a new EC2 instance from your AMI.
- Compare EBS vs Instance Store in a short note.
- Stop, start, and terminate your instance, noting behavior of storage and Elastic IP.
- Document EC2 pricing models (On-Demand, Reserved, Spot).
Intermediate Questions
- Launch an Ubuntu EC2 instance and install Nginx.
- Configure Security Group to allow HTTPS (port 443).
- Create multiple EC2 instances and test manual load balancing.
- Create and configure a CloudWatch alarm for CPU utilization.
- Trigger a CloudWatch alarm by generating CPU load.
- Use AWS CLI to list all running instances in your account.
- Use AWS CLI to stop and start an instance.
- Configure CloudWatch logs agent to send EC2 logs to CloudWatch.
- Create and assign IAM Role that allows EC2 to access S3.
- Upload files to S3 from EC2 and verify IAM Role permissions.
- Use AWS Systems Manager (SSM) Session Manager to connect to your instance.
- Tag your EC2 instances with environment tags (dev, test, prod).
- Filter EC2 instances by tags using the AWS Console.
- Create a Bastion Host in a public subnet to SSH into private EC2s.
- Explore Elastic Network Interfaces (ENI) by attaching an extra ENI to your instance.
- Create and test a Security Group rule that only allows access from another Security Group.
- Use AWS CLI to create and attach an EBS volume.
- Use AWS CLI to take an EBS snapshot.
- Use EC2 Auto Recovery (from console) and test recovery of a failed instance.
- Document 5 best practices for securing EC2 instances.
Advanced Questions
- Set up a two-tier architecture with EC2 web server and EC2 database server.
- Configure Security Groups to allow DB access only from the web server.
- Implement SSL certificate on Apache running in EC2.
- Automate Apache installation using a longer User Data script.
- Configure EBS volume auto-mount on reboot.
- Perform cost analysis using AWS Cost Explorer for EC2 usage.
- Create a backup and restore workflow using EBS snapshots.
- Create an EC2 instance with encrypted root EBS volume.
- Configure Linux firewall (iptables/ufw) inside EC2 in addition to Security Groups.
- Deliver a mini-project: Deploy a secure web server on EC2 with Elastic IP, Security Groups, EBS storage, snapshot, and backup strategy.