subaud

When I stumble upon an unsolved or undocumented problem and solve it, I like to document it here.


Converting Blog Diagrams to Mermaid for AI Readability

Converting Blog Diagrams to Mermaid for AI Readability

How we converted 24 architectural diagrams from images to Mermaid format using Claude and built a streamlined conversion tool

Court Schuett
View Article
Automating Qualtrics Survey Data Downloads with Lambda

Automating Qualtrics Survey Data Downloads with Lambda

Learn how to build a Lambda function that automatically downloads survey response data from Qualtrics using their export API

Court Schuett
View Article
Solving Docker BuildKit Compatibility Issues with Amazon ECS

Solving Docker BuildKit Compatibility Issues with Amazon ECS

A deep dive into resolving Docker BuildKit attestation manifest incompatibilities that prevent ECS deployments, including investigation steps and solutions.

Court Schuett
View Article
Using psycopg2 with AWS Lambda and CDK: Binary vs Source Solutions

Using psycopg2 with AWS Lambda and CDK: Binary vs Source Solutions

Getting psycopg2 to work in AWS Lambda can be frustrating. This post shows you two reliable solutions - using pre-compiled binaries for simplicity, and building from source with Docker for production workloads.

Court Schuett
View Article
Refactoring Blog Search from Pinecone to Claude

Refactoring Blog Search from Pinecone to Claude

How we replaced vector search with AI-powered semantic search using Claude via AWS Bedrock

Court Schuett
View Article
Multi-Environment AWS CDK Deployments in a Single Account

Multi-Environment AWS CDK Deployments in a Single Account

A comprehensive guide to deploying multiple environments in a single AWS account using CDK, featuring sophisticated deployment strategies, GitHub Actions automation, and real-world architectural patterns

Court Schuett
View Article
Adding llms.txt Files to Enhance AI Model Compatibility

Adding llms.txt Files to Enhance AI Model Compatibility

Implementing a generator for llms.txt files to help AI models better understand and reference blog content

Court Schuett
View Article
Secure S3 Image Uploads and Viewing with Presigned URLs and Cognito

Secure S3 Image Uploads and Viewing with Presigned URLs and Cognito

A deep dive into securely managing user-specific image uploads to S3 using presigned URLs and authorizing access for viewing with AWS Cognito.

Court Schuett
View Article
AWS Logs MCP

AWS Logs MCP

Create an MCP server that you can use to access your AWS CloudWatch Logs and CloudTrail events for easier troubleshooting and monitoring

Court Schuett
View Article
Updating Athena Queries for Enhanced Blog Traffic Analysis

Updating Athena Queries for Enhanced Blog Traffic Analysis

Expanding on our CloudFront log analysis with new Athena queries to differentiate bots vs humans, analyze external referrers, and get detailed bot traffic insights.

Court Schuett
View Article
Deep Dive: Building 'alphabetizi.ng'

Deep Dive: Building 'alphabetizi.ng'

Exploring the architecture and interesting features of a serverless survey application built with AWS CDK, React, DynamoDB, and Lambda@Edge

Court Schuett
View Article
Send Email with Microsoft Graph from Lambda

Send Email with Microsoft Graph from Lambda

A detailed guide on sending emails with Microsoft Graph from a Lambda function

Court Schuett
View Article
Analyzing Blog Traffic with CloudFront Logs and Athena

Analyzing Blog Traffic with CloudFront Logs and Athena

A detailed guide on setting up CloudFront logging with Athena to analyze blog traffic patterns and user behavior using CDK

Court Schuett
View Article
Implementing Pinecone Vector Search for Blog Content

Implementing Pinecone Vector Search for Blog Content

A detailed guide on how we implemented semantic search using Pinecone vector database and OpenAI embeddings

Court Schuett
View Article
Securing API Gateway with Lambda@Edge

Securing API Gateway with Lambda@Edge

A detailed guide on implementing secure API Gateway endpoints using Lambda@Edge for request verification and API key management

Court Schuett
View Article
Creating an Animated Wave Logo with React and Tailwind

Creating an Animated Wave Logo with React and Tailwind

A detailed walkthrough of creating a dynamic wave animation using SVG, React, and Tailwind CSS

Court Schuett
View Article
Adding RSS Feeds to a Next.js Static Blog

Adding RSS Feeds to a Next.js Static Blog

A step-by-step guide on how to add RSS, Atom, and JSON feeds to a Next.js static blog using the Feed package

