Posts

Automating PlantUML Diagrams in GitHub README with Actions and Confluence Sync

Maintaining up-to-date documentation is crucial for any software project, but manually updating diagrams and keeping documentation synchronized across platforms can be time-consuming and error-prone. This guide demonstrates how to automate the entire workflow using GitHub Actions to generate PlantUML diagrams directly in your repository’s README.md file and automatically synchronize the content to Confluence pages.

The Complete Automation Pipeline

The solution we’ll build consists of three main components: automatic PlantUML diagram generation from source files, embedding those diagrams into the README.md file, and synchronizing the updated content to Confluence. This approach ensures that your documentation stays current with every code change while maintaining consistency across platforms.

Cross-Account Lambda Access to S3: A Complete Implementation Guide

Setting up cross-account access between AWS Lambda and S3 is a common requirement in enterprise environments where resources are distributed across multiple AWS accounts for security, compliance, or organizational reasons. This guide provides a comprehensive walkthrough of establishing secure cross-account access, covering IAM role configuration, bucket policies, and practical implementation patterns.

Cross-account access enables Lambda functions in one AWS account (Account A) to securely access S3 buckets in another account (Account B). This pattern is essential for data processing workflows, backup operations, and multi-account architectures where centralized data storage serves multiple application accounts.

Lambda-to-Lambda Calls vs. SNS Chaining in AWS: When and How to Use Each

Modern serverless architectures often require connecting multiple AWS Lambda functions. Two common patterns are direct Lambda-to-Lambda invocation and chaining via Amazon SNS. This post explains when to use each, with diagrams, CloudFormation templates, and TypeScript code for both approaches.

When to Use Each Pattern

Choosing between direct Lambda-to-Lambda calls and SNS chaining depends on your workflow’s requirements for coupling, reliability, and scalability. While it is technically possible to invoke one Lambda function from another, it is important to understand the implications of doing so synchronously. Synchronous Lambda-to-Lambda calls—where the first function waits for a response from the second—are generally discouraged as a best practice. This is because they can lead to increased latency, higher costs, and more complex error handling, especially if the downstream Lambda experiences throttling or failures. In most cases, tightly coupled, synchronous workflows are better implemented using other AWS services such as Step Functions, which are designed for orchestrating distributed processes with built-in error handling and state management.

Reverting Git Commits Safely: Undoing Changes Without Losing History

When working on complex projects, you’ll inevitably encounter situations where you need to undo changes from a specific commit that’s buried several commits back in your history. Recently, I faced this exact scenario when commit 1d814e5 needed to be reverted from our development branch, but it wasn’t the most recent commit. This post explores the safest and most effective ways to handle this situation.

The Challenge

Looking at a typical git reflog, you might see something like this:

Real-time Data Synchronization: Using DynamoDB Streams and Lambda to Keep OpenSearch Indexes Current

Building modern applications often requires the ability to perform full-text searches with fuzzy matching capabilities on data that’s primarily stored in NoSQL databases like DynamoDB. While DynamoDB excels at fast key-based lookups and can handle massive scale, it lacks the sophisticated search capabilities that applications need for features like autocomplete, typo-tolerant search, and complex text analysis. OpenSearch (the open-source fork of Elasticsearch) provides these advanced search capabilities, but keeping it synchronized with your primary data store presents unique challenges.

Real-time Applications with AWS WebSockets and TypeScript

Modern applications increasingly demand real-time capabilities—from live chat systems and collaborative editing to real-time dashboards and gaming. In this final post of our AWS and TypeScript series, we’ll explore how to build scalable real-time applications using AWS API Gateway WebSocket APIs, Lambda functions, and TypeScript to create robust, type-safe real-time communication systems.

Understanding WebSocket APIs with AWS

AWS API Gateway WebSocket APIs provide a fully managed service for building real-time, bidirectional communication applications. Key advantages include: