<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Tech on Album69</title><link>https://www.album69.com/tech/</link><description>Recent content in Tech on Album69</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sat, 19 Nov 2022 20:02:08 -0600</lastBuildDate><atom:link href="https://www.album69.com/tech/index.xml" rel="self" type="application/rss+xml"/><item><title>Serving the Site over HTTPS with CloudFront</title><link>https://www.album69.com/tech/chapter-2/</link><pubDate>Sat, 19 Nov 2022 20:02:08 -0600</pubDate><guid>https://www.album69.com/tech/chapter-2/</guid><description>&lt;p&gt;In the &lt;a href="https://www.album69.com/tech/chapter-1/"&gt;previous post&lt;/a&gt; I built the site. But a few improvements were needed:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;The website should use https instead of http.&lt;/li&gt;&#10;&lt;li&gt;The S3 bucket should not allow public access.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;So CloudFront is the way to go.&lt;/p&gt;&#10;&lt;p&gt;I followed &lt;a href="https://aws.amazon.com/premiumsupport/knowledge-center/cloudfront-serve-static-website/"&gt;this AWS guide&lt;/a&gt;, using a REST API endpoint as the origin with access restricted by an origin access control (OAC). These were the steps:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;&lt;strong&gt;Apply for two SSL certificates from ACM&lt;/strong&gt; — one for album69.com and one for *.album69.com.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Create two CloudFront distributions&lt;/strong&gt; — one for album69.com and one for &lt;a href="https://www.album69.com"&gt;www.album69.com&lt;/a&gt;. I chose OAC instead of OAI, which is the legacy setting.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Set the alternate domain names&lt;/strong&gt; — album69.com and &lt;a href="https://www.album69.com"&gt;www.album69.com&lt;/a&gt;, each with its corresponding SSL certificate.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Update DNS in Route 53&lt;/strong&gt; — point the A records to the CloudFront distributions.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;h2 id="automation"&gt;Automation&lt;/h2&gt;&#10;&lt;p&gt;The infrastructure itself — S3 buckets, CloudFront distributions, Route 53 records — was built with Terraform (that&amp;rsquo;s another article). For day-to-day publishing, &lt;code&gt;deploy.sh&lt;/code&gt; handles the build, sync, and CloudFront invalidation in one command.&lt;/p&gt;</description></item><item><title>Building This Site with Hugo and S3</title><link>https://www.album69.com/tech/chapter-1/</link><pubDate>Sun, 13 Nov 2022 08:02:08 -0600</pubDate><guid>https://www.album69.com/tech/chapter-1/</guid><description>&lt;p&gt;I&amp;rsquo;m not a web developer, but I wanted a website — a place to showcase my work and prove to myself I could build one. So I spent the Remembrance Day long weekend rebuilding my site from scratch.&lt;/p&gt;&#10;&lt;p&gt;I chose Hugo because it&amp;rsquo;s a fast, modern &lt;em&gt;static site generator&lt;/em&gt;, and AWS S3 for hosting.&lt;/p&gt;&#10;&lt;h2 id="installation"&gt;Installation&lt;/h2&gt;&#10;&lt;p&gt;I work on a Windows 10 machine with WSL2 Ubuntu.&#10;I installed the extended edition of Hugo via Homebrew — &lt;code&gt;sudo apt install hugo&lt;/code&gt; doesn&amp;rsquo;t ship the latest release.&lt;/p&gt;</description></item></channel></rss>