Posts

Showing posts from July, 2026

How to Use Amazon Rekognition to Detect Objects in an Image from Lambda

You've got an S3 bucket filling up with user-uploaded photos, and someone asks: 'Can we auto-tag these with what's actually in them?' That's exactly the problem Amazon Rekognition's DetectLabels API solves — and wiring it to a Lambda function triggered by S3 uploads is the most common production pattern for this use case. TL;DR: Amazon Rekognition DetectLabels via Lambda Step What Happens 1. Image uploaded to S3 S3 event notification triggers Lambda 2. Lambda invokes DetectLabels Passes S3 bucket + object key to Rekognition 3. Rekognition returns labels JSON array with label names and confidence scores 4. Lambda stores results Write tags to DynamoDB, S3 metadata, or downstream system How Amazon Rekognition DetectLabels Works DetectLabels analyzes an image and returns a list of labels — objects, scenes, concepts, and activities detected in the image — each with a confidence ...

AWS Step Functions vs Lambda Chaining: When to Stop Hardcoding Workflow Logic

You have three Lambda functions — A calls B, B calls C — and it works fine until it doesn't. One function times out, a retry fires twice, and now your downstream state is corrupted with no clear audit trail of what ran and what didn't. This is the exact failure mode that AWS Step Functions was built to prevent, and understanding when to reach for it instead of hardcoded Lambda chains is one of the more consequential architectural decisions in serverless design. TL;DR: AWS Step Functions vs Lambda Chaining Concern Hardcoded Lambda Chain AWS Step Functions Retry logic Manual, inside each function Declarative per-state, with backoff Error handling Try/catch scattered across functions Catch blocks at the state machine level Execution visibility Reconstruct from CloudWatch logs Visual execution graph, per-step...

How to Whitelist Specific IP Addresses in an EC2 Security Group

You've stood up an EC2 instance and now you need to lock down port 443 to a single office IP — not the entire internet. Adding a specific CIDR block like 203.0.113.0/32 as an inbound rule is the right move, but getting the Security Group rule syntax wrong means either locking yourself out or leaving the port wide open. Here's exactly how to do it correctly. TL;DR — Whitelist a Specific IP in a Security Group Step Action 1 Identify your Security Group ID (e.g., sg-0abc123def456 ) 2 Confirm the exact public IP or CIDR block to whitelist 3 Add an inbound rule: TCP port 443, source = 203.0.113.0/32 4 Verify the rule is applied and test connectivity How Security Group Inbound Rules Work A Security Group acts as a stateful instance-level firewall. 'Stateful' means return traffic for an allowed inbound connection is automatically permitted — you don't need a matching outbound rule for...

How to Use AWS Amplify to Deploy a Full-Stack Web App (React + Node.js)

You've got a React frontend talking to a Node.js backend, and you need a deployment pipeline that doesn't require you to hand-stitch CloudFront distributions, API Gateway configs, and CodePipeline stages together manually. AWS Amplify Hosting handles the frontend CI/CD side cleanly, but the backend story — what Amplify actually manages versus what you still own — is where most engineers hit unexpected friction on day one. TL;DR: AWS Amplify Full-Stack Deployment at a Glance Concern Amplify Handles You Still Own Frontend CI/CD Git-triggered builds, branch previews, CDN distribution Build spec tuning, environment variable management Backend APIs Amplify-generated GraphQL/REST via AppSync or API Gateway (Amplify CLI) Custom Node.js Express servers, external containers Auth Cognito User Pools via Amplify Auth category Custom auth flows, external IdPs beyond Cognito Hosting CloudFront + S3 (managed), c...

What is Amazon Aurora and How is it Different from Standard RDS MySQL

When you open the RDS console and see both 'Aurora MySQL' and 'MySQL' as engine options, the natural question is: what exactly are you paying more for? Aurora is not just a managed MySQL wrapper — it's a fundamentally different storage architecture that happens to speak the MySQL protocol. Understanding that distinction is what determines whether Aurora is the right call for your workload or an expensive over-engineering choice. TL;DR: Aurora MySQL vs. Standard RDS MySQL Dimension Aurora MySQL Standard RDS MySQL Storage architecture Distributed, shared cluster volume EBS volume attached per instance MySQL compatibility Compatible with MySQL 5.7 / 8.0 (wire protocol) Runs actual MySQL community engine Read replicas Up to 15, share same storage, near-zero lag Up to 5, each replicates data independently Failover Typically under 30 seconds (documented) 60-120 seconds typical (new EBS attac...