cloud

Fix resize2fs: Bad Magic Number in Super-Block on AWS EBS

Why resize2fs reports bad magic number in super-block after an EBS resize on EC2, how to tell XFS from ext4 with df and lsblk, use xfs_growfs or resize2fs on the correct device, handle LVM layouts, and verify capacity on …

Deepak Prasad12 min read
cloud

EBS Resized but df Still Shows Old Size? Fix It on EC2

Why an enlarged EBS volume can leave df unchanged on EC2, how to compare EBS block size with partition and filesystem size using lsblk and df -hT, extend the partition with growpart, grow ext4 with resize2fs or XFS with …

Deepak Prasad19 min read
cloud

SSH to a Private EC2 Instance Without a Public IP or Bastion

How to SSH to a private EC2 instance without a public IPv4 or bastion using EC2 Instance Connect Endpoint, including security groups, IAM permissions, the aws ec2-instance-connect ssh command, troubleshooting, and …

Deepak Prasad15 min read
cloud

EC2 Metadata 401 Unauthorized? Fix IMDSv2 with curl

Why curl to 169.254.169.254 returns HTTP 401 when EC2 requires IMDSv2 tokens, the immediate PUT token and metadata GET fix, how to check HttpTokens in the console and CLI, token TTL and hop limits, common curl mistakes, …

Deepak Prasad13 min read
cloud

EC2 SSH Connection Timed Out? How to Fix It

Why EC2 SSH connection times out on Linux when status checks pass, how to verify public IPv4 and TCP port 22, security group source CIDR, public subnet route to an internet gateway, NACL return path, and Reachability …

Deepak Prasad14 min read
cloud

Recover an Unbootable EC2 Linux Instance with a Rescue Instance

How to recover an unbootable EC2 Linux instance by stopping it, detaching the root EBS volume, attaching it to a rescue instance in the same Availability Zone, mounting and repairing the filesystem offline, and restoring …

Deepak Prasad13 min read
cloud

Recover an EC2 Linux Instance Stuck in Emergency Mode

How to recognize EC2 Linux emergency mode from status checks and system log output, choose Serial Console, AWSSupport-ExecuteEC2Rescue, or a manual rescue instance, stop and snapshot the root volume, fix fstab offline, …

Deepak Prasad15 min read
cloud

How to Run EC2 User Data on Every Reboot

How to run EC2 user data on every reboot with cloud-init per-boot scripts, scripts-user always, systemd, or bootcmd, prove default shell user data runs once, and verify behavior across multiple reboots on RHEL 10.

Deepak Prasad12 min read
cloud

IAM AccessDenied Despite AdministratorAccess

Why AWS returns AccessDenied when AdministratorAccess is attached, how to read the error message, which restricting policy to check first, and how to fix an explicit or implicit deny without attaching another admin …

Deepak Prasad20 min read
cloud

CloudWatch Agent Not Sending Logs from EC2

Why the CloudWatch agent on EC2 can run without delivering log events, how to read agent status and logs, verify file path and trailing newlines, IAM and Region, test Logs API connectivity, apply fetch-config, and …

Deepak Prasad15 min read
cloud

EC2 Instance Connect Not Working? How to Fix It

Why EC2 Instance Connect browser or CLI connections fail when send-ssh-public-key returns AccessDenied, Success without SSH login, connection timed out, or connection refused, how instance metadata and sshd …

Deepak Prasad14 min read
cloud

EC2 Disk Full and SSH No Longer Works

Why a full EC2 root filesystem stops SSH and service writes, how to tell block exhaustion from inode exhaustion with df, recover through Session Manager or serial console without SSH, free space, resize EBS, find large …

Deepak Prasad16 min read
cloud

EC2 Instance Reachability Check Failed? How to Fix It

Why the EC2 instance reachability check fails while system status stays ok, how ARP-based instance status checks differ from SSH timeouts, how to read describe-instance-status and Get system log on Linux, and how to …

Deepak Prasad15 min read
cloud

EC2 User Data Not Running? How to Fix It

Why EC2 user data may not run or may fail silently on Linux, how to confirm the script was stored, read cloud-init status and logs, fix shebang, PATH, and timing problems, and verify a corrected launch on RHEL 10.

Deepak Prasad15 min read
cloud

EC2 Won't Boot After an /etc/fstab Change? How to Fix It

How to recognize an EC2 Linux boot failure from system log mount timeouts and emergency mode after a bad etc fstab edit, stop and snapshot the root volume, attach it to a rescue instance, compare UUIDs with lsblk and …

Deepak Prasad14 min read
cloud

