Posts

AWS: Serverless REST API (API Gateway + Lambda + DynamoDb + WAF)

Image
This project demonstrates a secure, scalable, and cost-efficient serverless REST API built using API Gateway, Lambda, DynamoDB, and protected by WAF. The architecture ensures high availability, automatic scaling, and IP-based access control for write operations, making it production-ready  Architecture: Client → API Gateway → Lambda → DynamoDB 🟢 STEP 1: Create DynamoDB Table: > Go to AWS Console > Search → DynamoDB > Click Create table Fill: Table name: users Partition key: Name: id Type: String Keep On-demand capacity > Click Create table ✅ Done. 🟢 STEP 2: Create IAM Role for Lambda: > Go to IAM > Click Roles > Click Create role > Select: Trusted entity: AWS Service Use case: Lambda > Click Next > Attach policies: AWSLambdaBasicExecutionRole AmazonDynamoDBFullAccess (For learning project. In real production, use limited custom policy.) > Name role: lambda-dynamodb-role > Click Create role ✅ Done. 🟢 STEP 3: Create Lambda Function > Go to La...

Terraform project with AWS to build infra within seconds! (Web Ec2 with eIP)

Image
1. Introduction: What is Terraform? Terraform is an open-source Infrastructure as Code (IaC) tool created by HashiCorp. It lets you define, provision, and manage cloud infrastructure using declarative configuration files . Instead of manually creating AWS resources in the console, you write code that describes what you want, and Terraform takes care of creating or updating it. Why use it with AWS? a) Infrastructure as Code (IaC) You can define AWS resources (EC2, VPC, S3, IAM, etc.) in .tf files. These configurations can be version-controlled in Git. b) Multi-Cloud Support Although AWS has its own tool (CloudFormation), Terraform works with AWS + Azure + GCP + on-prem at the same time. c) Reusability & Automation You can reuse Terraform modules to deploy the same AWS setup in different environments (dev, test, prod). d) State Management Terraform keeps a state file to know which resources it manages. Makes it easy to track and update changes in AWS without accidentally del...

Linux: BIOS vs UEFI

Image
  BIOS vs. UEFI: Boot System Comparison When a computer starts, it needs firmware to initialize hardware and boot the OS. There are two main types of firmware: BIOS (Basic Input/Output System) and UEFI (Unified Extensible Firmware Interface) . Let’s break them down: 1. BIOS (Basic Input/Output System) ✅ Best for: Older systems (pre-2010). Simplicity and compatibility with legacy OS. ❌ Limitations: Slow boot times. Only supports MBR partitioning (max 2TB disks). No mouse support , only keyboard navigation. 🛠️ How to Check if Your System Uses BIOS? If your boot screen has a text-based interface , it’s BIOS. Run this command in Linux: test -d /sys/firmware/efi && echo "UEFI" || echo "BIOS" If it prints BIOS , you are using BIOS. 2. UEFI (Unified Extensible Firmware Interface) ✅ Best for: Modern systems (post-2010). Faster boot times (supports Fast Boot ). Supports GPT partitioning (can use disks larger than 2TB). Secure Boot feature (prot...