Engineering notes

Practical posts on AWS, DevOps, Laravel, and running software in production.

50 articles 59 topics 14 comments

RSS feed

Articles

50 articles

Top 8 Load Balancer Algorithms You Should Know About

Top 8 Load Balancer Algorithms You Should Know About

8 ways a balancer picks the next server. Each one has its own picture, under the section that explains it.

Oct 10, 202611 min read5 all-time views
DevopsAWS
Read article
I Stopped Putting an ALB in Front of My Private MCP Just for TLS

I Stopped Putting an ALB in Front of My Private MCP Just for TLS

AgentCore Gateway can now trust your private CA on VPC Lattice MCP, OpenAPI, and HTTP targets. Here is the API shape, what Terraform still cannot express, and the expiry alarm I would add.

Oct 5, 20269 min read9 all-time views
MCPAWSTerraformSecurity
Read article
Fix Remote MCP 401 Errors: three panels for discover, log in, and validate, with the takeaway to find the failed request before rotating keys.

MCP Authentication Explained: Fix 401 Errors in a Remote MCP Server

Debug remote MCP authentication step by step: OAuth discovery, callback failures, token audiences, scopes, and AWS API Gateway responses.

Sep 26, 20269 min read35 all-time views
MCPOAuthAWSSecurity
Read article
Why Your Terraform State Is More Sensitive Than Your .env File

Why Your Terraform State Is More Sensitive Than Your .env File

Terraform state can contain passwords, access keys, and a map of your infrastructure. Here is how I keep it out of Git, lock it in S3, and limit who can read it.

Sep 19, 20269 min read25 all-time views
AWSTerraformSecurityDevops
Read article
Persistence Is Not Permission: Re-Auth RAG Citations on Chat Replay

Persistence Is Not Permission: Re-Auth RAG Citations on Chat Replay

A contractor lost access to a folder in March and could still read the source cards from it in September, because our chat history endpoint served citations that had been authorized once, at write time, and never again. Here's the fix on API Gateway, Lambda, DynamoDB, and pgvector: store citation refs instead of blobs, re-run the live entitlement check on every history read, tombstone what the caller can no longer see, and fail closed on both unknown and denied sessions.

Aug 29, 202615 min read41 all-time views
AWSLambdaDynamoDBRAG
Read article
MCP Went Stateless and Broke My Lambda MCP Server Anyway

MCP Went Stateless and Broke My Lambda MCP Server Anyway

The 2026-07-28 MCP spec deleted the initialize handshake and Mcp-Session-Id, which should have been free for a Lambda server that was already stateless. It wasn't: a CORS allow-list, a missing server/discover, a 404 that should have been a 405, and a notification stream an HTTP API can't hold open all broke behind API Gateway.

Aug 19, 202613 min read41 all-time views
MCPAWSLambdaServerless
Read article
Chunk, Embed, Index: Running RAG Ingestion as a Step Functions State Machine

Chunk, Embed, Index: Running RAG Ingestion as a Step Functions State Machine

A re-run of a failed ingestion job left me with duplicate vectors and worse retrieval. Here's the Step Functions state machine I built instead: a Distributed Map over chunks, retries tuned to Bedrock throttling, content-hash idempotency, and a quarantine path for documents that just won't parse.

Aug 8, 202613 min read32 all-time views
AWSStep FunctionsLambdaRAG
Read article
When Your App Outgrows the Tool That Built It

When Your App Outgrows the Tool That Built It

A 15-year-old ERP on Zend Framework 1 and an app an AI wrote last week hit the same wall: code that worked yesterday can't carry tomorrow's scale. Here's the migration that turned that pattern into two services.

Jul 27, 20266 min read35 all-time views
MigrationArchitectureAIScaling
Read article
AI Endpoints Aren't CRUD: Post-Generate Validation on Lambda + Bedrock + Fastify

AI Endpoints Aren't CRUD: Post-Generate Validation on Lambda + Bedrock + Fastify

A Bedrock-backed Fastify route on Lambda needs a contract after the model answers, not just before it. Zod on the output, RAG context treated as untrusted data, one repair pass then a 422, idempotent SQS, and the CloudWatch metrics that catch it drifting.

Jul 25, 202612 min read27 all-time views
AWSBedrockLambdaFastify
Read article
How I Lock Down Bedrock Access So My Lambda Functions Can't Leak Data Through the LLM

