CodePipeline: Python AWS Lambda Functions Without Timeouts

Hello! If you're new to CodePipeline lambda actions check out this complete example first. There’s a gotcha when writing CodePipeline lambda functions that’s easy to miss and if you miss it your pipeline can get stuck in timeout loops that you can't cancel. Here’s how to avoid that. This article assumes you're familiar with CodePipeline … Continue reading CodePipeline: Python AWS Lambda Functions Without Timeouts

Boto3 Best Practices: Assert to Stop Silent Failures

Good morning! Today's post covers a pattern I use to increase my confidence that my infrastructure code is working. It turns silent errors into loud ones. I've handled plenty of code that runs without errors but still ends up doing the wrong thing, so I'm never really sure if it's safe to go to sleep … Continue reading Boto3 Best Practices: Assert to Stop Silent Failures

CloudFormation Custom Resources: Avoiding the Two Hour Exception Timeout

If you're new to custom resources check out this complete example first. There's a gotcha when writing CloudFormation Custom Resources that's easy to miss and if you miss it your stack can get stuck, ignoring its timeout setting. It'll fail on its own after an hour, but if it tries to roll back you have … Continue reading CloudFormation Custom Resources: Avoiding the Two Hour Exception Timeout

Lambda: boto3 CloudWatch Logs

Good morning! If you're writing a regular script (i.e. not a lambda function), check out this article. This pattern outputs traditional delimited strings. If you want to upgrade that into output structured as JSON objects, check out this article. For those custom cases that don't fit into Terraform or CloudFormation, a little bit of Python and some … Continue reading Lambda: boto3 CloudWatch Logs