Posts

Showing posts from 2026

SQS vs SNS: Core Differences and When to Use Each AWS Messaging Service

You have an order placed event and three downstream systems — inventory, billing, and notifications — all need to react to it. Do you put the message in a queue and let each system poll it, or do you push it to all three at once? Getting this wrong means either building a polling nightmare or discovering that SQS only delivers each message to one consumer. This is the SQS vs SNS decision, and it comes up constantly in event-driven architecture design. TL;DR: SQS vs SNS at a Glance If you need one worker to process each message exactly once, use SQS. If you need one event to reach multiple independent subscribers simultaneously, use SNS. The two services solve fundamentally different problems and are frequently combined — SNS fans out, SQS absorbs the load per subscriber. Dimension SQS SNS Delivery model Pull (consumers poll) Push (SNS pushes to subscribers) Message consumers One consumer per message All subscriber...

How to View and Filter VPC Flow Logs in CloudWatch Logs Insights

You enabled VPC Flow Logs, stared at the raw output in S3, and immediately understood why nobody reads those files directly. The fields are space-delimited, the timestamps are epoch, and finding rejected traffic to a specific port means grepping through millions of records. Sending flow logs to CloudWatch Logs and querying them with Logs Insights is the practical path — this post walks through the exact setup and the queries that actually surface what you need. TL;DR: VPC Flow Logs to CloudWatch Logs Insights Step What You're Doing Why It Matters 1 Create IAM role for flow log delivery Flow Logs service needs permission to write to CloudWatch Logs 2 Enable VPC Flow Logs → CloudWatch destination Raw packets become structured log events 3 Verify log group receives data Confirm delivery before writing queries 4 Run Logs Insights query for REJECT + port Filter millions of records in seconds 5 Pin que...

How to Use Amazon Translate to Automatically Translate Text in Lambda

When your application starts accepting user-submitted content from multiple regions, the first real-time translation request usually lands in your backlog faster than you expect. Wiring Amazon Translate into a Lambda function for Korean-to-English translation is straightforward, but the details around language code handling, IAM scoping, and response structure are where engineers lose time. TL;DR: Amazon Translate in Lambda Concern Answer API call for real-time translation TranslateText via AWS SDK Korean to English language codes ko → en Auto language detection Set SourceLanguageCode to auto Max text size per request Check AWS documentation — limits apply per call IAM action required translate:TranslateText Synchronous or async Real-time: synchronous. Batch: asynchronous job API How Amazon Translate Works Amazon Translate is a neural machine translation service. For real-time use case...

How to Use DynamoDB Streams to Trigger a Lambda Function on Data Changes

You have a DynamoDB table and you need to react to every write — inserts, updates, deletes — without polling or building a change-detection layer yourself. DynamoDB Streams with Lambda as an event source is the standard pattern for this, but the wiring has enough moving parts that it's easy to get the IAM wrong, pick the wrong stream view type, or misconfigure the event source mapping and wonder why your function never fires. TL;DR: DynamoDB Streams + Lambda Event Source Mapping Step What You're Doing Key Decision 1 Enable Streams on the table Choose StreamViewType (NEW_IMAGE is the most common) 2 Grant Lambda permission to read the stream Attach AWSLambdaDynamoDBExecutionRole or equivalent custom policy 3 Create the Event Source Mapping Set StartingPosition, BatchSize, and bisect-on-error behavior 4 Validate end-to-end Write a test item, check CloudWatch Logs for invocation How DynamoDB Str...

How to Set Up AWS Organizations to Manage Multiple Accounts

When a company outgrows a single AWS account — dev workloads sharing blast radius with production, billing impossible to attribute, security policies applied inconsistently — the answer is almost always AWS Organizations. Setting up separate accounts for dev, staging, and production sounds straightforward, but the real value comes from understanding how Organizational Units, Service Control Policies, and consolidated billing interact before you start moving resources. TL;DR: AWS Organizations Multi-Account Setup Concern AWS Organizations Feature Scope Centralized billing Consolidated billing (automatic) Organization root Environment isolation Separate accounts per env Account level Policy guardrails Service Control Policies (SCPs) OU or account level Account provisioning AWS Organizations API / Control Tower Management account Cross-account access IAM roles with trust policies Member account Ho...