Court Schuett
View Article
Content-Aware GitHub Actions Deployment for Next.js Blog

Content-Aware GitHub Actions Deployment for Next.js Blog

How to set up GitHub Actions workflows that intelligently handle content vs code changes, with automatic PR creation and selective deployments

Court Schuett
View Article
CDK Cognito Protected API Demo with Postman

CDK Cognito Protected API Demo with Postman

In this demo we will see how to deploy a Cognito protected API and test it with Postman using OAuth 2.0 for authentication and login

Court Schuett
View Article
Updated NextJS App deployed to App Runner with SSR and GitHub Actions

Updated NextJS App deployed to App Runner with SSR and GitHub Actions

Updated NextJS App deployed to App Runner with SSR and GitHub Actions

Court Schuett
View Article
Deploying a multi-region pipeline with AWS CDK

Deploying a multi-region pipeline with AWS CDK

This demo will explain how to deploy a multi-region pipeline with AWS CDK by passing parameters between stacks.

Court Schuett
View Article
NextJS App deployed to App Runner with GitHub Actions

NextJS App deployed to App Runner with GitHub Actions

NextJS App deployed to App Runner with GitHub Actions

Court Schuett
View Article
Deploying an NVIDIA NIM to EC2

Deploying an NVIDIA NIM to EC2

In this demo we will see how to deploy an NVIDIA NIM to EC2 with Docker to do your own inference

Court Schuett
View Article
GitHub Insights - Capturing Repository Metrics

GitHub Insights - Capturing Repository Metrics

In this demo we will see how to deploy an application on AWS that will capture insights from GitHub and store them in S3 to be easily queried with Amazon Athena

Court Schuett
View Article
NextJS App deployed to App Runner with CDK

NextJS App deployed to App Runner with CDK

Deploy a NextJS Application to AWS App Runner using CDK

Court Schuett
View Article
cdk-nag with projen

cdk-nag with projen

In this demo we will see how to deploy and test a projen based project with cdk-nag

Court Schuett
View Article
Using Whisper with Streaming Audio

Using Whisper with Streaming Audio

A CDK stack that will deploy a will create an ECS hosted application for streaming audio with gRPC to Whisper and getting the transcription output

Court Schuett
View Article
Bash script to get ECS Fargate Cluster IP Addresses

Bash script to get ECS Fargate Cluster IP Addresses

This simple bash script can be used to get the public and private IP addresses of a Fargate Cluster

Court Schuett
View Article
CDK Deployment of Amazon Bedrock Knowledge Base with OpenSearch Serverless

CDK Deployment of Amazon Bedrock Knowledge Base with OpenSearch Serverless

In this demo we will see how to deploy an Amazon Bedrock Knowledge Base with an OpenSearch Vector Index using CDK

Court Schuett
View Article
Amazon Chime SDK Call Analytics Consumer

Amazon Chime SDK Call Analytics Consumer

A simple React application and related infrastructure that will consume Amazon Chime SDK call analytics events

Court Schuett
View Article
gRPC Streaming Audio with Node

gRPC Streaming Audio with Node

This demo will show you how to deploy and use a gRPC server and client to stream audio and use Amazon Transcribe to analyze the audio

Court Schuett
View Article
CDK Pipeline for ECS hosted NextJS App

CDK Pipeline for ECS hosted NextJS App

A CDK Pipeline example that will deploy a NextJS App on ECS

Court Schuett
View Article
Streaming to KVS with ffmpeg and Node.js

Streaming to KVS with ffmpeg and Node.js

This demo will go through the steps to process a file with ffmpeg and stream the contents to KVS using Node.js

Court Schuett
View Article
Adding feature flags to AWS CDK through runtime context with projen

Adding feature flags to AWS CDK through runtime context with projen

Feature flags can be used to modify the deployment characteristics of a CDK deployment. These feature flags can be enabled in projen by modifying the cdk.json file.

Court Schuett
View Article
CDK Deployment of Docker Image with CodeBuild

CDK Deployment of Docker Image with CodeBuild

In this demo we will see how to deploy a custom built Fargate container using CodeBuild

Court Schuett
View Article
Using CDK to build a Fargate task with AWS Lambda integration

Using CDK to build a Fargate task with AWS Lambda integration

How to build a private Fargate task and connect to it with an AWS Lambda function using AWS CDK.

Court Schuett
View Article
Excluding files and directories from a CDK Bucket Deployment

Excluding files and directories from a CDK Bucket Deployment

