Sitemap
Cloud Security

Cybersecurity Attacks and Defenses in a Cloudy World

Member-only story

Using Q To Deploy CloudFront and a TLS Certificate — AI doesn’t always write code that works and can’t always fix it’s own errors

16 min readJun 11, 2025

--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

⚙️ A series on Security Automation. The Code.

🔒 Related Stories: Cybersecurity | Penetration Tests | AI

💻 Free Content on Jobs in Cybersecurity | ✉️ Sign up for the Email List

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

TLDR;

In this post I did some troubleshooting to figure out why my website wasn’t showing up after getting all the stacks to deploy, which was a feat unto itself.

What I figured out was that the code from Q didn’t correctly set the Origin Access Control ID and there were some issues with caching.

While I was fixing that I changed the code to use micro-templates. I moved all the policies into their own template files and reference them in the CloudFront Distribution template by passing them in as parameters. That makes the CloudFront distribution template much more flexible.

I realized that I had to set the Origin Access Control in the CloudFront configuration and I missed the previously.

--

--

Cloud Security
Cloud Security

Published in Cloud Security

Cybersecurity Attacks and Defenses in a Cloudy World

Teri Radichel
Teri Radichel

Written by Teri Radichel

CEO 2nd Sight Lab | Pentesting | Research | AWS Security Hero | Masters of Infosec & Masters Software Engineering | GSE | IANS | SANS Difference Makers Award