Building a Robust Error Handling System for AWS AppSync APIs with Appsync JS Resolvers
Introduction If you’ve built REST APIs with AWS API Gateway, you know how nice it is to return structured error responses with proper HTTP status codes, error types, and detailed context. Then you switch to GraphQL with AppSync, and suddenly your beautiful error handling becomes… generic. { "errors": [{ "message": "Error" }] } That’s it. No error types. No structured context. Just a string. This doesn’t have to be the case....
Managing Multiple GitHub Accounts from the CLI
The Problem If you use multiple GitHub accounts—for example, a work account and a personal account—you may encounter a frustrating issue when working from the command line: You try to push code to your personal repository, but GitHub rejects it with a permission denied error because it is authenticating as your work account. This happens even though you are the owner of the personal repository. Why This Happens GitHub allows multiple accounts, but Git does not automatically switch identities per repository The CLI (SSH or HTTPS) reuses a cached or default identity As a result, all pushes to github....
Optimizing Amazon CloudWatch Insights Queries With Field Level Indexes for Efficient Log Analytics
Introduction to Amazon CloudWatch Logs Insights Amazon CloudWatch Logs Insights is a powerful tool designed to help developers, DevOps engineers, and cloud administrators extract actionable intelligence from their log data. Whether you’re troubleshooting application errors, monitoring system health, or auditing security events, CloudWatch Logs Insights enables you to query logs in real time using a purpose-built query language. Query Methods: CloudWatch Logs Insights uses a SQL-like syntax with support for commands like:...
AWS SQS With Lambda, Partial Batch Failure Handling: Improved Way
This article is the continuation of one (link) of the previous articles, where I explained how to handle partial batch failures in SQS when using it with AWS Lambda. At the time of writing that article, there was no native way of handling this. Two feasible methods were, either using a batch size of one or deleting each successful message after processing. Quick Recap On, What Happens If One Of The Messages In The Batch Failed To Process....
How to Run AWS Lambda every 10 sec
Recently I had a requirement at work to run a cron job every 10 sec or 30 sec to poll some third-party API to pull some data. There will be more than 40 of these cron parallelly to fetch different sets of data from different APIs. The first obvious option would come to a serverless first mindset which I have is to run these on lambda functions. The only native way in AWS to run the Lambda function is to have an Event bridge trigger with Cron expressions....