How I Lock Down Bedrock Access So My Lambda Functions Can't Leak Data Through the LLM

How to scope Bedrock IAM policies per Lambda function, build permission boundaries that block privilege escalation, catch misconfigurations with CloudTrail, and automate guardrails in CI so AI agents can't widen your blast radius.

Jul 11, 20269 min read60 all-time views
AWSBedrockIAMSecurity
Read article
Lambda SnapStart with Terraform - Cutting Cold Starts Without the Hacks

Lambda SnapStart with Terraform - Cutting Cold Starts Without the Hacks

How to enable Lambda SnapStart for Java and Python runtimes using Terraform, measure cold start improvements, and compare costs against provisioned concurrency.

Jul 7, 20268 min read40 all-time views
AWSLambdaTerraformServerless
Read article
Moving Past Vibe Coding: The Pre-Merge Checklist I Now Run on Every AI-Generated PR

Moving Past Vibe Coding: The Pre-Merge Checklist I Now Run on Every AI-Generated PR

AI agents write code fast. They also write bugs, security holes, and nonsense. Here is the 12-item checklist I run before merging anything an agent touched.

Jul 7, 202613 min read45 all-time views
AWSAIDevOpsTerraform
Read article
Running Long AI Workloads on Lambda MicroVMs Without Going Broke

Running Long AI Workloads on Lambda MicroVMs Without Going Broke

How to run long AI inference workloads on AWS Lambda MicroVMs with real cost controls, timeout handling, and concurrency management.

Jun 27, 202612 min read56 all-time views
AWSLambdaServerlessAI
Read article
How I Use Step Functions to Orchestrate LLM Workflows Without Chaining Lambdas

How I Use Step Functions to Orchestrate LLM Workflows Without Chaining Lambdas

Lambda chaining for multi-step AI workflows gets messy fast. Failed steps, retries, timeouts, and idle billing. Here is how I replaced manual Lambda chaining with AWS Step Functions for LLM orchestration.

Jun 27, 202611 min read57 all-time views
AWSStep FunctionsLambdaLLM
Read article
ECS Fargate Spot + Capacity Providers - Saving 70% on Container Hosting

ECS Fargate Spot + Capacity Providers - Saving 70% on Container Hosting

How to use Fargate Spot capacity providers to reduce container costs by up to 70%, with real Terraform configurations and interruption handling strategies.

Jun 21, 20269 min read44 all-time views
AWSECSFargateCost Optimization
Read article
Building Bedrock Agents in Production - Knowledge Bases, Action Groups, and Guardrails

Building Bedrock Agents in Production - Knowledge Bases, Action Groups, and Guardrails

How to build a production-ready Bedrock Agent with S3 knowledge bases, Lambda action groups, and guardrails, all configured with Terraform.

Jun 18, 202611 min read51 all-time views
AWSBedrockAILambda
Read article
AWS WAF + CloudFront for a Solo Dev - Rate Limiting, Bot Control, and IP Blocking

AWS WAF + CloudFront for a Solo Dev - Rate Limiting, Bot Control, and IP Blocking

How to set up AWS WAF in front of CloudFront for a solo-built application, with rate limiting, bot control, and IP block rules, all managed with Terraform.

Jun 16, 202610 min read36 all-time views
AWSWAFCloudFrontSecurity
Read article
How I Migrated a Lambda AI App to Bedrock’s OpenAI-Compatible APIs Without Rewriting Everything

How I Migrated a Lambda AI App to Bedrock’s OpenAI-Compatible APIs Without Rewriting Everything

A practical migration story about moving a Lambda AI app from a custom OpenAI-style integration to Amazon Bedrock without rewriting the whole codebase

Jun 6, 202611 min read43 all-time views
AWSAILambdaBedrock
Read article
How I Add LLM Observability to a Real AWS App with Langfuse, Lambda, and CloudWatch

How I Add LLM Observability to a Real AWS App with Langfuse, Lambda, and CloudWatch

How I connect Langfuse, Lambda, and CloudWatch so I can trace prompt behavior, cost, retries, and failures in a production AWS app

Jun 3, 202610 min read30 all-time views
AWSAIDevopsServerless
Read article
How I Review Terraform and Lambda PRs with AI Before They Merge

How I Review Terraform and Lambda PRs with AI Before They Merge

