Articles

Lambda Gotcha: CloudWatch Logs Group Name

Hello! Today's post is a little "gotcha" that sometimes still gets me when I'm developing AWS lambda functions: if you want to stream the function's logs to CloudWatch the log group's name has to follow a specific convention. Suppose I'm creating a lambda function with this CloudFormation snippet: The key piece is this: When AWS … Continue reading Lambda Gotcha: CloudWatch Logs Group Name

CloudFormation Custom Resource: Complete Example

Hello! It takes a few pieces to assemble a working CloudFormation Custom Resource. I like to start from a simple example and build up to what I need. Here's the code I use as a starting point. First, a few notes: My custom resources are usually small, often only a few dozen lines (more than … Continue reading CloudFormation Custom Resource: Complete Example

Cloud Infrastructure: Automating For Security

Hello! The United States National Security Agency (NSA) just published guidance for mitigating cloud vulnerabilities. It reached my inbox via the United States Department of Homeland Security's Cyber Infrastructure (CISA) mailing list. The document covers a bunch of topics and I recommend reading the whole thing, but its "misconfiguration" section contains a guideline that's extra-relevant to … Continue reading Cloud Infrastructure: Automating For Security

PowerShell Install-Module: Use Install-Package Instead

Hello! When I restarted in the Windows ecosystem, I was installing PowerShell modules like this: This is similar to installing a Python package with pip in Linux: Install-Module installs PSDscResources from the PowerShell Gallery. Pip installs Ansible from PyPI. Like the Linux ecosystem, the Windows ecosystem has several package databases. The PS Gallery I linked … Continue reading PowerShell Install-Module: Use Install-Package Instead

Which PowerShell DSC Resources Module To Import

Hello! These three modules all implement various PowerShell DSC resources: PSDesiredStateConfiguration xPSDesiredStateConfiguration PSDscResources That gives us three top-level Import-DSCResource lines we could use in configurations (check out this article for an in-context example): Here are the differences: PSDesiredStateConfiguration is the built-in module that ships in Windows as part of PowerShell 4.0. xPSDesiredStateConfiguration is an experimental version of … Continue reading Which PowerShell DSC Resources Module To Import