Using V2 CloudFront Logs via CloudFormation

CloudFront supports two logging modes: v2 logging and legacy logging. Naturally, you’d expect to use the newer v2 logging—but if you’re provisioning CloudFront with CloudFormation, it’s easy to end up with the legacy setup by accident. If you use the Logging property in your AWS::CloudFront::Distribution, CloudFormation will default to legacy logging, writing directly to S3. There’s currently no way to switch this to v2 via the Logging property in CloudFormation. To enable v2 logging, you have to take a different approach: ...

May 22, 2025 · 1 min · Kevin Sookocheff

How to create a functional VPC using CloudFormation

This tutorial walks through how to create a fully functional Virtual Private Cloud in AWS using CloudFormation. At the end of the tutorial, you will have a reproducible way to create a virtual cloud with three subnets, a security group, and an internet gateway with SSH access for your IP address. I’ve found this template useful for creating an isolated environment to develop and test software. Full code for this tutorial is available on Github. ...

June 7, 2017 · 5 min · Kevin Sookocheff