How I use AI as a first-pass reviewer for Terraform and Lambda pull requests, while keeping human judgment on the risky parts

Jun 3, 20267 min read36 all-time views
AWSAIDevopsTerraform
Read article
How I Make AI Coding Agents Safe in a Real AWS Codebase

How I Make AI Coding Agents Safe in a Real AWS Codebase

The guardrails, permissions, and review flow I use so coding agents can help without touching the wrong AWS resources

Jun 3, 20267 min read37 all-time views
AWSAIDevopsTypeScript
Read article
Serverless AI Inference API with AWS Bedrock and Lambda

Serverless AI Inference API with AWS Bedrock and Lambda

Build a serverless AI inference API on Bedrock and Lambda: a basic endpoint, streaming through Function URLs, multi-model routing, and real cost math.

May 16, 202617 min read104 all-time views
AWSserverlessAIlambda
Read article
5 AWS Mistakes That Are Quietly Draining Your Bank Account

5 AWS Mistakes That Are Quietly Draining Your Bank Account

A client messaged me in a panic last month. Their AWS bill had crossed $3,000 and they had no idea why. They assumed that's just what AWS costs at their scale. A serverless SaaS, decent traffic, nothi

May 12, 202616 min read69 all-time views
AWSDevopsserverlessCloud
Read article
Multi-Agent Claude Code Routines for AWS DevOps

Multi-Agent Claude Code Routines for AWS DevOps

One Claude Code Session Isn't Enough Anymore I love a single Claude Code session. It's where most of my real work happens, plan in one pane, code in the other, terminal humming along. But here's the t

May 9, 202617 min read82 all-time views
AWSDevopsTerraformClaudeCode
Read article
Serverless Laravel Containers with ECS Fargate, App Runner, and Terraform

Serverless Laravel Containers with ECS Fargate, App Runner, and Terraform

Deploy Laravel on ECS Fargate with Terraform. Compare queue workers and web hosting with App Runner, which is now limited to existing customers.

May 2, 202620 min read97 all-time views
LaravelAWSDockerTerraform
Read article
Building a Multi-Tenant Billing System on AWS Lambda with Stripe

Building a Multi-Tenant Billing System on AWS Lambda with Stripe

In the last post I walked through the multi-tenant auth layer running in front of my Fastify API on AWS Lambda. JWT tokens, hashed API keys, tenant context decorated onto every request. That solved th

Apr 25, 202621 min read59 all-time views
AWSserverlessNode.jsstripe
Read article
How to Deploy an MCP Server on AWS Lambda (Streamable HTTP)

How to Deploy an MCP Server on AWS Lambda (Streamable HTTP)

How I deployed a remote MCP server on AWS Lambda behind API Gateway: stateless Streamable HTTP, API key auth, CloudFormation, and Claude Desktop setup.

Apr 20, 202620 min read98 all-time views
AWSserverlessAImcp
Read article
GitHub Actions + Terraform CI/CD for AWS Lambda with OIDC

GitHub Actions + Terraform CI/CD for AWS Lambda with OIDC

My GitHub Actions pipeline for AWS Lambda and Terraform: OIDC deploys with no stored AWS keys, S3 state locking, a prod approval gate, and alias rollback.

Apr 18, 202619 min read108 all-time views
AWSTerraformGitHub ActionsDevops
Read article
Serverless Laravel on AWS Lambda with Bref and Terraform

Serverless Laravel on AWS Lambda with Bref and Terraform

Why Bref Instead of Vapor Laravel Vapor is the official serverless deployment tool for Laravel. It works. I've used it on two client projects. But it costs $399 per year just for the subscription, and

Apr 18, 202619 min read87 all-time views
LaravelAWSserverlessTerraform
Read article
Building a Multi-Tenant SaaS Auth Layer on AWS Lambda with Fastify

Building a Multi-Tenant SaaS Auth Layer on AWS Lambda with Fastify

I have a production SaaS running on AWS Lambda with Fastify. Single tenant, single customer, everything working great. Then the second customer signed up. That's when things got interesting. Suddenly

Apr 11, 202614 min read83 all-time views
AWSserverlessNode.jsfastify
Read article
Deploying a Laravel Application to Amazon EC2 Using Terraform

Deploying a Laravel Application to Amazon EC2 Using Terraform