EC2 1/2 Status Checks Failed? System vs Instance Status Explained

Why EC2 shows 1/2 checks failed or 3/3 checks passed, what system vs instance status checks test, how attached EBS and application checks differ, how to read describe-instance-status and Get system log, and when reboot, …

Deepak Prasad13 min read
cloud

Lost an EC2 PEM Key? Regain SSH Access

How to regain SSH access when the EC2 private key (.pem) is lost, why AWS cannot re-download the old key, and tested recovery paths through Systems Manager, AWSSupport-ResetAccess, and offline EBS root-volume repair on …

Deepak Prasad15 min read
cloud

EC2 SSH Permission Denied (publickey)? How to Fix It

Why EC2 SSH returns permission denied publickey when the network path works but public-key authentication fails, how to confirm the correct EC2 username, verify the private key against authorized_keys, read ssh -vvv …

Deepak Prasad15 min read
cloud

EC2 SSH Connection Refused? How to Fix It

Why EC2 SSH connection refused means the instance is reachable but nothing accepted TCP on port 22, how to confirm with nc and ssh -vvv, check sshd status, listen port and address, sshd_config, host keys, port conflicts, …

Deepak Prasad16 min read
cloud

Fix growpart "No Space Left on Device" on AWS EC2

Why growpart returns No space left on device after an EBS resize on EC2, how to compare EBS, partition, and filesystem size, use the tmpfs or TMPDIR workaround, extend the partition, grow XFS or ext4, and verify the …

Deepak Prasad16 min read
cloud

AWS Tutorial for Beginners - End-to-End Cloud Hands-On

Free hands-on AWS tutorial for beginners: the AWS CLI, EC2, S3, RDS, Lambda, CloudFormation, CDK, and CI/CD, with labs you run in your own AWS account.

Deepak Prasad1 min read
cloud

Microsoft Azure Tutorial for Beginners (Hands-On)

Free hands-on Microsoft Azure tutorial for beginners: Entra ID, VMs, App Service, AKS, Blob Storage, VPN, Front Door, ARM templates, and cost control.

Deepak Prasad1 min read
cloud

Configure S3 Bucket as Terraform Backend

Create an encrypted versioned S3 bucket with Terraform, migrate local state with terraform init -migrate-state, enable S3 native locking with use_lockfile on Terraform 1.10+, and verify remote state in the bucket.

Deepak Prasad10 min read
devops

Deploy an EKS Cluster on AWS with Terraform

Provision a minimal Amazon EKS cluster with Terraform using the terraform-aws-modules VPC and EKS modules, a managed node group on Kubernetes 1.36, and kubectl verification on Ubuntu.

Omer Cakmak16 min read
devops

Provision AWS EC2 Instances with Ansible Playbooks

Provision AWS EC2 instances with Ansible using amazon.aws.ec2_instance. Create a security group, launch and tag Ubuntu instances, and start, stop, query, and terminate EC2 resources.

Deepak Prasad14 min read
devops

Setup Kubernetes Cluster on AWS EC2 with kubeadm

Build a two-node kubeadm cluster on Ubuntu EC2 with containerd and Calico, open the right security group ports, join a worker, and deploy nginx to verify scheduling.

Omer Cakmak20 min read
cloud

AWS CLI Tutorial: Launch EC2 and Use S3 from Ubuntu

Learn AWS CLI on Ubuntu with a complete first workflow—sign in to AWS, verify your identity, launch an Ubuntu EC2 instance, connect with SSH, upload a file to S3, and remove the resources.

Deepak Prasad10 min read
cloud

AWS CodeDeploy and CodePipeline Tutorial: Deploy Applications Using CI/CD Pipeline

Learn how to deploy applications using AWS CodeDeploy and automate CI/CD workflows with AWS CodePipeline. This tutorial explains how to create deployment groups, configure EC2 instances, build CI/CD pipelines, add manual …

Mahnoor Malik14 min read
cloud

AWS CodeCommit and CodeBuild Tutorial: Build a CI/CD Pipeline on AWS

Learn how to implement a CI/CD pipeline on AWS using CodeCommit and CodeBuild. This step-by-step tutorial explains how to create a CodeCommit repository, connect using Git, configure build projects in AWS CodeBuild, and …

Mahnoor Malik17 min read
cloud

AWS Lambda Tutorial: Getting Started with AWS Lambda with Practical Examples

Learn AWS Lambda with this beginner-friendly tutorial. Understand how AWS Lambda works, create Lambda functions, run and test them, and integrate Lambda with services like Application Load Balancer, Amazon EventBridge, …

Mahnoor Malik18 min read