When uploading files and directories during a CDK bucket deployment, `exclude` can be used. This samples shows how to use that feature.

Court Schuett
View Article
Deploy a simple EC2 Instance via Cloudformation

Deploy a simple EC2 Instance via Cloudformation

This Cloudformation template will deploy a simple EC2 instance to be used as a development server. Several common packages are included in the deployment and keys can be installed during deployment.

Court Schuett
View Article
Updated CDK Construct with Custom Resources

Updated CDK Construct with Custom Resources

CDK Constructs are a great way to create reusable and flexible code for yourself and others. projen makes it easy to create and publish the project. CDK Custom Resources are a way to do complex deployments and deploy AWS resources not native to CDK within a CDK. In this example, an AWS Lambda will be used as a Custom Resource from a published package.

Court Schuett
View Article
Custom GitHub Action workflows with projen

Custom GitHub Action workflows with projen

This article will show you how to add custom GitHub Actions workflows with Projen

Court Schuett
View Article
Building and Deploying a WebSocket server with Fargate and CDK

Building and Deploying a WebSocket server with Fargate and CDK

This demo will show how to build and deploy a Fargate WebSocket server. This application will automatically scale and use TLS to secure the connection.

Court Schuett
View Article
Creating a React based WebSocket reader for KDS

Creating a React based WebSocket reader for KDS

In this demo, we will be building a React based WebSocket reader that uses Amazon API Gateway to read data from a Kinesis Data Stream

Court Schuett
View Article
Multiple CPU Architecture CDK Deployment of an Asterisk to ECS Fargate

Multiple CPU Architecture CDK Deployment of an Asterisk to ECS Fargate

This CDK will deploy a an Asterisk server to AWS Fargate from multiple CPU architectures

Court Schuett
View Article
Deploy a Cross-Region SPA with Cloudfront using CDK

Deploy a Cross-Region SPA with Cloudfront using CDK

In order to deploy a Certificate with a CloudFront Distribution, a multi-stack CDK must be used to deploy the Certificate in us-east-1 and the SPA in a different Region. This CDK deployment will show how to do that.

Court Schuett
View Article
Deploy a Minecraft server with AWS Fargate and AWS CDK

Deploy a Minecraft server with AWS Fargate and AWS CDK

This demo will use CDK to deploy a Minecraft server on AWS Fargate using Route 53 as the trigger

Court Schuett
View Article
Conditional Resource Deployment and Environment Variables with CDK

Conditional Resource Deployment and Environment Variables with CDK

This demo will describe how to create a CDK with conditional resource deployment and how to use Environment Variables with that conditional deployment

Court Schuett
View Article
Using a Typescript Lambda as a CDK Construct Custom Resource

Using a Typescript Lambda as a CDK Construct Custom Resource

An update to the previous CDK Construct Custom Resource post. This time we will be using Typescript instead of JavaScript for the Lambda function.

Court Schuett
View Article
Deploying a Python Lambda with Requirements using CDK

Deploying a Python Lambda with Requirements using CDK

This article will show you how to deploy a Python Lambda function with additional dependencies using CDK

Court Schuett
View Article
Using CDK to build an RDS database with AWS Lambda integration

Using CDK to build an RDS database with AWS Lambda integration

How to build a private RDS database and connect to it with an AWS Lambda function using AWS CDK.

Court Schuett
View Article
Using PyGitHub to Manage and Track GitHub Repositories

Using PyGitHub to Manage and Track GitHub Repositories