Not everything needs to be serverless. I know, I know. I literally write about Lambda and API Gateway all the time. But look, sometimes you just need a single EC2 instance running your Laravel app and

Apr 11, 202614 min read71 all-time views
TerraformAWSLaravelDevops
Read article
Building a Production RAG Pipeline on AWS Lambda and pgvector

Building a Production RAG Pipeline on AWS Lambda and pgvector

I was knee-deep in building my SaaS when users started asking questions I couldn't answer from the UI alone. My app had a solid backend, Lambda functions, Fastify, PostgreSQL on RDS. I wrote about tha

Apr 4, 202622 min read84 all-time views
AWSserverlessAIPostgreSQL
Read article
Claude Code + Terraform on AWS: My Agentic DevOps Workflow

Claude Code + Terraform on AWS: My Agentic DevOps Workflow

How I use Claude Code with Terraform on AWS: a CLAUDE.md for infra, a validate hook, and piping terraform plan to Claude to catch IAM and downtime risks.

Mar 28, 202615 min read273 all-time views
AWSDevopsTerraformClaudeCode
Read article
Everything New in Laravel 13: The Complete Guide

Everything New in Laravel 13: The Complete Guide

Laravel 13 dropped on March 17, 2026, and I've spent the last two days digging through every commit, PR, and doc page. There's a lot to unpack here. This isn't one of those "minor version bump" releas

Mar 23, 202611 min read66 all-time views
LaravelPHPwebdevAI
Read article
Running OpenClaw on Amazon EC2 with Claude and Telegram

Running OpenClaw on Amazon EC2 with Claude and Telegram

I stumbled on OpenClaw a few weeks ago and immediately wanted to try it. The pitch is straightforward: it's an open-source AI gateway that connects LLMs to messaging platforms like Telegram, Discord,

Mar 20, 20269 min read120 all-time views
AWSAIec2telegram
Read article
Running AI Background Jobs Serverlessly with SQS + Lambda + Bedrock

Running AI Background Jobs Serverlessly with SQS + Lambda + Bedrock

Queue document analysis, summarization, and classification with SQS. Process them with Lambda and Bedrock. No servers, no polling, no wasted spend.

Mar 19, 202616 min read33 all-time views
AWSServerlessAISQS
Read article
WebSocket AI Chat with Lambda, API Gateway, and Bedrock

WebSocket AI Chat with Lambda, API Gateway, and Bedrock

Stream Bedrock tokens to the browser over API Gateway WebSockets with three Lambda functions and DynamoDB, plus the 410 GoneException fix and real costs.

Mar 19, 202616 min read106 all-time views
AWSServerlessAIWebsockets
Read article
How I Architected a Fully Serverless SaaS on AWS Lambda with Fastify

How I Architected a Fully Serverless SaaS on AWS Lambda with Fastify

I recently built a multi-tenant SaaS API from scratch. The product uses AI models under the hood and re-trains them regularly on new data. The requirements were pretty clear: low operational overhead,

Mar 18, 202618 min read51 all-time views
AWSserverlessNode.jsfastify
Read article
How to Use AWS SageMaker for HIPAA-Compliant Data: A Complete Guide

How to Use AWS SageMaker for HIPAA-Compliant Data: A Complete Guide

Healthcare organizations are increasingly turning to machine learning to improve patient outcomes, reduce costs, and enhance operational efficiency. However, when working with protected health information (PHI), compliance with the Health Insurance P...

Sep 6, 20258 min read82 all-time views
AWSsagemaker hippa complianceModel
Read article
Deploy Laravel Application to Amazon EC2 Instance

Deploy Laravel Application to Amazon EC2 Instance

Everyone loves to deploy their applications to the Amazon EC2 instance. It's easy to deploy and maintain. This tutorial will launch a Laravel application to an EC2 instance. What is EC2? Amazon Elastic Compute Cloud (EC2) is one of the first offering...

Aug 26, 20235 min read47 all-time views
ec2LaravelAmazon Web ServicesDevops
Read article
How to Start Learning AWS Cloud ☁️ and Get Certified 🚀

How to Start Learning AWS Cloud ☁️ and Get Certified 🚀

Hi 👋I recently passed the last and final AWS certifications. I am now fully AWS certified with all 12 certifications under my belt. Software engineers from all different levels frequently asked me how I learned AWS and how they should get started. O...

