I recently got bit by a blocking channel send in Go causing an entire program to hang. I had gorouting thing running on a timer to check something periodically and send results to a channel. Another goroutine was consuming from the channel. Notably, the channel was unbuffered intentially as I assume the consumer would also… Continue reading Beware Blocking Channel Sends in Go
Reading a GZipped File from S3 to Memory in NodeJS
Specifically, I had firehose landing some small-ish files in S3 that were gzipped. Each file has a JSON object per row and I need to get the contents of that file into a lambda for processing. SO needed to use the AWS SDK to call S3, gunzip the contents, and then work with them. The… Continue reading Reading a GZipped File from S3 to Memory in NodeJS
Alarming on a High Lambda Error Rates
AWS Lambda has this nice graph on the monitor page for an indivdiaul lambda function that shows its success rate. Recently I had a lambda that was broken due to a failed build during a terraform apply. Terraform applied fine, but the lambda build didn't include the right dependencies. The result: 100% error rate over...… Continue reading Alarming on a High Lambda Error Rates
Using Docker Health Checks to Wait for Development Environment Services
At PMG we use Docker and Docker Compose to spin up backing services for local development and continuous integration -- think things like databases, cache, or localstack. One challenge, especially in a CI environment, is making sure that the services are up and available before starting test runs. Enter HEALTHCHECK Dockerfiles can contain a HEALTHCHECK… Continue reading Using Docker Health Checks to Wait for Development Environment Services
Cross-Account waitForTaskToken in AWS Step Functions
One small gotcha in AWS Step Functions is that the waitForTaskToken integration pattern only really works within the same AWS account (and region). You must pass task tokens from principals within the same AWS account. The tokens won't work if you send them from principals in a different AWS account. I've been prototyping a set… Continue reading Cross-Account waitForTaskToken in AWS Step Functions
What I Learned at AI Conference
This week I attended AI Conference in San Francisco. I don't really do a lot of work with machine learning or generative AI, but the entire software world is shifting in that direction so... gotta keep up. I'm not particularly bullish on generative AI, but I'd say my mindset shifted to one of cautious, skeptical… Continue reading What I Learned at AI Conference
Deploying a Single SPA Application on AWS
This post is a follow up to Hosting a Single Page Application in AWS. It builds on that article with some specifics for the Single SPA micro frontend famework. There are couple core problems to solve here when using the recommended setup outside of just hosting the applicaiton as described in the article linked above.… Continue reading Deploying a Single SPA Application on AWS
Hosting a Single Page Application in AWS
Last year I started using Single SPA as framework for a microfrontend based single page application. Part of this was figuring out how to even host a single page application in AWS. I wanted to do this without having to run servers and instead rely on AWS services only. This is the solution I arrived… Continue reading Hosting a Single Page Application in AWS
Create Your Own Certificate Authority with Terraform
I did this for an EC2 Client VPN Endpoint and certificate based authentication in a continuous integration environment. It might also be suitable for localhost certificates and is pretty much what Minica or Easy RSA does. But I do a lot of infrastructure work with Terraform, so here we are. Another important note: AWS has… Continue reading Create Your Own Certificate Authority with Terraform
Waiting for MySQL to be Ready in Docker Compose
Had a ... fun thing happen in GitHub Actions today where my tests were starting before the MySQL server they needed was up and running. MySQL in this case was running in Docker compose. So I started my process with a little shell script using mysqladmin: #!/usr/bin/env bash count=0 alive="no" while [ "$count" -lt 5… Continue reading Waiting for MySQL to be Ready in Docker Compose