If you need to modify the keys of a Python dictionary, a recursive function can be a useful way to work through the entire dictionary. This [gist](https://gist.github.com/schuettc/3875da7458e3573646599e70b7b17a61) is an example of how to do that.

Court Schuett
View Article
snake_to_PascalCase

snake_to_PascalCase

A twist on the previous [Recursively Modify Python Dictionary](/content/blog/recursively-modify-python-dictionary.md), this function will modify a Python dictionary to convert snake_case keys to PascalCase keys.

Court Schuett
View Article
Deploying a NextJS SSR Application to Amplify

Deploying a NextJS SSR Application to Amplify

[NextJS](https://nextjs.org/learn/foundations/about-nextjs/what-is-nextjs) is a powerful React framework that we can use to deploy directly from GitHub to [AWS Amplify](https://aws.amazon.com/amplify/). We will also be using [CodeSandbox](https://codesandbox.io/docs/overview) to work with the code before deploying.

Court Schuett
View Article
Create AMI CDK Construct

Create AMI CDK Construct

Creating an [AMI](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIs.html) (Amazon Machine Image) can be done via the AWS Console. It can also be created via AWS CLI or SDKs. This CDK Construct will assist with the creation of an AMI as part of a [CDK](https://aws.amazon.com/cdk/) deployment.

Court Schuett
View Article
Recursively Modify Python Dictionary

Recursively Modify Python Dictionary

If you need to modify the keys of a Python dictionary, a recursive function can be a useful way to work through the entire dictionary. This [gist](https://gist.github.com/schuettc/3875da7458e3573646599e70b7b17a61) is an example of how to do that.

Court Schuett
View Article
A CDK Construct for Importing Amazon Lex Bots

A CDK Construct for Importing Amazon Lex Bots

To add on to the previous [article](https://subaud.io/importing-an-amazon-lex-bot-with-cdk/) that described how to import an Amazon Lex Bot with CDK, I have created a [CDK Construct](https://constructs.dev/packages/cdk-lex-zip-import/v/0.0.4?lang=typescript) that you can import and use in your own CDK projects.

Court Schuett
View Article
Importing an Amazon Lex Bot with CDK

Importing an Amazon Lex Bot with CDK

Amazon Lex Bots are a way to use natural language conversational interfaces that can be used through a variety of integrations such as Facebook and Slack. A Lex Bot can be built and deployed through the AWS console. However, it can also be deployed by CDK, Cloudformation, or SDK. In this post, I will explain how to import an existing Lex Bot using CDK and SDK.

Court Schuett
View Article
Creating a Full Stack App with CDK Pipelines

Creating a Full Stack App with CDK Pipelines

This example will build a CDK Pipeline that will build a backend and frontend and then pass API Gateway URL information from the backend to the frontend. This information can be used to make calls to the backend without having to manually pass the URL information. When connected to a Github repo, the CDK pipeline will automatically trigger and rebuild so changes to any portion of the app through GitHub.

Court Schuett
View Article
Building an EC2 Instance with CDKv2 and Cloud-Init

Building an EC2 Instance with CDKv2 and Cloud-Init

Cloud-init is a powerful way of configuring an EC2 instance. CDK can create an EC2 instance and use cloud-init to pass dynamically created variables to this EC2 instance which can be used to configure the instance. When combined, these tools can be used to create fully configured and deployed dynamic EC2 instances.

Court Schuett
View Article
Building CDK Custom Resource Constructs with projen and Typescript

Building CDK Custom Resource Constructs with projen and Typescript

CDK Constructs are a great way to create reusable and flexible code for yourself and others. projen makes it easy to create and publish the project. CDK Custom Resources are a way to do complex deployments and deploy AWS resources not native to CDK within a CDK. In this example, an AWS Lambda will be used as a Custom Resource from a published package.

Court Schuett
View Article
Setting up a shell for multiple AWS accounts

Setting up a shell for multiple AWS accounts

Managing multiple AWS accounts with AWS CLI can be a challenge. Here is how I set up my macOS terminal. This configuration will set up a terminal shell that will show your AWS account and git information in the prompt. The example provided includes access key and SSO with MFA logins.

Court Schuett
View Article
Building ARM64 Infrastructure with CDK Pipelines

Building ARM64 Infrastructure with CDK Pipelines

When building ARM64 resources with CDK Pipelines, it is necessary to have them built using an ARM64 Image with CodeBuild.

Court Schuett
View Article
Installing SIPp on Amazon Linux 2 Instance

Installing SIPp on Amazon Linux 2 Instance

Simple bash script to download and compile [SIPp](https://github.com/SIPp/sipp.git) on an Amazon Linux 2 instance. This can take a while to build because of the cmake dependency.

Court Schuett
View Article
Bulk Delete S3 Objects by LastModified Date

Bulk Delete S3 Objects by LastModified Date

This simple script will look through a bucket to find all objects that match a `LastModified` date and delete. This can be adjusted to delete objects before, after, or matching the date specified. Use at your own risk.

Court Schuett
View Article
Updated Full Stack Deployment - Single Stack

Updated Full Stack Deployment - Single Stack

Previously, we looked at how to use CDK Pipelines to create a [full stack deployment](https://subaud.io/creating-a-full-stack-app-with-cdk-pipeline/). This deployment used multiple Cloudformation stacks to create a front-end and back-end. This example will show a similar process, but uses a new technique that will allow us to use a single stack to deploy both front-end and back-end while still maintaining the ability to work on the front-end locally.

Court Schuett
View Article