Jul 29, 20235 min read46 all-time views
AWSAmazon Web ServicesAWSCommunityAWS Certified Solutions Architect Associate
Read article
First 3 things I always do after creating a new AWS account

First 3 things I always do after creating a new AWS account

As part of my job, I create AWS accounts frequently. I do lots of things depending on account needs before starting to use it. I found 3 common things I do with all of the new AWS accounts. I made a checklist. Nowadays I do these 3 things first and t...

Jul 6, 20225 min read82 all-time views
AWSIAMSecurityAmazon Web Services
Read article
Install Cloud Watch Agent in Amazon Lightsail instance for Monitoring, Logging & Debugging

Install Cloud Watch Agent in Amazon Lightsail instance for Monitoring, Logging & Debugging

Use the Cloud Watch agent to send logging and debugging to Cloud Watch. You can check logs without logging into instances. It's accessible even after the instance is terminated. Life is far from perfect, and so does Amazon Lightsail instances. It can...

Jun 4, 20224 min read73 all-time views
AWSAmazon Web ServicesCloudec2
Read article
Connect Redis/Elasticache to application in Amazon Lightsail instance

Connect Redis/Elasticache to application in Amazon Lightsail instance

You can create Redis/Elasticache even though Amazon Lightsail doesn't offer it. You can create an Elasticache for Redis cluster in AWS and connect using VPC Peering. Prerequisites An Amazon Lightsail instance. To create a new instance follow Deploy...

May 28, 20224 min read58 all-time views
AWSRedisec2Cloud
Read article
Add Lightsail Load Balancer to Application hosted in Amazon Lightsail instance(s)

Add Lightsail Load Balancer to Application hosted in Amazon Lightsail instance(s)

Lightsail offers Load Balancer. It's very easy to provision one and attach one or multiple instances to it. Let's create one and attach instances to it. Prerequisites You need one or more Amazon Lightsail instances to attach to the load balancer in ...

May 28, 20223 min read68 all-time views
AWSec2CloudBeginner Developers
Read article
Add Database to Application hosted in Amazon Lightsail

Add Database to Application hosted in Amazon Lightsail

Amazon Lightsail offers dedicated Databases. You can make use of it instead of an on-instance database. It's easy, managed, secure, and most importantly it's not tied to the instance. So, your database will be safe even if instance crashes. In "Deplo...

May 23, 20223 min read48 all-time views
AWSDatabasesCloudLaravel
Read article
Deploy Laravel Application to Amazon Lightsail

Deploy Laravel Application to Amazon Lightsail

Amazon Lightsail is a fixed monthly priced VPS service offered by AWS. Once you install the OS of your choice, you can run almost any application. In this application, I'm showing how to deploy one of my favorite backend frameworks called Laravel. Wh...

May 19, 20225 min read65 all-time views
AWSCloudLaravelBeginner Developers
Read article
Snapshot and Restore of Amazon Lightsail Instance to Lightsail/EC2

Snapshot and Restore of Amazon Lightsail Instance to Lightsail/EC2

Taking regular backup/snapshots of a production application is important. It is one of the main requirements of a disaster recovery(DR) plan. But snapshots are not only for DR, you can use them to move/clone instances to different regions or availabi...

May 12, 20225 min read143 all-time views
AWSCloudWordPressLaravel
Read article
Add (Cloudfront) CDN Distribution to WordPress Application hosted on Amazon Lightsail

Add (Cloudfront) CDN Distribution to WordPress Application hosted on Amazon Lightsail

It's not very hard to add CDN Distribution to a WordPress app hosted on Amazon Lightsail. But if you are new, it can be cumbersome. This article is to demonstrate how to do it easily. Why Should I use CDN distribution? You might hear about Content D...

May 10, 20223 min read83 all-time views
AWSWordPressCDNAmazon Web Services
Read article
Deploy WordPress App to Amazon Lightsail

Deploy WordPress App to Amazon Lightsail

Introduction AWS Lightsail can be the easiest entry to the AWS Cloud. It has fixed monthly pricing unlike most other services, so you don't have to worry about a huge monthly bill. Lightsail is really great for small to medium apps. It has out-of-th...

Apr 27, 20225 min read59 all-time views
AWSAmazon Web ServicesWordPressdevelopment
Read article

Latest updates

Get new articles in your feed.

Follow the RSS feed to read new posts in your favorite reader.