<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[One Twenty Three Cloud Street]]></title><description><![CDATA[I solve problems and this is where I explain my process]]></description><link>https://www.123cloud.st</link><image><url>https://substackcdn.com/image/fetch/$s_!9sou!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F667029b3-ccad-4dd5-9942-e4ffa32e2dc6_256x256.png</url><title>One Twenty Three Cloud Street</title><link>https://www.123cloud.st</link></image><generator>Substack</generator><lastBuildDate>Tue, 28 Apr 2026 12:32:58 GMT</lastBuildDate><atom:link href="https://www.123cloud.st/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Will Laws]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[123cloudst@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[123cloudst@substack.com]]></itunes:email><itunes:name><![CDATA[Will Laws]]></itunes:name></itunes:owner><itunes:author><![CDATA[Will Laws]]></itunes:author><googleplay:owner><![CDATA[123cloudst@substack.com]]></googleplay:owner><googleplay:email><![CDATA[123cloudst@substack.com]]></googleplay:email><googleplay:author><![CDATA[Will Laws]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[Is your team busy or productive]]></title><description><![CDATA[You can't have both?]]></description><link>https://www.123cloud.st/p/is-your-team-busy-or-productive</link><guid isPermaLink="false">https://www.123cloud.st/p/is-your-team-busy-or-productive</guid><dc:creator><![CDATA[Will Laws]]></dc:creator><pubDate>Wed, 18 Feb 2026 01:57:50 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!qy65!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1ae7c36-bb7b-4e83-8bfd-964b3b97e495_4032x2268.heic" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>Hey this one is long <s>SORRY?</s> If you have 15min to read it I hope you take the time but if not, save it for later when you&#8217;re in a meeting you&#8217;re not really invested in and see if it helps.</strong> </p><div><hr></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!qy65!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1ae7c36-bb7b-4e83-8bfd-964b3b97e495_4032x2268.heic" data-component-name="Image2ToDOM"><div class="image2-inset image2-full-screen"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!qy65!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1ae7c36-bb7b-4e83-8bfd-964b3b97e495_4032x2268.heic 424w, https://substackcdn.com/image/fetch/$s_!qy65!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1ae7c36-bb7b-4e83-8bfd-964b3b97e495_4032x2268.heic 848w, https://substackcdn.com/image/fetch/$s_!qy65!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1ae7c36-bb7b-4e83-8bfd-964b3b97e495_4032x2268.heic 1272w, https://substackcdn.com/image/fetch/$s_!qy65!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1ae7c36-bb7b-4e83-8bfd-964b3b97e495_4032x2268.heic 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!qy65!,w_5760,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1ae7c36-bb7b-4e83-8bfd-964b3b97e495_4032x2268.heic" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c1ae7c36-bb7b-4e83-8bfd-964b3b97e495_4032x2268.heic&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;full&quot;,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1236189,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/heic&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.123cloud.st/i/158741071?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1ae7c36-bb7b-4e83-8bfd-964b3b97e495_4032x2268.heic&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-fullscreen" alt="" srcset="https://substackcdn.com/image/fetch/$s_!qy65!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1ae7c36-bb7b-4e83-8bfd-964b3b97e495_4032x2268.heic 424w, https://substackcdn.com/image/fetch/$s_!qy65!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1ae7c36-bb7b-4e83-8bfd-964b3b97e495_4032x2268.heic 848w, https://substackcdn.com/image/fetch/$s_!qy65!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1ae7c36-bb7b-4e83-8bfd-964b3b97e495_4032x2268.heic 1272w, https://substackcdn.com/image/fetch/$s_!qy65!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1ae7c36-bb7b-4e83-8bfd-964b3b97e495_4032x2268.heic 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><h2>Is Your Team Busy or Productive?</h2><p>I&#8217;m at my in-laws&#8217; place in <s>&lt;redacted&gt; </s>North America, it&#8217;s 2am <s>because my body still thinks it&#8217;s tomorrow afternoon in Sydney</s>, my ankle has been recovering from a trimalleolar fracture/break and full dislocation for a month now, I&#8217;m laying on the floor watching my baby sleep next to me and I&#8217;m doing what any reasonable person does when <s>jet-lagged</s> taking care of their baby <s>and unable to sleep</s>: syncing files to my NAS on the other side of the planet.</p><p>Look, I had a reason. There were photos. The kid did something cute and the grandparents wanted copies and somehow this turned into &#8220;I should just pull down those files I&#8217;ve been meaning to organise&#8221; which turned into me staring at transfer speeds at 2am while everyone else sleeps.</p><p>The connection was surprisingly good. I&#8217;d expected the usual transpacific misery, with LEAST DOLLAR cost routing instead of least path cost,  but somewhere between my in-laws&#8217; surprisingly decent internet and whatever routing <s>magic</s> was happening across the Pacific, I was getting respectable bandwidth that could saturate my <s>shitty</s> NBN link back home; iperf3 even confirmed!</p><p>And yet.</p><p>The transfer was crawling.</p><p>So I did what any normal person would do: I SSH&#8217;d into my home lab from my father-in-law&#8217;s guest room and started investigating where my bottleneck actually was.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.123cloud.st/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">One Twenty Three Cloud Street is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><div><hr></div><h3>The Problem With Asking &#8220;Am I Max&#8217;d Out?&#8221;</h3><p>The first thing I checked was network. Was I actually saturating the link?  no. Not even close. The bandwidth was there. The route was clean. The packets were flowing. <s>Send that switch some packets, Switches love packets</s></p><p>Then I remembered.</p><p>Right before we left for this trip, I&#8217;d replaced a drive in the NAS. One of the eight drives had started throwing SMART warnings, the kind that say &#8220;I&#8217;m not dead yet but I&#8217;m thinking about it&#8221; and I swapped it out the night before we flew. After an emergency trip to Centrecom. Responsible <s>typical</s> sysadmin behaviour. </p><p>Future Will would thank me. Present Will is LIVID.</p><p>The SHR2 array was still rebuilding.</p><p>For those fortunate enough to have never experienced this particular joy: SHR2 is Synology&#8217;s version of RAID 6. Two drives can fail before you lose data. Very safe. <s>Very sensible - it's a home lab, nothing is sensible</s>. But when you replace a drive, the array has to <s>reticulate splines </s>recalculate parity across all remaining drives and write it to the new one. This involves reading from <em>every other disk</em> and writing to the new one, continuously, for <s>hours or</s> days depending on array size.</p><p>Every single file I was trying to sync from North America was competing for disk IO with a rebuild operation that was touching all eight drives simultaneously.</p><p>It wasn&#8217;t slow because of the Pacific Ocean. It was slow because Past Will had done something responsible and Present Will was paying the price. <s>Stupid Will.</s></p><div><hr></div><h3>IO Wait - AKA - Looking Busy While Accomplishing Nothing</h3><p>There&#8217;s a concept in computing that&#8217;s been stuck in my head since that night. It&#8217;s called IO Wait, and it&#8217;s when your CPU is technically active and it&#8217;s managing requests, maintaining state, checking if data has arrived, but not doing any <em>actual computation</em>.</p><p>The utilisation graphs look healthy. The processor looks engaged. But productive throughput? Basically zero. The CPU is just... waiting. Waiting for data to arrive from somewhere slower than itself.</p><p>My NAS wasn&#8217;t overloaded in any traditional sense. The CPU wasn&#8217;t pegged. The RAM was fine. But the disk subsystem was absolutely hammered with eight drives all churning through a parity rebuild while simultaneously trying to serve my file requests and everything was spending more time waiting than working.</p><p><strong>I&#8217;ve been thinking about that ever since. Specifically, I&#8217;ve been thinking about how many teams I&#8217;ve worked with that have the same problem.</strong></p><p><strong>Everyone looks busy.</strong> The calendars are full. Slack is buzzing. People are in meetings, on calls, typing furiously. The utilisation looks great.</p><p>But the actual work? It&#8217;s queued behind a parity rebuild that nobody remembered was happening.</p><div><hr></div><h3>The Cache Hierarchy</h3><p>Here&#8217;s the thing about my file sync problem the raw speed was there. On paper, this should have been quick.</p><p>But &#8220;on paper&#8221; assumes the data is ready when you ask for it.</p><p>Modern CPUs have known about this problem for decades. The processor itself is <em>absurdly</em> fast <strong>Billions of operations per second.</strong> </p><p>AND that speed means nothing if there&#8217;s no data to operate on. So chip designers have spent enormous effort building cache hierarchies: L1, L2, L3 each layer a bit further from the CPU core, each a bit slower, each a bit larger.</p><p>The whole elaborate architecture exists for one reason: keep data as close as possible to where decisions get made.</p><p>I looked up the actual latency numbers for a modern CPU <s> because apparently this is what I do instead of addressing my jet lag</s> and the hierarchy is <em>staggering</em>:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Q7UY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dbaefa3-df65-481f-889b-e2995ffe4626_1498x608.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Q7UY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dbaefa3-df65-481f-889b-e2995ffe4626_1498x608.png 424w, https://substackcdn.com/image/fetch/$s_!Q7UY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dbaefa3-df65-481f-889b-e2995ffe4626_1498x608.png 848w, https://substackcdn.com/image/fetch/$s_!Q7UY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dbaefa3-df65-481f-889b-e2995ffe4626_1498x608.png 1272w, https://substackcdn.com/image/fetch/$s_!Q7UY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dbaefa3-df65-481f-889b-e2995ffe4626_1498x608.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Q7UY!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dbaefa3-df65-481f-889b-e2995ffe4626_1498x608.png" width="1200" height="487.0879120879121" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4dbaefa3-df65-481f-889b-e2995ffe4626_1498x608.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:591,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:97799,&quot;alt&quot;:&quot;Where the data livesHow long it takesIf L1 is 1 second...L1 Cache~1-2 ns1 secondL2 Cache~4-7 ns5 secondsL3 Cache~10-20 ns15 secondsRAM~60-100 ns1.5 minutesNVMe SSD~10-100 &#181;s14 hours to 6 daysHard Drive~5-14 ms3-8 months&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.123cloud.st/i/158741071?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dbaefa3-df65-481f-889b-e2995ffe4626_1498x608.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-large" alt="Where the data livesHow long it takesIf L1 is 1 second...L1 Cache~1-2 ns1 secondL2 Cache~4-7 ns5 secondsL3 Cache~10-20 ns15 secondsRAM~60-100 ns1.5 minutesNVMe SSD~10-100 &#181;s14 hours to 6 daysHard Drive~5-14 ms3-8 months" title="Where the data livesHow long it takesIf L1 is 1 second...L1 Cache~1-2 ns1 secondL2 Cache~4-7 ns5 secondsL3 Cache~10-20 ns15 secondsRAM~60-100 ns1.5 minutesNVMe SSD~10-100 &#181;s14 hours to 6 daysHard Drive~5-14 ms3-8 months" srcset="https://substackcdn.com/image/fetch/$s_!Q7UY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dbaefa3-df65-481f-889b-e2995ffe4626_1498x608.png 424w, https://substackcdn.com/image/fetch/$s_!Q7UY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dbaefa3-df65-481f-889b-e2995ffe4626_1498x608.png 848w, https://substackcdn.com/image/fetch/$s_!Q7UY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dbaefa3-df65-481f-889b-e2995ffe4626_1498x608.png 1272w, https://substackcdn.com/image/fetch/$s_!Q7UY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dbaefa3-df65-481f-889b-e2995ffe4626_1498x608.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p><strong>Read that last row again.</strong> If reaching into L1 cache is one second of human time, then fetching from an NVMe drive (a <em>fast</em> one), PCIe attached, no spinning rust in sight is waiting nearly a week. A spinning hard drive? You&#8217;re waiting until next Spring/or Autumn.</p><p>And I had <em>eight</em> spinning hard drives, all of them busy doing something else.</p><p><s>This is why &#8220;each Graviton5 core has access to 2.6x more L3 cache than Graviton4, which translates to fewer delays waiting for data and faster application response times.&#8221; AWS didn&#8217;t just make the cores faster. They moved more data closer.</s></p><p>Meanwhile, I was trying to move data from North America to Sydney a journey of about 150 milliseconds in network terms but the real bottleneck was the spinning rust fighting over parity calculations. </p><div><hr></div><h3>The Organisational Parity Rebuild</h3><p><s>I&#8217;m back in Sydney now, jet lag mostly resolved</s>, I&#8217;m still here with my broken ankle and some sync&#8217;d files watching my baby sleep and I keep mapping this onto every team I&#8217;ve ever worked with.</p><p>The SHR2 rebuild is<s> the perfect</s> a metaphor, actually. It was <em>important</em> work but that necessary background work consumed so many resources that the foreground work, the actual thing I was trying to do, slowed to a crawl.</p><p>There&#8217;s the &#8220;happy&#8221; version of this: </p><ul><li><p>The &#8220;essential&#8221; reorganisation that has everyone updating spreadsheets instead of shipping</p></li><li><p>The compliance initiative that&#8217;s consumed half of everyone&#8217;s week for the last month</p></li><li><p>The tooling migration that seemed important but now has three people in meetings every day</p></li><li><p>The process improvement that&#8217;s somehow made the process take longer</p></li></ul><p><strong>These might all be legitimate and important tasks.</strong> But they&#8217;re parity rebuilds. They&#8217;re consuming IO bandwidth that your actual work needs.</p><p><em>And then there&#8217;s the worse version</em>, the <strong>sour flavour of organisational IO Wait</strong>:</p><ul><li><p>Waiting for approvals that sit in someone&#8217;s inbox for three days</p></li><li><p>Blocked on a decision that requires scheduling a meeting with someone who&#8217;s in back-to-back meetings until next Thursday</p></li><li><p>Needing information that lives in someone&#8217;s head, and they&#8217;re on holiday</p></li><li><p>Writing status updates about why nothing has status updates</p></li><li><p>Architectural meetings where 6 different teams give you requirements and you can&#8217;t make a decision but not because of indecision, but because there&#8217;s no single threaded owner and you&#8217;ve organized into role specific teams instead of product specific teams and the most responsible thing to do is not take accountability for anything more serious than ensuring the next meeting happens so you just design a playbook of 10,000 different patterns hoping someone in the future will see something they like and not bother you.</p></li><li><p>Platform engineers answering tickets for product, SRE, and SDE(!!) teams because no one really knows how their code works in production because they can&#8217;t see it after it goes over the wall. </p></li></ul><p>Everyone is doing <em>something</em>. The individual&#8217;s utilisation looks great. But the actual work is queued behind seventeen other requests, waiting for access to a contended resource.</p><div><hr></div><h3>Trust Is Just Pre-Distributed Decision Authority</h3><p>Let&#8217;s go deeper into the metaphor. </p><p>You know that decision-making pattern where the SREs, Cloud team, Infrastructure team, Product folks, and SDEs all get in <s>a room</s> a sprawling Slack thread and hash out how to do something? They debate, they whiteboard, they reach consensus. I<em>t takes a while but they get there.</em></p><p>Then they take it to the Architecture team, who kick it back with concerns.</p><p>So everyone regroups, addresses the concerns, iterates. Gets back to consensus.</p><p>Then the CTO has a meeting with their vendor about it and comes back with a completely different direction.</p><p>Everyone goes back to their own drawing boards.</p><p>I&#8217;ve watched this happen so many times. Each handoff is a network round trip. Each escalation is a cache miss that goes all the way to disk. And the latency isn&#8217;t just the waiting it&#8217;s the <em>context loss</em>. The Architecture team wasn&#8217;t in the original conversations. The CTO wasn&#8217;t. Each hop loses fidelity, like a game of telephone played through Jira tickets.</p><blockquote><p><strong>Why can&#8217;t the person closest to the problem just make the call?</strong></p><p><strong>The answer, of course, is trust. Or rather, the absence of it.</strong></p></blockquote><div><hr></div><h3>Distributed Systems Have Distributed Trust</h3><p>Think about how distributed computing actually works.</p><p>In a properly distributed system, each node has the authority to make local decisions. A replica in <code>ap-southeast-2</code> doesn&#8217;t call home to <code>us-east-1</code> for permission every time it needs to serve a read. That would be insane. The latency would destroy any benefit of having the replica in the first place.</p><p>Instead, you accept some tradeoffs. The <code>ap-southeast-2</code> replica might serve slightly stale data. It might make a decision that&#8217;s locally optimal but not globally optimal. Occasionally, two nodes might make conflicting decisions that need to be reconciled later.</p><p>But the system <em>works</em>. It&#8217;s fast. It&#8217;s resilient. Each node has enough authority (enough <em>trust)</em> to do its job without constantly checking with a central coordinator.</p><p>Now think about your org chart.</p><p>You&#8217;ve got a team of DBAs over here. A team of architects over there. SREs in one silo, cloud specialists in another, product managers somewhere else entirely. When a product team needs to make a decision that touches infrastructure, they don&#8217;t have local cache. They have to make a network call to another team. That team has their own queue, their own priorities, <strong>their own parity rebuilds</strong> happening in the background.</p><p>Every decision that crosses a team boundary is a cache miss. And you&#8217;ve architected your organisation so that <em><strong>most</strong> </em>decisions cross team boundaries.</p><div><hr></div><h3>Embedded Specialists as Local Cache</h3><p>What if you embedded a DBA in each product team that needs one?</p><p>What if instead of a centralised architecture team that reviews everything, you had architects distributed into the teams, with enough trust and authority to make decisions locally?</p><p>What if the people closest to the problem had the context <em>and</em> the authority to just... solve it?</p><blockquote><p>This is the organisational equivalent of putting an L1 cache on every core instead of having a single shared cache that everyone has to contend for. </p></blockquote><p>Yes, you lose some economies of scale. Yes, sometimes different teams will make different decisions about similar problems. Yes, you&#8217;ll occasionally need to reconcile inconsistencies.</p><p>But the latency improvement is massive.</p><p>I&#8217;ve seen teams go from multi-week decision cycles to same-day decisions just by embedding the right specialist and giving them actual authority. Not &#8220;advisory input.&#8221; Not &#8220;must be consulted.&#8221; Actual decision-making power.</p><p>The product team with an embedded SRE who can say &#8220;yes, that&#8217;s fine, ship it&#8221; doesn&#8217;t have to wait for a ticket to be triaged by the platform team. The squad with an architect who was in the room for all the context doesn&#8217;t have to write a six-page document explaining the context to a review board.</p><blockquote><p>Local cache. Local decisions. Local trust. </p></blockquote><div><hr></div><h3>The Trust Latency Tax</h3><p>The reason organisations don&#8217;t do this? Weirdly is also trust.</p><p>&#8220;What if they make the wrong decision?&#8221;</p><p>&#8220;What if different teams make inconsistent decisions?&#8221;</p><p>&#8220;What if someone approves something that causes an outage?&#8221;</p><p>These are legitimate concerns. But they&#8217;re also latency taxes. <s>Every layer of review you add, every approval gate, every &#8220;just run it past the architects first&#8221;that&#8217;s a network hop. That&#8217;s IO Wait. That&#8217;s your team sitting idle while a request traverses the org chart and back.</s></p><div class="pullquote"><p><strong>Every Gate You Add</strong> <em>(to the tune of Every Breath You Take)</em></p><p>Every gate you add, Every wait it makes <br>Every sign-off chase, every form you face <br>Blocked by IO wait</p><p>Every single day - Every board delay <br>Every ping that&#8217;s lost, every week it costs <br>Lost to IO wait</p><p>[Bridge] <br>Since it&#8217;s filed, your context fades without a trace <br>Weeks go by, the board won&#8217;t recognize your case <br>You ping the chat but help is what you can&#8217;t replace <br>The backlog grows, you long to ship at any pace <br>Keep waiting, blocking, queueing, please!</p></div><p>And here&#8217;s the thing about centralised decision-making: it doesn&#8217;t actually prevent bad decisions. It just makes them slower. The Architecture team isn&#8217;t magic. They don&#8217;t have context your team doesn&#8217;t have. Often they have <em>less</em> context, because they weren&#8217;t in the room when the tradeoffs were discussed.</p><p><strong>What centralised review </strong><em><strong>actually</strong></em><strong> provides is diffusion of responsibility</strong>. If the decision goes wrong, well, it was approved by Architecture. <strong>It went through the process. Nobody&#8217;s individually accountable because everybody was involved.</strong></p><p>But that&#8217;s not trust. That&#8217;s the opposite of trust. That&#8217;s a system designed around the assumption that individuals can&#8217;t be trusted, so we need a bureaucratic <strong>apparatus</strong> to catch their mistakes.</p><p>In distributed systems terms, you&#8217;ve built a system that requires synchronous consensus for every write operation. It&#8217;s &#8220;safe.&#8221; It&#8217;s also so slow that nothing ever ships. </p><p>Where have I seen that system before? <em><strong>Oh right, you know about CAP Theorem?</strong></em></p><div><hr></div><h3>CAP Theorem, But For Organisations</h3><p>There&#8217;s a <s>famous</s> theorem in distributed systems called CAP: you can have Consistency, Availability, and Partition tolerance, but you can&#8217;t have all three. You have to pick two.(and if you don&#8217;t pick&#8230;)</p><p>Organizations have a similar tradeoff that nobody talks about.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!DqEv!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3547aff6-8195-4c29-bfcb-56d7367775be_1494x1232.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!DqEv!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3547aff6-8195-4c29-bfcb-56d7367775be_1494x1232.png 424w, https://substackcdn.com/image/fetch/$s_!DqEv!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3547aff6-8195-4c29-bfcb-56d7367775be_1494x1232.png 848w, https://substackcdn.com/image/fetch/$s_!DqEv!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3547aff6-8195-4c29-bfcb-56d7367775be_1494x1232.png 1272w, https://substackcdn.com/image/fetch/$s_!DqEv!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3547aff6-8195-4c29-bfcb-56d7367775be_1494x1232.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!DqEv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3547aff6-8195-4c29-bfcb-56d7367775be_1494x1232.png" width="1456" height="1201" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3547aff6-8195-4c29-bfcb-56d7367775be_1494x1232.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1201,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:159251,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.123cloud.st/i/158741071?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3547aff6-8195-4c29-bfcb-56d7367775be_1494x1232.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!DqEv!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3547aff6-8195-4c29-bfcb-56d7367775be_1494x1232.png 424w, https://substackcdn.com/image/fetch/$s_!DqEv!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3547aff6-8195-4c29-bfcb-56d7367775be_1494x1232.png 848w, https://substackcdn.com/image/fetch/$s_!DqEv!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3547aff6-8195-4c29-bfcb-56d7367775be_1494x1232.png 1272w, https://substackcdn.com/image/fetch/$s_!DqEv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3547aff6-8195-4c29-bfcb-56d7367775be_1494x1232.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>You can have:</p><ul><li><p><strong>Consistency</strong>: Every team makes the same decisions the same way. Strong central governance. Architectural purity.</p></li><li><p><strong>Velocity</strong>: Decisions happen quickly. Teams ship fast. Low latency between idea and execution.</p></li><li><p><strong>Scale</strong>: Lots of teams working on lots of things. Big organisation. Many concurrent efforts.</p></li></ul><blockquote><p><em><strong>Pick two.</strong></em></p></blockquote><p>If you want <strong>Consistency</strong> and <strong>Scale</strong>, you need massive coordination overhead. Your Architecture team becomes a bottleneck. Everything queues. <strong>Velocity</strong> becomes a joke.</p><p>If you want <strong>Consistency</strong> and <strong>Velocity</strong>, you need to stay small. One team, one decision-maker, no handoffs. Works great until you need to <strong>scale</strong>.</p><p><strong>If you want Velocity and Scale, you have to relax Consistency.</strong> You <em><strong>MUST</strong></em> accept that different teams will make different decisions. You have to trust the people closest to the problem to make reasonable calls, even if those calls aren&#8217;t globally optimal.</p><p>Most organizations say they want all three and then build structures that prioritize Consistency above all else. They put every decision through a centralised review process, wonder why nothing ships, and blame the individual teams for being slow.</p><p>The teams aren&#8217;t slow. The architecture is slow. You&#8217;ve built a system where every write has to achieve global consensus, and you&#8217;re surprised that writes are expensive? <s>Take a step back, down or out. (just don&#8217;t break your ankle like me ok)</s></p><div><hr></div><h3>Build Better Cache Layers</h3><p>The fix for my file sync was just... waiting. The rebuild finished eventually, the drives stopped thrashing, and subsequent syncs ran at proper speed. Sometimes you just have to let the parity rebuild complete. I picked Consistency and scale and I had ran out of scale. </p><p>But for teams, you have more options. You can think about where knowledge and authority actually <em>live</em>, and whether you&#8217;ve <em>accidentally</em> put everything on the slowest tier:</p><p><strong>L1 Cache (instant):</strong> What can your team decide <em>without asking anyone</em>? What knowledge do they carry in their heads? What authority do they actually have? Every time someone has to send a Slack message and wait for a response, you&#8217;ve blown past L1.</p><p><strong>L2 Cache (seconds):</strong> Documentation. Runbooks. Prior decisions written down somewhere findable. &#8220;How did we handle this last time?&#8221; shouldn&#8217;t require archaeology or a meeting with someone who was there.</p><p><strong>L3 Cache (minutes):</strong> Shared team knowledge. The embedded specialist who has context and authority. The architect in the room, not the architecture review board three weeks from now.</p><p><strong>RAM (acceptable delay):</strong> Input that genuinely requires synchronous communication. A meeting, but a <em>short</em> one. A decision that actually needs discussion because it&#8217;s genuinely novel.</p><p><strong>Disk (danger zone):</strong> Multi-week approval processes. Information locked in someone&#8217;s head. Decisions requiring escalation through four layers of management. Centralised review boards with six-week backlogs. The CTO&#8217;s meeting with AWS.</p><p>Every time work travels from L1 to &#8220;disk,&#8221; you&#8217;re introducing months of latency for your team. The work might eventually complete. But at what cost in waiting?</p><div><hr></div><h3>The Metric That Actually Matters</h3><p>What are you actually measuring when you say that your team is successful?</p><p>Most places measure load. Tickets in progress. Story points committed. Utilisation rates. Calendar density. Some even measure &#8220;engagement&#8221;whatever that means or count the number of pull requests opened.</p><p>These are all load metrics and load is one of the most misunderstood concepts in computing.</p><p>On a Linux system, there&#8217;s a number called &#8220;load average&#8221; that you&#8217;ll see if you run <code>uptime</code> or <code>top</code>. Three numbers, representing the average over 1, 5, and 15 minutes. People see these numbers and think they&#8217;re measuring CPU utilisation. They&#8217;re not</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!T0hp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ddafb48-ea13-49c0-867d-bc2e09331193_1758x284.png" data-component-name="Image2ToDOM"><div class="image2-inset image2-full-screen"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!T0hp!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ddafb48-ea13-49c0-867d-bc2e09331193_1758x284.png 424w, https://substackcdn.com/image/fetch/$s_!T0hp!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ddafb48-ea13-49c0-867d-bc2e09331193_1758x284.png 848w, https://substackcdn.com/image/fetch/$s_!T0hp!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ddafb48-ea13-49c0-867d-bc2e09331193_1758x284.png 1272w, https://substackcdn.com/image/fetch/$s_!T0hp!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ddafb48-ea13-49c0-867d-bc2e09331193_1758x284.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!T0hp!,w_5760,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ddafb48-ea13-49c0-867d-bc2e09331193_1758x284.png" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5ddafb48-ea13-49c0-867d-bc2e09331193_1758x284.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;full&quot;,&quot;height&quot;:235,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:134178,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.123cloud.st/i/158741071?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ddafb48-ea13-49c0-867d-bc2e09331193_1758x284.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-fullscreen" alt="" srcset="https://substackcdn.com/image/fetch/$s_!T0hp!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ddafb48-ea13-49c0-867d-bc2e09331193_1758x284.png 424w, https://substackcdn.com/image/fetch/$s_!T0hp!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ddafb48-ea13-49c0-867d-bc2e09331193_1758x284.png 848w, https://substackcdn.com/image/fetch/$s_!T0hp!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ddafb48-ea13-49c0-867d-bc2e09331193_1758x284.png 1272w, https://substackcdn.com/image/fetch/$s_!T0hp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ddafb48-ea13-49c0-867d-bc2e09331193_1758x284.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Load average counts processes in two states: those actively running on a CPU, and those <em>waiting</em>. Waiting to run. Waiting for IO. Waiting for a disk that&#8217;s busy rebuilding parity b<s>ecause Past You made a responsible decision three days ago.</s></p><p>A system with a load average of an &#8220;8&#8221; on a 4-core machine isn&#8217;t necessarily doing twice the work it can handle. It might have 7 processes sitting in IO Wait while one process actually runs. The load looks terrible. The CPU is basically idle. Everything is just... waiting for data.</p><p>You can have a load average through the roof and almost zero useful throughput.</p><p>I&#8217;ve seen teams that operate exactly like this.</p><p>A team with packed calendars, high &#8220;engagement&#8221; metrics, and stalled projects is the same thing. Everyone is working. Nobody is shipping. And somewhere in the background, there&#8217;s a parity rebuild that nobody remembered to mention or a decision traversing six teams on its way to someone with authority.</p><p>The question isn&#8217;t &#8220;Is everyone busy?&#8221;</p><p>It&#8217;s &#8220;Is the productive work actually executing, or is it waiting for data to arrive from somewhere else?&#8221;</p><blockquote><p>&#8220;Do the people closest to the problem have the trust and authority to actually solve it? Or do they have to make a network call to someone who wasn&#8217;t in the room?&#8221;</p></blockquote><div><hr></div><p>I did briefly consider pausing the rebuild to prioritise my sync. You can do that, technically. But then I imagined explaining to my wife that I&#8217;d lost all our family photos because I was impatient at 2am and I decided that some latency is acceptable.</p><p>Sometimes the background work really is important. Sometimes you have to let the parity rebuild finish. Sometimes the Architecture review board genuinely needs to weigh in because the decision has organisation-wide implications.</p><p>The trick is knowing the difference. Knowing which decisions need global consensus and which ones can be made locally. Knowing when you&#8217;re adding safety and when you&#8217;re just adding latency. Knowing whether your org chart is an efficient distributed system or a bureaucratic apparatus that requires seventeen approvals to change a DNS record.</p><p></p>]]></content:encoded></item><item><title><![CDATA[Stop solving your problems with SaaS and start solving them with Culture]]></title><description><![CDATA[Hands up or else!]]></description><link>https://www.123cloud.st/p/stop-solving-your-problems-with-saas</link><guid isPermaLink="false">https://www.123cloud.st/p/stop-solving-your-problems-with-saas</guid><dc:creator><![CDATA[Will Laws]]></dc:creator><pubDate>Mon, 03 Nov 2025 04:58:04 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!CmYW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06350364-d804-44ff-b749-3df757a4c540_2100x1500.heic" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CmYW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06350364-d804-44ff-b749-3df757a4c540_2100x1500.heic" data-component-name="Image2ToDOM"><div class="image2-inset image2-full-screen"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CmYW!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06350364-d804-44ff-b749-3df757a4c540_2100x1500.heic 424w, https://substackcdn.com/image/fetch/$s_!CmYW!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06350364-d804-44ff-b749-3df757a4c540_2100x1500.heic 848w, https://substackcdn.com/image/fetch/$s_!CmYW!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06350364-d804-44ff-b749-3df757a4c540_2100x1500.heic 1272w, https://substackcdn.com/image/fetch/$s_!CmYW!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06350364-d804-44ff-b749-3df757a4c540_2100x1500.heic 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CmYW!,w_5760,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06350364-d804-44ff-b749-3df757a4c540_2100x1500.heic" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/06350364-d804-44ff-b749-3df757a4c540_2100x1500.heic&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;full&quot;,&quot;height&quot;:1040,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:345431,&quot;alt&quot;:&quot;the view from the second floor of a conference room that is across the street from an australian beach as an oil painting&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/heic&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.123cloud.st/i/158016776?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06350364-d804-44ff-b749-3df757a4c540_2100x1500.heic&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-fullscreen" alt="the view from the second floor of a conference room that is across the street from an australian beach as an oil painting" title="the view from the second floor of a conference room that is across the street from an australian beach as an oil painting" srcset="https://substackcdn.com/image/fetch/$s_!CmYW!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06350364-d804-44ff-b749-3df757a4c540_2100x1500.heic 424w, https://substackcdn.com/image/fetch/$s_!CmYW!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06350364-d804-44ff-b749-3df757a4c540_2100x1500.heic 848w, https://substackcdn.com/image/fetch/$s_!CmYW!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06350364-d804-44ff-b749-3df757a4c540_2100x1500.heic 1272w, https://substackcdn.com/image/fetch/$s_!CmYW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06350364-d804-44ff-b749-3df757a4c540_2100x1500.heic 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Why aren&#8217;t we down there, in the sand and surf?</figcaption></figure></div><p></p><p>So there I was, standing at the front of a conference room in Manly, about to ask <s>thirty</s> forty grown adults to put their hands on their heads like they were being arrested. <s>65 ft 7.4 in</s> Twenty meters from the beach, inside one of those hotel conference rooms that somehow manages to <strong>show you the beach</strong> <em>and</em>  <strong>block out all evidence of natural beauty</strong>, and I'm about to demonstrate why expensive governance tools are probably a waste of money.</p><p>But I'm getting ahead of myself. Let me back up...</p><h2></h2><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.123cloud.st/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">One Twenty Three Cloud Street is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><h2>The hands-on-head <s>incident</s> example</h2><p><s>Last</s> Many weeks ago we had our team offsite - the whole extended crew, including some new joiners who were probably still trying to figure out if we were a normal company, an <em><strong>AWSome company</strong></em>, or one of those places where the Kool-Aid flows a little too freely. Our head of sales had this idea that we'd all share a "gift" during pod introductions - some wisdom or tip to impart to the team.</p><p>Everyone else was sharing sensible things. Practical advice about customer engagement. Tips for managing stakeholder expectations. You know, professional stuff that belongs in a conference room. <s>Meanwhile, just beyond those hermetically sealed windows, the real world was happening. Waves were breaking. People were laughing. Life was being lived. It was like being served a perfectly plated photograph of food while slowly starving to death.</s></p><p>Then it's <em><strong>my turn.</strong></em></p><blockquote><p>"For me to share my gift, you need to put your hands on top of your heads and close your eyes."</p></blockquote><p>The room goes quiet.  Someone definitely thinks I've lost it. <s>Others knew it well before now</s></p><blockquote><p>"Go ahead, it'll make sense in a minute."</p></blockquote><p>They all did it. Every single person. </p><p>Hands on heads, eyes closed, looking absolutely <s>ridiculous</s> compliant. If someone had walked past our conference room at that moment, they'd have thought we were doing some bizarre corporate mindfulness exercise or maybe being held hostage by the world's politest bank robber.</p><blockquote><p>"Great - thanks - put your hands down."</p></blockquote><p>Then I explained what just happened. And why it matters more than any governance tool you'll ever buy, sell, partner with, or build.</p><h2>The Problem We're All Pretending to Solve</h2><p>Here's what I told them, and what I'm telling you now: You are a trusted advisor for your customers. When we have a great culture and ask our teams to do something, they're generally capable of doing it properly. Not because we have the right tools. Not because we have the perfect processes documented in Confluence, Notion or 10,000 other relevant and useful tools<br></p><p><strong>Culture creates compliance in ways that software never can.</strong></p><p>I see this pattern <em><strong>everywhere</strong></em>. A company has a governance problem - maybe they're not following security protocols, or their documentation is a mess, or they can't get teams to follow the approved development process. So what do they do?                                      They buy a SaaS tool.        <em>FANCY</em></p><p>"This'll fix it," they think, <s>writing another check </s>paying another invoice, to another vendor who promises their platform will magically transform organizational behavior.</p><p>It's like... imagine if after my little demonstration, someone hadn't put their hands on their head. And instead of asking why - instead of understanding what cultural or communication issue prevented compliance - I went and found a vendor. Paid for a tool that would come around and report on whether people did or didn't comply with hand-on-head requests.</p><p>What if the tool could somehow force you to do it? Would you be happy? Would you actually use the tool? Or would you find seventeen creative ways to work around it while technically maintaining compliance?</p><p>(I'm betting on option three. I've seen developers create entire shadow IT infrastructures just to avoid using the "approved" tools.)</p><h2>Why We Keep Making This Mistake</h2><p>The thing is, I get it. I really do. Buying software feels like solving a problem. It's concrete. You can put it on a roadmap. You can report to the board that you've "addressed the governance challenges" with a "best-in-class solution." There's a line item in the budget, contracts are signed, implementation is scheduled. It feels like progress.</p><p>Culture change? That's messy. It's slow. You can't really put "convince developers to actually care about documentation" on a Gantt chart. There's no vendor to blame when it doesn't work.</p><p>And let's be honest here - I've made this mistake myself. More than once. One time I had a massive problem with inconsistent deployment practices. Different teams doing different things, no visibility into what was actually happening in production, the usual chaos.</p><p>So naturally, we bought a tool. A really expensive tool. It had dashboards! And workflows! And integrations with everything!</p><p>Six months later, we had beautiful dashboards showing us that nobody was using the tool correctly. The teams that were already following good practices continued to do so. The teams that weren't... found creative ways to mark tasks as complete without actually doing them. We'd spent six figures to get prettier reports about the same problems we already had.</p><h2>The Uncomfortable Truth About Tools</h2><p>Here's what vendors won't tell you (and what I learned the expensive way): SaaS can't make people do the thing. Only culture can.</p><p>Tools are amplifiers. They take whatever culture you have and make it more visible, more measurable, maybe more efficient. But they don't change the underlying behavior. A great tool in a broken culture just gives you detailed metrics about how broken your culture is.</p><p>Think about it this way - and this is where my conference room demonstration comes in. When I asked everyone to put their hands on their heads, they did it because:</p><ol><li><p>They trusted that I had a reason (even if they didn't know what it was yet)</p></li><li><p>The social contract of our team culture made non-compliance more uncomfortable than compliance</p></li><li><p>They were curious about where this was going</p></li><li><p>There was psychological safety - they knew they wouldn't be humiliated or punished for participating</p></li></ol><p>Now imagine trying to achieve the same result with software. "Please log into our Hand Position Management System (HPMS) and update your status to 'Hands on Head.' Don't forget to attach photographic evidence and complete the post-hand-raising survey!"</p><p>You're laughing (I hope you're laughing), but this is literally what we do with governance tools. We try to software our way out of cultural problems.</p><h2>How to Actually Do This (Without the Fluff)</h2><p>Alright, enough philosophy. Let's get practical. How do you actually build a culture of governance before (or instead of) buying tools?</p><p><strong>Start with One Team</strong>: Don't try to boil the ocean. Find one team that's either suffering from lack of governance or already naturally good at it. Work with them to understand what governance means in their context. What are they trying to prevent? What are they trying to enable? Build something that works for them, then expand.</p><p><strong>Make It Visible</strong>: Culture thrives on visible examples. When someone follows good governance practices, make it visible. Not in a "gold star for Jimmy!" patronizing way, but in a "here's how the platform team's new tagging standard saved us from a production outage" way.</p><p><strong>Connect Governance to Outcomes People Care About</strong>: Nobody cares about governance for governance's sake. They care about not getting fired. They care about not working weekends. They care about shipping features that don't break. Show how governance connects to these outcomes.</p><p><strong>Start with Why, Not How</strong>: Before you document a single process or buy a single tool, make sure everyone understands why this governance matters. And "because compliance says so" isn't a why - that's a what.</p><p><strong>Build Feedback Loops</strong>: Culture dies in darkness. You need mechanisms for people to say "this isn't working" without fear of retribution. And then - this is the critical part - you need to actually change things based on that feedback.</p><p><strong>Lead by Example</strong>: If you're asking developers to follow secure coding practices, leadership better not be sharing passwords in Slack. If you want teams to document their architectures, executives better be able to articulate the company's technical strategy.</p><h2>The Tool Paradox</h2><p>Here's the thing that might surprise you after this whole rant: I'm not actually anti-tool. I love good tools. I've built my career on knowing which tools solve which problems.</p><p>But tools are tactics, not strategy. They're implementation details, not solutions.</p><p>The paradox is that the better your culture, the less sophisticated your tools need to be. A team with strong governance culture can maintain better compliance with a shared spreadsheet than a team with weak culture can achieve with a million-dollar platform.</p><p>I've seen teams maintain perfect infrastructure governance using nothing more than well-structured <s>Terraform</s> Cloudformation and strong code review culture. I've also seen teams with every governance tool imaginable still shipping credentials to public repos.</p><p>The tools aren't the difference. The culture is.</p><h2>Bringing It Home</h2><p>Remember my conference room demonstration? Everyone put their hands on their heads not because a tool made them, but because the culture of our team made it the natural thing to do. That's what real governance looks like - people doing the right thing because it's become the obvious thing to do.</p><p><strong>You can't buy that. You can't install it. You can only build it, one interaction at a time, one team at a time, one leader at a time.</strong></p><p>So next time someone suggests buying a tool to solve a governance problem, try this instead: Get everyone in a room. Ask them to metaphorically put their hands on their heads and describe their real problems. When they do (or don't), ask why.</p><p>The answer will tell you everything about whether you have a tools problem or a culture problem.</p><p>And I'm betting it's not a tools problem.</p><div><hr></div><p><em>What's your experience with this? Have you seen organizations successfully build governance culture, or have you watched them fail trying to buy their way there? Drop me a line - I'm genuinely curious about how others are tackling this challenge. Because despite what I've written here, I definitely don't have all the answers. I'm just someone who's made these mistakes enough times to recognize the pattern.</em></p><p><em>And if you're wondering - yes, everyone at the offsite got the message. Sometimes the best way to teach about compliance is to make people voluntarily look ridiculous for thirty seconds. The lesson tends to stick.</em></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.123cloud.st/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">One Twenty Three Cloud Street is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p>]]></content:encoded></item><item><title><![CDATA[What needs to be done to do nothing?]]></title><description><![CDATA[Ever shutdown your computer and it takes a while before it does nothing? Sometimes for you to do nothing, you have to do something too.]]></description><link>https://www.123cloud.st/p/what-needs-to-be-done-to-do-nothing</link><guid isPermaLink="false">https://www.123cloud.st/p/what-needs-to-be-done-to-do-nothing</guid><dc:creator><![CDATA[Will Laws]]></dc:creator><pubDate>Fri, 22 Nov 2024 03:28:55 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!o3E7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc69abae8-6fb3-46d0-a309-1c38629ced75_2100x1500.heic" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!o3E7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc69abae8-6fb3-46d0-a309-1c38629ced75_2100x1500.heic" data-component-name="Image2ToDOM"><div class="image2-inset image2-full-screen"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!o3E7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc69abae8-6fb3-46d0-a309-1c38629ced75_2100x1500.heic 424w, https://substackcdn.com/image/fetch/$s_!o3E7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc69abae8-6fb3-46d0-a309-1c38629ced75_2100x1500.heic 848w, https://substackcdn.com/image/fetch/$s_!o3E7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc69abae8-6fb3-46d0-a309-1c38629ced75_2100x1500.heic 1272w, https://substackcdn.com/image/fetch/$s_!o3E7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc69abae8-6fb3-46d0-a309-1c38629ced75_2100x1500.heic 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!o3E7!,w_5760,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc69abae8-6fb3-46d0-a309-1c38629ced75_2100x1500.heic" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c69abae8-6fb3-46d0-a309-1c38629ced75_2100x1500.heic&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;full&quot;,&quot;height&quot;:1040,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:430908,&quot;alt&quot;:&quot;An oil painting of a NSW A-Set train approaching a station with graffiti to the left and a platform to the right&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/heic&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-fullscreen" alt="An oil painting of a NSW A-Set train approaching a station with graffiti to the left and a platform to the right" title="An oil painting of a NSW A-Set train approaching a station with graffiti to the left and a platform to the right" srcset="https://substackcdn.com/image/fetch/$s_!o3E7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc69abae8-6fb3-46d0-a309-1c38629ced75_2100x1500.heic 424w, https://substackcdn.com/image/fetch/$s_!o3E7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc69abae8-6fb3-46d0-a309-1c38629ced75_2100x1500.heic 848w, https://substackcdn.com/image/fetch/$s_!o3E7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc69abae8-6fb3-46d0-a309-1c38629ced75_2100x1500.heic 1272w, https://substackcdn.com/image/fetch/$s_!o3E7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc69abae8-6fb3-46d0-a309-1c38629ced75_2100x1500.heic 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>I&#8217;m <s>strict</s> <s>judicious</s> <s>careful</s> <s>conscious with my time</s> trying to get home from work before 6:30 PM. It&#8217;s a 25min commute and I&#8217;ll take the train, the T2 Line from Town Hall towards the Inner West. We have an open concept office floor-plan so I pack up my laptop, put on the sunnies, pop in the AirPods and badge out. I&#8217;m on my way to do <em>nothing</em>. </p><p>Well not actually <em>nothing</em>.<br>As the air moves in and out of my lungs, my heart is picking up the pace as I rush towards the train, my thoughts are on which pocket my Opal card is crammed into, and my stomach is grumbling. I&#8217;m decidedly doing something. </p><p>As humans we&#8217;re not really familiar with the concept of doing <em>nothing</em>. We always have a little &#8220;<strong>Status:</strong>&#8221; tag on the taskbar of life. </p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.123cloud.st/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.123cloud.st/subscribe?"><span>Subscribe now</span></a></p><p><strong>Status: </strong><em><strong>Rushing</strong></em></p><p>As I pass the gates to the train platform, I think &#8220;Later tonight, melatonin willing, I&#8217;ll be <strong>Status: </strong><em><strong>Sleeping</strong>&#8221; </em>(Yes, I can think in <em>bold</em> and <strong>italics</strong>)</p><p>Your computer has a different experience. It &#8220;understands&#8221; the concept of <em>fully unplugged. </em></p><p>Earlier today, my Outlook client locked up, not responding to <strong>&#8984; + Q</strong> I opted for a force quit. Why can&#8217;t I gracefully stop this program. It&#8217;s stuck, the OS knows it&#8217;s stuck, I know it&#8217;s stuck, <em><strong>we both hope it gets unstuck</strong></em>, and without my guidance, it will stay stuck indefinitely.</p><p>&#8220;<code>pkill -9 Outlook</code>&#8221; is what I&#8217;m thinking as I Option + Two Finger Click on the icon and jab at &#8220;Force Quit&#8221;. It&#8217;s gone. I dismiss the, so far useless, Microsoft Crash Reporter. </p><p>Outlook is no more. It&#8217;s doing <em>nothing</em>. <em><strong>Took it long enough.</strong></em> <br><br><strong>Status: </strong><em><strong>Waiting</strong></em></p><p>The T2 train line at this time is typically served every 3-9min. I&#8217;m viewing the train&#8217;s progress on an app. I&#8217;m observing a system that I can&#8217;t change, I&#8217;m getting on the train regardless. A watched pot does boil, but there really isn&#8217;t a reason to watch it happen.  I check my notifications, I never clear them, they&#8217;re AI summarized and ordered mostly by priority. </p><blockquote><p><em>Swipe</em> - 2 posts on Reddit -<em>Swipe </em>- Mail checked - <em>Swipe</em> </p></blockquote><p>We really don&#8217;t do &#8220;<em>nothing</em>&#8221; well. It&#8217;s probably not possible to be alive and doing <em>nothing</em> at the same time - put it in the comments if I&#8217;m wrong. Some might say we made computers to think like we do - sure - but you can turn a computer back on after its been unplugged for a few years.</p><p><strong>Status: </strong><em><strong>Sitting</strong></em></p><p>I sit in the <s>caboose</s> last train-car. I still have my headphones in, I&#8217;m listening to <em>nothing. </em><br>My AirPods are playing an inverted waveform of what my ears should be hearing. This <em>nothing</em> takes quite a lot of something to exist.  I&#8217;m very much enjoying the silence and blissfully unaware of the tiny ARM processors whirring away. They're working harder to create <em>nothing</em> than they would to play something. It's a manufactured <em>nothing</em>, an artificial absence.</p><p>The train lurches forward, and my mind drifts to system states. In computing, we have clear delineations: running, stopped, sleeping, terminated. But human consciousness exists in fuzzy states, always processing something, even when we think we're doing <em>nothing</em>.<br><br><strong>Status: </strong><em><strong>Transit</strong></em></p><p>My phone shows</p><blockquote><p>6:12 PM</p></blockquote><p>I could check my email again, but I recognize this as the brain's equivalent of a polling loop - an inefficient use of resources. Better to implement an interrupt-driven architecture: the important emails will notify me. The unimportant ones can wait until tomorrow's inevitable <strong>Status:</strong> switch back to work mode.</p><p>Between stations, I notice my reflection in the window, superimposed on the passing graffiti of <strong>RAYGUN</strong> and other indecipherable, yet artistic, analogue manifestos - each one a  <s>pixel-perfect act of</s>  beautiful destruction, sprayed in defiance of the cleaning crews' eternal war on expression. The writers' tags float by like deprecated commands in a legacy codebase: still executing, still meaningful, just not to everyone.</p><p><strong>Status: </strong><em><strong>Background Processing</strong></em></p><p>Even as I try to do <em>nothing</em>, my mind performs garbage collection on the day's events, defragments memories, optimizes neural pathways. </p><p>I&#8217;m thinking about the interactions I had with my team and clients, <em>the random stranger with the full body tattoos on the sidewalk yesterday with the bold letters on his knuckles that smiled at me before we spontainously fist-bumped - whats his story?</em>  </p><p>The human equivalent of &#8216;system maintenance&#8217; runs whether we consciously initiate it or not. Maybe that's why true <em>nothing</em> eludes us - we're always running some background process, always maintaining some minimal viable state of consciousness. </p><p><em>If we all somehow hit a <a href="https://youtu.be/YgJ5ZEn67tk?t=40">metaphorical pause button</a> at the same time then no one would notice. Right? </em></p><p><strong>Status: </strong><em><strong><a href="https://en.wikipedia.org/wiki/Macdonaldtown">Macdonaldtown</a></strong></em><strong> </strong><em><strong>Station</strong></em></p><p>This is my least favorite station - an island platform floating in a sea of rail junction switches, servicing what feels like a pointer to a deallocated suburb. Two minutes of execution overhead between Redfern and Newtown that any decent optimizer would eliminate. Even its name throws a 404 error - there is no <a href="https://en.wikipedia.org/wiki/Macdonaldtown">Macdonaldtown</a> - just a dangling reference to some long <s>garbage-collected</s> gone estate.</p><p>I&#8217;ve realized I&#8217;m doing <em>something</em> again - this station is the <strong>bane of my quasi-meditative return home</strong>. </p><p>The train doors remain open. Through the window, I watch exactly three passengers disembark into the liminal space, their footsteps would echo on the empty platform if I could hear them.</p><p>In a way I'm jealous of the station; it's achieved what I'm struggling towards - a near-perfect implementation of doing <em>nothing</em>. Most trains pass through without triggering its interrupt handler, leaving it in its preferred <em>idle</em> state, executing its null operation with flawless efficiency.</p><p><strong>Status:</strong><em><strong> Mindwandering</strong></em></p><p>I've had my head deep into event driven architecture patterns today - there's no human equivalent to Lambda functions, those ephemeral pieces of code that spring into existence, execute their purpose, and vanish without a trace. We can't just spin up a new instance of ourselves to handle peak load, or gracefully terminate when our task is complete. Our consciousness persists, an always-on service with no shutdown command. <a href="https://www.youtube.com/watch?v=gtRolWSMkSo">OOO look at me I&#8217;m Mr Meeseeks </a> - At least existence isn&#8217;t pain.</p><p>Maybe that&#8217;s why it feels so unnatural to build with functions the first few times, it&#8217;s a new experience that we can&#8217;t understand ourselves. Our brains are stateful monoliths, carrying years of accumulated technical debt and deprecated memories. I can't just garbage collect the embarrassing things I said at last year's Christmas party.</p><p>I watch as the train reaches platform after platform, its wheels <em>silently</em> clicking against the rails like a broken mechanical clock. The sun catches the metallic reflection of a passing train on the opposite track - a perfect metaphor for parallel processing that I'll probably forget before I can write it down. </p><p><strong>Status: </strong><em><strong>Preparing</strong></em></p><p><s>I'm indexing through stations, waiting for length-1 so I can run my exit routine</s>. My internal countdown hits one station to go. <em>Where is my opal card again?</em>  No-one is seated next to me and I have a clear path to the isle. <em>Zero</em> resistance. </p><p><em>Zero</em> is a weird concept. </p><p>I have 5 apples and I give you 5 apples now I have <em>zero</em> apples. <em>Zero</em> is an intellectual abstraction, a placeholder, a mathematical sleight of hand that revolutionized how we think about quantity. Think about your bank account balance. <s>When</s> If it shows $0.00, that's not <em>nothing</em> - it's a very specific something that means the absence of money. It's a pointer that points to <em>nothing</em>, but the pointer itself exists. The account of the <em>zero</em> exists but holds <em>nothing</em> itself. You still have an account if there&#8217;s nothing in it. Can you only have <em>zero </em>of something if you had more than <em>zero </em>of it previously? </p><p>As I depart the train, my noise-cancelling headphones create a <s>near-</s>zero noise environment, but only because there was noise to cancel. You can't cancel <em>nothing</em>. The AirPods aren't creating silence - they're creating anti-noise, a deliberate something that results in a perceived <em>nothing</em>.</p><p>I&#8217;m tapping my opal card on the reader so the system acknowledges I&#8217;m no longer in transit. The state of my card will read that I&#8217;m &#8220;tapped-off&#8221; if one of those pesky ticket inspectors showed up. </p><p>In memory management, <em>null</em> is not the same as unallocated. A <em>null</em> pointer is still a pointer - it's explicitly pointing to <em>nothing</em>, which is different from a pointer that doesn't exist. My opal card doesn&#8217;t have an unallocated status - it&#8217;s something closer to a <em>null</em> status.  It&#8217;s still maintaining its identity even in its empty state. It's a container labeled "<em>nothing</em> here right now, but there could be."</p><p>Maybe that's why <em>zero</em> is such a strange concept - it's not really <em>nothing</em>, it's the deliberate acknowledgment of <em>nothing</em>.</p><p><strong>Status: </strong><em><strong>Walking</strong></em></p><p>The evening air hits my face as I remove my AirPods, their manufactured <em>nothing</em> gives way to the suburb's symphony of something. Really it was always something I heard. Hearing nothing is still to acknowledge the existence of <em>nothing</em> and if it exists is it really <em>absent</em>? As I finish my last-kilometer commute on foot I think about how the world doesn&#8217;t &#8220;do <em>zero</em>&#8221;.  Even in sleep, our minds play <s>maintenance scripts</s> dreams and <s>defrag</s> consolidate our memories. We invented <em>zero</em>, just like we invented the concept of <em>nothing</em>, just like we invented the idea that we could somehow achieve a status of doing <em>nothing</em>.<br><br>By the time I reach my home I think about if I have been successful in doing <em>nothing</em>. By my admission that <em>nothing</em> <em>is something. </em>I have to agree that I have succeeded.</p><p></p><p>After all, doing <em>nothing</em> is just something we collectively made up.</p><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.123cloud.st/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">One Twenty Three Cloud Street is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p>]]></content:encoded></item><item><title><![CDATA[Termites: Hidden Structural Problems]]></title><description><![CDATA[Part of the "Bugs of Software" Series]]></description><link>https://www.123cloud.st/p/termites-hidden-structural-problems</link><guid isPermaLink="false">https://www.123cloud.st/p/termites-hidden-structural-problems</guid><dc:creator><![CDATA[Will Laws]]></dc:creator><pubDate>Wed, 02 Oct 2024 04:13:14 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!mOP0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb765a36-4b3d-49d6-9506-6d7f6dcce08e_2660x1781.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<blockquote><p><em>This blog post about Termites is a <a href="https://en.wikipedia.org/wiki/Wikipedia:Stub">stub</a> - you can help one twenty three cloud street grow by expanding upon your experience in the comments.</em></p></blockquote><h1>What is a Termite?</h1><h3>We know a few things about the Termite</h3><ul><li><p>Termites are insects from the order Isoptera</p><ul><li><p>Isoptera: Eusocial, wood-eating, colony-forming insects.</p></li></ul></li><li><p>Over 3,000 species, with many yet to be discovered.</p></li><li><p>Incomplete metamorphosis, nymphs develop within the colony.</p><ul><li><p>Ew</p></li></ul></li><li><p>Critical decomposers and soil engineers</p><ul><li><p>Ever met a soil architect? </p></li></ul></li><li><p>&#8221;Useful&#8221; as food for some animals and even humans in some cultures</p></li><li><p><em>Can</em> be destructive to wooden structures.</p><ul><li><p>The choice is their own - like the honey badger, they take what they want.</p></li></ul></li><li><p>Termite Jokes need a lot of citation to understand(<a href="https://en.wikipedia.org/wiki/Termite#Caste_system">1</a>)</p><ul><li><p><strong>Termite 1</strong>: "Hey, guess what? I'm feeling multi-potent today! I could become a worker or even a soldier!"</p><p><strong>Termite 2</strong>: "Oh yeah? Well, I'm totipotent! I could become anything - even the queen!"</p><p><strong>Termite 1</strong>: "Wait a second... aren't you just a first instar?"</p><p><strong>Termite 2</strong>: "Maybe. But at least I'm not stuck being a pseudergate like you!"</p><p><strong>Termite 1</strong>: "Ouch. Way to rub salt in my wingless wounds."</p></li></ul></li><li><p><strong>Termites are causing your production outages.</strong></p></li></ul><p>I&#8217;m not here to talk to you about a group of <a href="https://en.wikipedia.org/wiki/Detritivore">detritophagous</a> <a href="https://en.wikipedia.org/wiki/Eusociality">eusocial</a> <a href="https://en.wikipedia.org/wiki/Insect">insects</a> or the <a href="https://en.wikipedia.org/wiki/Rhinotermitidae">Rhinotermitidae</a>, or the <em><a href="https://en.wikipedia.org/wiki/Nasutitermes_triodiae">Nasutitermes triodiae</a> </em>of the <em>Northern</em> Territory (located in the <em>southern</em> hemisphere, <em>east</em> of <em>Western</em> Australia, and <em>west</em> of New <em>South</em> Wales).  I&#8217;m here to talk to you about the hidden problems in your architecture that have become your &#8220;unknown unknown&#8217;s&#8221;.  These problems blind side you like <s>a rogue wave of fermented shark hitting your unsuspecting palate in a dimly lit Reykjavik bar, leaving you questioning every life choice that led you to this moment of gastronomic revelation and existential crisis</s> I do when you read my strikethrough text. </p><p>When was the last time you spent more than 2 minutes discovering the root cause of a failure? When was the last time you spent more than 2 days? <em>2 weeks? </em>How long were you down?  <br><br>Resiliency should be a 1st class citizen in your architecture, design and planning and a major part of resiliency is observability.  </p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.123cloud.st/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">One Twenty Three Cloud Street is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>Let me guess - the last time you built something, you thought about scaling, maintenance patterns, architecture of your messaging and eventing, data patterns - <strong>oh</strong> and only <em><strong>then</strong></em> did you think about monitoring it? <br><br>You should have thought about that all along the way - how will you know if you have termites deep in the soul of your <s>house</s> application if you don&#8217;t have the ability to poke around those parts and check them routinely? </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mOP0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb765a36-4b3d-49d6-9506-6d7f6dcce08e_2660x1781.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mOP0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb765a36-4b3d-49d6-9506-6d7f6dcce08e_2660x1781.png 424w, https://substackcdn.com/image/fetch/$s_!mOP0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb765a36-4b3d-49d6-9506-6d7f6dcce08e_2660x1781.png 848w, https://substackcdn.com/image/fetch/$s_!mOP0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb765a36-4b3d-49d6-9506-6d7f6dcce08e_2660x1781.png 1272w, https://substackcdn.com/image/fetch/$s_!mOP0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb765a36-4b3d-49d6-9506-6d7f6dcce08e_2660x1781.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mOP0!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb765a36-4b3d-49d6-9506-6d7f6dcce08e_2660x1781.png" width="1200" height="803.5714285714286" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/db765a36-4b3d-49d6-9506-6d7f6dcce08e_2660x1781.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:975,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:3995721,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!mOP0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb765a36-4b3d-49d6-9506-6d7f6dcce08e_2660x1781.png 424w, https://substackcdn.com/image/fetch/$s_!mOP0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb765a36-4b3d-49d6-9506-6d7f6dcce08e_2660x1781.png 848w, https://substackcdn.com/image/fetch/$s_!mOP0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb765a36-4b3d-49d6-9506-6d7f6dcce08e_2660x1781.png 1272w, https://substackcdn.com/image/fetch/$s_!mOP0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb765a36-4b3d-49d6-9506-6d7f6dcce08e_2660x1781.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><div><hr></div><h2>Termites are a symptom of the lack of observability </h2><p>They <strong>hide</strong> and can hide for a <strong>long time</strong> before becoming a lasting problem and that can lure you into a false sense of stability. </p><p></p><p>Lets look at this basic 3-tier architecture:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!SXzP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59653673-0981-48d1-84b4-7c4c27ba3194_898x500.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!SXzP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59653673-0981-48d1-84b4-7c4c27ba3194_898x500.png 424w, https://substackcdn.com/image/fetch/$s_!SXzP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59653673-0981-48d1-84b4-7c4c27ba3194_898x500.png 848w, https://substackcdn.com/image/fetch/$s_!SXzP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59653673-0981-48d1-84b4-7c4c27ba3194_898x500.png 1272w, https://substackcdn.com/image/fetch/$s_!SXzP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59653673-0981-48d1-84b4-7c4c27ba3194_898x500.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!SXzP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59653673-0981-48d1-84b4-7c4c27ba3194_898x500.png" width="898" height="500" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/59653673-0981-48d1-84b4-7c4c27ba3194_898x500.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:500,&quot;width&quot;:898,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:61462,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!SXzP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59653673-0981-48d1-84b4-7c4c27ba3194_898x500.png 424w, https://substackcdn.com/image/fetch/$s_!SXzP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59653673-0981-48d1-84b4-7c4c27ba3194_898x500.png 848w, https://substackcdn.com/image/fetch/$s_!SXzP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59653673-0981-48d1-84b4-7c4c27ba3194_898x500.png 1272w, https://substackcdn.com/image/fetch/$s_!SXzP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59653673-0981-48d1-84b4-7c4c27ba3194_898x500.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Fantastic - we&#8217;ve all seen this before. Now let&#8217;s add our logging system.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!V6O8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbcc580c-78dc-4069-9cdb-c186d1681f2a_1008x740.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!V6O8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbcc580c-78dc-4069-9cdb-c186d1681f2a_1008x740.png 424w, https://substackcdn.com/image/fetch/$s_!V6O8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbcc580c-78dc-4069-9cdb-c186d1681f2a_1008x740.png 848w, https://substackcdn.com/image/fetch/$s_!V6O8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbcc580c-78dc-4069-9cdb-c186d1681f2a_1008x740.png 1272w, https://substackcdn.com/image/fetch/$s_!V6O8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbcc580c-78dc-4069-9cdb-c186d1681f2a_1008x740.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!V6O8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbcc580c-78dc-4069-9cdb-c186d1681f2a_1008x740.png" width="1008" height="740" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cbcc580c-78dc-4069-9cdb-c186d1681f2a_1008x740.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:740,&quot;width&quot;:1008,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:87349,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!V6O8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbcc580c-78dc-4069-9cdb-c186d1681f2a_1008x740.png 424w, https://substackcdn.com/image/fetch/$s_!V6O8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbcc580c-78dc-4069-9cdb-c186d1681f2a_1008x740.png 848w, https://substackcdn.com/image/fetch/$s_!V6O8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbcc580c-78dc-4069-9cdb-c186d1681f2a_1008x740.png 1272w, https://substackcdn.com/image/fetch/$s_!V6O8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbcc580c-78dc-4069-9cdb-c186d1681f2a_1008x740.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Looking good - what could go wrong?  </p><p>Well if you deploy&#8217;d this with Docker (or ECS, or likely most any container platform). <strong>Then you&#8217;ve just introduced a single point of failure by introducing observability as an afterthought. </strong><br></p><blockquote><p>Docker provides two modes for delivering messages from the container to the log driver:</p><ul><li><p>(default) direct, blocking delivery from container to driver</p></li><li><p>non-blocking delivery that stores log messages in an intermediate per-container buffer for consumption by driver</p></li></ul></blockquote><p>Quote Source: https://docs.docker.com/engine/logging/configure/</p><p><strong>In blocking mode</strong> - which is the <strong>default</strong> in Docker, and ECS - if your logging provider/service is having a bad time, then so are your containers. Can&#8217;t write to your logging provider? Well then your container falls over and restarts over and over again until the logging provider is back online. </p><p><strong>In non-blocking mode</strong> - which you need to change away from the default configuration to use - a logging provider failure does not impact the functionality of the container!</p><p>When you (<em>hopefully</em>) tested your failure modes or the initial system before the introduction of logging you wouldn&#8217;t have been any wiser to this failure case. You might be able to run for a very long time before your logging provider has any issues causing an outage.  You&#8217;ve got a termite infestation now - it&#8217;s just a matter of time before this fails and takes your whole stack down. </p><p>This is just one example of a termite infestation - your mileage <s>may</s> will vary!</p><h2>How can I check for termites in my stack?</h2><p>Simple. Test your failure cases. In your staging environment make something fail, see how the system reacts and plan around that failure case. Then do it again and again and again. You can have great diagrams showing multiple arrows going to multiple boxes to describe your resiliency - but just like a backup - you don&#8217;t know its real until you test the restoration - you don&#8217;t know your failure modes until you test them.  This is how to discover your &#8220;unknown unknown&#8217;s&#8221;.   </p><p>It&#8217;s great to be able to recover from a failure quickly, it&#8217;s great to detect a failure quickly - but these pale in comparison to your ability to <strong>INCREASE THE TIME BETWEEN FAILURES.</strong>  To do this - you must understand what could fail(everything), how it will fail WHEN <em>(not if)</em> it does fail and how your system will react. Then plan for that failure case. </p><p></p><h2>How can I prevent termites from Day 1?</h2><blockquote><p>In Australia, at a cost of more than A$1.5 billion per year,<a href="https://en.wikipedia.org/wiki/Termite?wprov=srpw1_0#cite_note-243"><sup>[242]</sup></a> termites cause more damage to houses than fire, floods and storms combined.<a href="https://en.wikipedia.org/wiki/Termite?wprov=srpw1_0#cite_note-244"><sup>[243]</sup></a> In Malaysia, it is estimated that termites caused about RM400 million of damages to properties and buildings.<a href="https://en.wikipedia.org/wiki/Termite?wprov=srpw1_0#cite_note-245"><sup>[244]</sup></a> The damage caused by termites costs the southwestern United States approximately $1.5&nbsp;billion each year in wood structure damage, but the true cost of damage worldwide cannot be determined.<a href="https://en.wikipedia.org/wiki/Termite?wprov=srpw1_0#cite_note-pests2000-237"><sup>[236]</sup></a><a href="https://en.wikipedia.org/wiki/Termite?wprov=srpw1_0#cite_note-agricultural2010-246"><sup>[245]</sup></a></p></blockquote><p>Quote Source: https://en.wikipedia.org/wiki/Termite</p><p>You treat your observability and resilience as first class citizens along side your planning for hardware, software and cost management. Early in the design process you think about the failure cases and implement mechanisms to test them routinely.  </p><p>Experiencing 'termites' can be a tough lesson, as many of us can attest. </p><p>I&#8217;d be eager to hear how you've faced off with these nuisances&#8212;share your 'termite' tales in the comments below.</p><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.123cloud.st/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">One Twenty Three Cloud Street is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[The complete reference guide to basic website hosting on AWS]]></title><description><![CDATA[Simple re:Directs, S3+Cloudfront, API-Gateway Essentials with best practices for Security and Ready-to-Deploy Cloudformation templates]]></description><link>https://www.123cloud.st/p/the-complete-reference-guide-to-basic</link><guid isPermaLink="false">https://www.123cloud.st/p/the-complete-reference-guide-to-basic</guid><dc:creator><![CDATA[Will Laws]]></dc:creator><pubDate>Thu, 25 Apr 2024 06:02:26 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccd0c073-8253-4d4a-98b8-e5e27670a371.heic" length="0" type="image/jpeg"/><content:encoded><![CDATA[<blockquote><p>This post is meant as a reference guide and a starting place for deploying basic websites quickly and securely. <br><br>Average Read Time: 18min</p></blockquote><h1>Manifest</h1><ul><li><p><a href="https://www.123cloud.st/i/140668595/introduction">Introduction</a></p></li><li><p><a href="https://www.123cloud.st/i/140668595/root-domain-to-subdomain-redirects">Root Domain (123cloud.st) to Subdomain (www.123cloud.st) redirects</a></p><ul><li><p><a href="https://www.123cloud.st/i/140668595/lets-talk-quickly-about-what-doesnt-work">What Doesn&#8217;t Work</a></p></li><li><p><a href="https://www.123cloud.st/i/140668595/subdomain-redirection-option-finally-hes-showing-us-a-solution">Option 1 - CloudFront with S3 - redirect via index.html</a></p></li><li><p><a href="https://www.123cloud.st/i/140668595/subdomain-redirection-option-you-probably-want-this-one">Option 2 - CloudFront with S3 Public Website</a></p></li><li><p><a href="https://www.123cloud.st/i/140668595/subdomain-redirection-option">Option 3 - CloudFront with Lambda@Edge</a></p></li><li><p><a href="https://www.123cloud.st/i/140668595/subdomain-redirection-option-you-probably-want-this-one">Option 4 - CloudFront with CloudFront Functions</a></p></li><li><p><a href="https://www.123cloud.st/i/140668595/root-domain-to-subdomain-redirects-conclusion">Root Domain to Subdomain Redirects Conclusion</a></p></li></ul></li><li><p><a href="https://www.123cloud.st/i/140668595/standalone-public-s-buckets"><s>Standalone </s></a><strong><a href="https://www.123cloud.st/i/140668595/standalone-public-s-buckets"><s>Public</s></a></strong><a href="https://www.123cloud.st/i/140668595/standalone-public-s-buckets"><s> S3 Buckets</s></a></p></li><li><p><a href="https://www.123cloud.st/i/140668595/s-cloudfront-overview">S3 + CloudFront Overview</a></p><ul><li><p><a href="https://www.123cloud.st/i/140668595/s-cloudfront-with-oai-option">Option 1 - S3+CloudFront with OAI(Origin Access Identity)</a></p></li><li><p><a href="https://www.123cloud.st/i/140668595/s-cloudfront-with-oac-option-you-probably-want-this-one">Option 2 - S3+CloudFront with OAC(Origin Access Control)</a></p><p></p></li></ul></li></ul><blockquote><p>Do you want to just look at the code? Then go to <a href="https://github.com/jeeshofone/Public-AWS-Website-Patterns/tree/main">https://github.com/jeeshofone/Public-AWS-Website-Patterns/tree/main</a>)</p></blockquote><div><hr></div><h1>Introduction</h1><p>I love building <s>stupid</s> <a href="https://strikethroughtextonmedium.com">we</a>b<a href="https://usedvms.com">si</a>t<a href="http://findyourfivepm.com">es</a>.  I also love using AWS for deploying them. There are <s>a lot of different</s> way too many <s>ways</s> mechanisms to host a basic website on AWS.  From the <a href="https://github.com/aws-samples/aws-refarch-wordpress"><s>absurdly</s> complicated reference architecture for Wordpress</a> to a <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/WebsiteHosting.html">public S3 bucket</a> and <a href="https://aws.amazon.com/websites/">everything in between</a>. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fUz0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F724b8179-0fda-43a9-932e-91269329192b.heic" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fUz0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F724b8179-0fda-43a9-932e-91269329192b.heic 424w, https://substackcdn.com/image/fetch/$s_!fUz0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F724b8179-0fda-43a9-932e-91269329192b.heic 848w, https://substackcdn.com/image/fetch/$s_!fUz0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F724b8179-0fda-43a9-932e-91269329192b.heic 1272w, https://substackcdn.com/image/fetch/$s_!fUz0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F724b8179-0fda-43a9-932e-91269329192b.heic 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!fUz0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F724b8179-0fda-43a9-932e-91269329192b.heic" width="727.9962768554688" height="481.49753750811567" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/724b8179-0fda-43a9-932e-91269329192b.heic&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:963,&quot;width&quot;:1456,&quot;resizeWidth&quot;:727.9962768554688,&quot;bytes&quot;:515496,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/heic&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!fUz0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F724b8179-0fda-43a9-932e-91269329192b.heic 424w, https://substackcdn.com/image/fetch/$s_!fUz0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F724b8179-0fda-43a9-932e-91269329192b.heic 848w, https://substackcdn.com/image/fetch/$s_!fUz0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F724b8179-0fda-43a9-932e-91269329192b.heic 1272w, https://substackcdn.com/image/fetch/$s_!fUz0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F724b8179-0fda-43a9-932e-91269329192b.heic 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">source: https://github.com/aws-samples/aws-refarch-wordpress/blob/master/images/aws-refarch-wordpress-v20171026.jpeg</figcaption></figure></div><div class="pullquote"><p>To introduce myself for the new readers - my name is <a href="https://laws.rocks">Will Laws</a> - I&#8217;m a Solutions Architect at AWS currently located in Sydney Australia, and I&#8217;ve been building on AWS since 2009 (just before the launch of RDS). While I work at AWS now, the contents of my social media are my own thoughts and represent my own experience.<s><br>These are their stories </s></p><p><s>dun dun</s></p></div><p>In this post I&#8217;m going to provide a comprehensive set of patterns (and provide working, out of the box deployable CloudFormation templates) that I use everyday to make websites secure, cheap and fast. </p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.123cloud.st/p/the-complete-reference-guide-to-basic?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.123cloud.st/p/the-complete-reference-guide-to-basic?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.123cloud.st/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.123cloud.st/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h1>Root Domain to Subdomain Redirects</h1><p>Why would I want a root domain to a subdomain redirect?  You used one getting to this blog post (if you&#8217;re reading this on <a href="https://123cloud.st">123cloud.st</a>). <a href="https://support.substack.com/hc/en-us/articles/360051222691">Substack requires the use of a subdomain for its custom domain names</a>. So I have to have www at the front of my URL.  I don&#8217;t want you to type out the  /d&#652;b&#601;l.ju&#720;/ /d&#652;b&#601;l.ju&#720;/ /d&#652;b&#601;l.ju&#720;/ /d&#594;t/ so I need a way to direct you from 123cloud.st to <em>www</em>.123cloud.st. </p><h2>Let&#8217;s talk <s>quickly</s> about what doesn&#8217;t work. </h2><p> You may be familiar with CNAMES which &#8220;redirect&#8221; one domain name to another. This won&#8217;t work for us because of something very cool called SNI. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gdL4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba279880-c290-4506-8be8-220aa5b6bf78_536x640.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gdL4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba279880-c290-4506-8be8-220aa5b6bf78_536x640.png 424w, https://substackcdn.com/image/fetch/$s_!gdL4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba279880-c290-4506-8be8-220aa5b6bf78_536x640.png 848w, https://substackcdn.com/image/fetch/$s_!gdL4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba279880-c290-4506-8be8-220aa5b6bf78_536x640.png 1272w, https://substackcdn.com/image/fetch/$s_!gdL4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba279880-c290-4506-8be8-220aa5b6bf78_536x640.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gdL4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba279880-c290-4506-8be8-220aa5b6bf78_536x640.png" width="536" height="640" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ba279880-c290-4506-8be8-220aa5b6bf78_536x640.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:640,&quot;width&quot;:536,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:45644,&quot;alt&quot;:&quot;Record details Edit record Record name &#8226; www.123cloud.st Record type CNAME Value &#8226; target.substack-custom- domains.com&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Record details Edit record Record name &#8226; www.123cloud.st Record type CNAME Value &#8226; target.substack-custom- domains.com" title="Record details Edit record Record name &#8226; www.123cloud.st Record type CNAME Value &#8226; target.substack-custom- domains.com" srcset="https://substackcdn.com/image/fetch/$s_!gdL4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba279880-c290-4506-8be8-220aa5b6bf78_536x640.png 424w, https://substackcdn.com/image/fetch/$s_!gdL4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba279880-c290-4506-8be8-220aa5b6bf78_536x640.png 848w, https://substackcdn.com/image/fetch/$s_!gdL4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba279880-c290-4506-8be8-220aa5b6bf78_536x640.png 1272w, https://substackcdn.com/image/fetch/$s_!gdL4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba279880-c290-4506-8be8-220aa5b6bf78_536x640.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>www.123cloud.st points to target.substack-custom-domains.com - in fact every website on Substack with a custom domain name points to this URL.  We can <code>dig</code><em>(groaning intensifies)</em> deeper. What is at target.substack-custom-domains.com? </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mm9Q!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F701fb98c-90ff-4cb9-8ca6-38b56887d34b_1394x1106.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mm9Q!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F701fb98c-90ff-4cb9-8ca6-38b56887d34b_1394x1106.png 424w, https://substackcdn.com/image/fetch/$s_!mm9Q!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F701fb98c-90ff-4cb9-8ca6-38b56887d34b_1394x1106.png 848w, https://substackcdn.com/image/fetch/$s_!mm9Q!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F701fb98c-90ff-4cb9-8ca6-38b56887d34b_1394x1106.png 1272w, https://substackcdn.com/image/fetch/$s_!mm9Q!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F701fb98c-90ff-4cb9-8ca6-38b56887d34b_1394x1106.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mm9Q!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F701fb98c-90ff-4cb9-8ca6-38b56887d34b_1394x1106.png" width="1200" height="952.0803443328551" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/701fb98c-90ff-4cb9-8ca6-38b56887d34b_1394x1106.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:1106,&quot;width&quot;:1394,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:388421,&quot;alt&quot;:&quot;will@Wills-MacBook-Pro-3 ~ % dig target.substack-custom-domains.com  ; <<>> DiG 9.10.6 <<>> target.substack-custom-domains.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18684 ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1  ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 1232 ;; QUESTION SECTION: ;target.substack-custom-domains.com. IN\tA  ;; ANSWER SECTION: target.substack-custom-domains.com. 292\tIN A\t104.18.40.87 target.substack-custom-domains.com. 292\tIN A\t172.64.147.169  ;; Query time: 51 msec ;; SERVER: 10.40.0.1#53(10.40.0.1) ;; WHEN: Sun Jan 14 20:05:48 AEDT 2024 ;; MSG SIZE  rcvd: 95  will@Wills-MacBook-Pro-3 ~ %&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="will@Wills-MacBook-Pro-3 ~ % dig target.substack-custom-domains.com  ; <<>> DiG 9.10.6 <<>> target.substack-custom-domains.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18684 ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1  ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 1232 ;; QUESTION SECTION: ;target.substack-custom-domains.com. IN&#9;A  ;; ANSWER SECTION: target.substack-custom-domains.com. 292&#9;IN A&#9;104.18.40.87 target.substack-custom-domains.com. 292&#9;IN A&#9;172.64.147.169  ;; Query time: 51 msec ;; SERVER: 10.40.0.1#53(10.40.0.1) ;; WHEN: Sun Jan 14 20:05:48 AEDT 2024 ;; MSG SIZE  rcvd: 95  will@Wills-MacBook-Pro-3 ~ %" title="will@Wills-MacBook-Pro-3 ~ % dig target.substack-custom-domains.com  ; <<>> DiG 9.10.6 <<>> target.substack-custom-domains.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18684 ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1  ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 1232 ;; QUESTION SECTION: ;target.substack-custom-domains.com. IN&#9;A  ;; ANSWER SECTION: target.substack-custom-domains.com. 292&#9;IN A&#9;104.18.40.87 target.substack-custom-domains.com. 292&#9;IN A&#9;172.64.147.169  ;; Query time: 51 msec ;; SERVER: 10.40.0.1#53(10.40.0.1) ;; WHEN: Sun Jan 14 20:05:48 AEDT 2024 ;; MSG SIZE  rcvd: 95  will@Wills-MacBook-Pro-3 ~ %" srcset="https://substackcdn.com/image/fetch/$s_!mm9Q!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F701fb98c-90ff-4cb9-8ca6-38b56887d34b_1394x1106.png 424w, https://substackcdn.com/image/fetch/$s_!mm9Q!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F701fb98c-90ff-4cb9-8ca6-38b56887d34b_1394x1106.png 848w, https://substackcdn.com/image/fetch/$s_!mm9Q!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F701fb98c-90ff-4cb9-8ca6-38b56887d34b_1394x1106.png 1272w, https://substackcdn.com/image/fetch/$s_!mm9Q!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F701fb98c-90ff-4cb9-8ca6-38b56887d34b_1394x1106.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>When we look at the ANSWER SECTION of our dig output, we see 2 IP addresses. </p><p>104.18.40.87 and 172.64.147.169 (although likely depending on where I am, I will get different addresses)</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!7X3f!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d99d7ab-8b38-41e9-b4bb-c543875e207f_1394x460.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!7X3f!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d99d7ab-8b38-41e9-b4bb-c543875e207f_1394x460.png 424w, https://substackcdn.com/image/fetch/$s_!7X3f!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d99d7ab-8b38-41e9-b4bb-c543875e207f_1394x460.png 848w, https://substackcdn.com/image/fetch/$s_!7X3f!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d99d7ab-8b38-41e9-b4bb-c543875e207f_1394x460.png 1272w, https://substackcdn.com/image/fetch/$s_!7X3f!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d99d7ab-8b38-41e9-b4bb-c543875e207f_1394x460.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!7X3f!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d99d7ab-8b38-41e9-b4bb-c543875e207f_1394x460.png" width="1200" height="395.98278335724535" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9d99d7ab-8b38-41e9-b4bb-c543875e207f_1394x460.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:460,&quot;width&quot;:1394,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:157304,&quot;alt&quot;:&quot;will@Wills-MacBook-Pro-3 ~ % whois 104.18.40.87 | grep -i orgname OrgName:        Cloudflare, Inc. will@Wills-MacBook-Pro-3 ~ % whois 172.64.147.169 | grep -i orgname OrgName:        Cloudflare, Inc. will@Wills-MacBook-Pro-3 ~ %&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="will@Wills-MacBook-Pro-3 ~ % whois 104.18.40.87 | grep -i orgname OrgName:        Cloudflare, Inc. will@Wills-MacBook-Pro-3 ~ % whois 172.64.147.169 | grep -i orgname OrgName:        Cloudflare, Inc. will@Wills-MacBook-Pro-3 ~ %" title="will@Wills-MacBook-Pro-3 ~ % whois 104.18.40.87 | grep -i orgname OrgName:        Cloudflare, Inc. will@Wills-MacBook-Pro-3 ~ % whois 172.64.147.169 | grep -i orgname OrgName:        Cloudflare, Inc. will@Wills-MacBook-Pro-3 ~ %" srcset="https://substackcdn.com/image/fetch/$s_!7X3f!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d99d7ab-8b38-41e9-b4bb-c543875e207f_1394x460.png 424w, https://substackcdn.com/image/fetch/$s_!7X3f!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d99d7ab-8b38-41e9-b4bb-c543875e207f_1394x460.png 848w, https://substackcdn.com/image/fetch/$s_!7X3f!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d99d7ab-8b38-41e9-b4bb-c543875e207f_1394x460.png 1272w, https://substackcdn.com/image/fetch/$s_!7X3f!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d99d7ab-8b38-41e9-b4bb-c543875e207f_1394x460.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>These IP&#8217;s are owned by Cloudflare which provide edge caching and distribution for Substack.  Awesome. Now let&#8217;s look at SNI. <br></p><p>Server Name Indication, or SNI, is an extension of the TLS protocol. SNI allows a server to present multiple certificates on the same IP address and port number and hence allows multiple secure (HTTPS) websites (or any other service over TLS) to be served by the same IP address without requiring all those sites to use the same certificate.</p><p>If we did not have SNI, we would need a separate IP address for every single site that needs a secure connection using a unique https certificate, which is obviously not scalable with the limited number of IPv4 addresses and would be a huge waste of IPv6 addresses as well.</p><p>For example, when your browser attempts to establish a secure connection with <strong><a href="http://www.123cloud.st/">www.123cloud.st</a></strong>, it includes the hostname in the TLS handshake so that the server knows which website's certificate to present. If SNI were not used, Cloudflare would have no way to know which certificate to present because it hosts possibly thousands of different domains on a single IP address. As such, SNI is crucial for a multi-tenant hosting environment like Cloudflare's edge network.</p><p>This is why when I setup &#8220;<a href="http://ww.123cloud.st">ww.123cloud.st</a>&#8221; (I did set it up, try it!) to point at &#8220;www.123cloud.st&#8221; with a CNAME record you get an error from Cloudflare. It doesn&#8217;t know what you&#8217;re talking about as the origin subdomain is <code>ww</code> and not <code>www</code>. </p><p></p><h2>Subdomain Redirection (Option 1) <s>Finally he&#8217;s showing us a solution</s></h2><p>Since we can&#8217;t use DNS to direct our users around, we need to actually use an http redirect. There are many different kinds of http redirects. Lets look at this one first</p><pre><code>&lt;html&gt;&lt;head&gt;&lt;meta http-equiv="refresh" content="0; url=https://{redirection_url}"&gt;&lt;/head&gt;&lt;/html&gt;</code></pre><p>The &#8220;redirect&#8221; above is technically just refreshing your browser window and loading a new page. Some SEO experts will not recommend doing this; but how about we do it anyway?  Well since we&#8217;re exploring AWS Native mechanisms; how will we host this redirect?</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!adF6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F92e66a8e-99fe-4f4d-ae6e-c79047a30088_823x344.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!adF6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F92e66a8e-99fe-4f4d-ae6e-c79047a30088_823x344.png 424w, https://substackcdn.com/image/fetch/$s_!adF6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F92e66a8e-99fe-4f4d-ae6e-c79047a30088_823x344.png 848w, https://substackcdn.com/image/fetch/$s_!adF6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F92e66a8e-99fe-4f4d-ae6e-c79047a30088_823x344.png 1272w, https://substackcdn.com/image/fetch/$s_!adF6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F92e66a8e-99fe-4f4d-ae6e-c79047a30088_823x344.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!adF6!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F92e66a8e-99fe-4f4d-ae6e-c79047a30088_823x344.png" width="1200" height="501.57958687727825" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/92e66a8e-99fe-4f4d-ae6e-c79047a30088_823x344.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:344,&quot;width&quot;:823,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:41331,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!adF6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F92e66a8e-99fe-4f4d-ae6e-c79047a30088_823x344.png 424w, https://substackcdn.com/image/fetch/$s_!adF6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F92e66a8e-99fe-4f4d-ae6e-c79047a30088_823x344.png 848w, https://substackcdn.com/image/fetch/$s_!adF6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F92e66a8e-99fe-4f4d-ae6e-c79047a30088_823x344.png 1272w, https://substackcdn.com/image/fetch/$s_!adF6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F92e66a8e-99fe-4f4d-ae6e-c79047a30088_823x344.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Let me explain how the template works. </p><ol><li><p><strong>Parameters</strong>: Inputs <strong>required</strong> for the template to work.</p><ul><li><p><code>RootDomainName</code>: The root domain you intend to redirect from.</p></li><li><p><code>WWWDomainName</code>: The 'www' or other subdomain you want to redirect to.</p></li><li><p><code>HostedZoneID</code>: The identifier of the hosted zone within Route 53 for the RootDomainName.</p></li></ul></li><li><p><strong>Resources</strong> that will be created:</p><ul><li><p><code>RedirectBucket</code>: An Amazon S3 bucket configured with public access blocked that will store the redirect page.</p></li><li><p><code>RedirectBucketPolicy</code>: A policy applied to the S3 bucket that allows CloudFront to access the objects in the bucket.</p></li><li><p><code>CloudFrontOriginAccessControl</code>: A resource that controls access to the S3 bucket from CloudFront using Origin Access Control (OAC).</p></li><li><p><code>CloudFrontDistributionForRedirect</code>: A CloudFront distribution setup to redirect the root domain to the 'www' subdomain.</p></li><li><p><code>RedirectAcmCertificate</code>: An ACM certificate resource representing the SSL certificate for the root domain.</p></li><li><p><code>Route53RecordSetGroup</code>: A set of Route 53 DNS records (A and AAAA Types) that point your root domain to the CloudFront distribution.</p></li><li><p><code>LambdaExecutionRole</code>: An AWS Identity and Access Management (IAM) role that gives Lambda very limited permissions to interact with other AWS services.</p></li><li><p><code>S3FileUploaderLambda</code>: A Lambda function that is triggered by a Custom Resource to upload the redirect HTML page to the S3 bucket.</p></li><li><p><code>S3FileUploadCustomResource</code>: A custom resource that triggers the Lambda function to upload the redirect page to the S3 bucket upon stack creation.</p></li></ul></li><li><p><strong>Outputs</strong>: Named references to the values returned by the template. In this case:</p><ul><li><p><code>CloudFrontDistributionDomainName</code>: The domain name of the CloudFront distribution.</p></li><li><p><code>RedirectAcmCertificateArn</code>: The Amazon Resource Name (ARN) of the ACM certificate.</p></li></ul></li></ol><p>The overall functionality of the template is to create an S3 bucket that contains a simple HTML file that redirects our visitors to the 'www' subdomain. The bucket is made accessible only via the CloudFront distribution, which is linked to the root domain using Route 53 DNS records. An SSL/TLS certificate from ACM ensures secure browsing using HTTPS.</p><p>Upon stack creation, the Lambda function is invoked to upload the necessary HTML file into the bucket, enabling the redirection. The IAM role is provided to grant the only necessary permissions for the Lambda function to carry out its operations.<br></p><p>Please feel free to use this template but make sure you read and understand it before deploying it into your own account. You&#8217;ll want to deploy this in <code>us-east-1</code> as CloudFront can only use ACM certificates from that region. </p><p><strong><a href="https://github.com/jeeshofone/Public-AWS-Website-Patterns/tree/main/https-subdomain-redirect">Link to Cloudformation template</a></strong></p><div><hr></div><h2>Subdomain Redirection (Option 2)</h2><p>Theoretically, a 301 redirect is the &#8220;best&#8221; - 301 is for &#8220;Moved Permanently&#8221; and many believe it is better for SEO. So how does a 301 redirect actually work?<br></p><ol><li><p><strong>Client Request</strong>: A user enters a URL into their browser or clicks on a link to navigate to a page.</p></li><li><p><strong>Initial Server Response</strong>: The server that hosts the original URL receives the request for the resource (a web page, an image, etc.).</p></li><li><p><strong>Redirect Instruction</strong>: The server checks its configuration for the requested URL. If a 301 redirect is set up, the server knows that this resource has been moved permanently to a new location. Instead of serving the original resource, the server sends back a response to the client with the status code 301, which means "Moved Permanently".</p></li><li><p><strong>Location Header</strong>: Along with the 301 status code, the server includes a "Location" header in the response. This header specifies the new URL where the requested resource now resides.</p></li><li><p><strong>Client Receives Redirect</strong>: The client (browser) receives the 301 status code and the new URL from the "Location" header. Understanding that the resource has been permanently moved, the browser automatically initiates a new request to the URL specified in the "Location" header.</p></li><li><p><strong>Accessing the New Resource</strong>: The server at the new URL receives the request and, providing the resource is there, serves the desired web page or file to the client.</p></li><li><p><strong>Updating Links</strong>: Search engines and browsers may update their links or cache to reflect the new URL. This is because a 301 redirect indicates a permanent move, and so the old URL is essentially replaced by the new one in indexes and bookmarks.</p></li></ol><p>This feels a bit heavier than the simple html redirect in Option 1; however, it actually uses fewer resources <strong>but does require a public bucket</strong>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!LFlO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb944ced9-0dde-44e1-8501-1fa1ce40449a.heic" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!LFlO!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb944ced9-0dde-44e1-8501-1fa1ce40449a.heic 424w, https://substackcdn.com/image/fetch/$s_!LFlO!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb944ced9-0dde-44e1-8501-1fa1ce40449a.heic 848w, https://substackcdn.com/image/fetch/$s_!LFlO!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb944ced9-0dde-44e1-8501-1fa1ce40449a.heic 1272w, https://substackcdn.com/image/fetch/$s_!LFlO!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb944ced9-0dde-44e1-8501-1fa1ce40449a.heic 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!LFlO!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb944ced9-0dde-44e1-8501-1fa1ce40449a.heic" width="1200" height="527.2030651340996" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b944ced9-0dde-44e1-8501-1fa1ce40449a.heic&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:344,&quot;width&quot;:783,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:17430,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/heic&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!LFlO!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb944ced9-0dde-44e1-8501-1fa1ce40449a.heic 424w, https://substackcdn.com/image/fetch/$s_!LFlO!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb944ced9-0dde-44e1-8501-1fa1ce40449a.heic 848w, https://substackcdn.com/image/fetch/$s_!LFlO!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb944ced9-0dde-44e1-8501-1fa1ce40449a.heic 1272w, https://substackcdn.com/image/fetch/$s_!LFlO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb944ced9-0dde-44e1-8501-1fa1ce40449a.heic 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><blockquote><p><strong>It requires you to have a PUBLIC BUCKET due to the way that S3 redirects work with CloudFront. We can&#8217;t use an OAI or an OAC to control access via CloudFront and we must use the S3 Bucket Website endpoint which requires a public bucket. This bucket should have restrictions! However, it means you can&#8217;t put the BLOCK ALL rules on your AWS Account. This method requires this risk. I use a separate account for this use case across all my sites to prevent data from accidentally being added to these buckets. </strong></p></blockquote><h3>2 important things to note when using a 301. </h3><ul><li><p>A client&#8217;s browser can cache the response for a period of time. These redirections should not be used for frequently changed links.</p></li><li><p>Many believe that a A 301 redirect is critical for maintaining SEO rankings. When a page is moved, the 301 redirect tells search engines that any rankings and link equity the old page had should be transferred to the new page.</p></li></ul><p>So how do we do a 301 redirect with an AWS Native solution?</p><p><strong><a href="https://github.com/jeeshofone/Public-AWS-Website-Patterns/tree/main/301-https-subdomain-redirect">Link to Cloudformation template</a></strong></p><ol><li><p><strong>Conditions</strong>: </p><ul><li><p><code>CreateDNSRecordsCondition</code>: Determines whether DNS records will be created based on the <code>CreateDNSRecords</code> parameter.</p></li><li><p><code>UseExistingCertificateCondition</code>: Checks if an existing ACM Certificate ARN has been provided.</p></li><li><p><code>CreateNewCertificateCondition</code>: Determines whether a new ACM certificate should be created based on <code>CreateACMCertificate</code> and the presence of an existing certificate.</p></li></ul></li><li><p><strong>Resources</strong>: The AWS resources that will be created and managed by the stack.</p><ul><li><p><code>ACMCertificateResource</code>: An SSL certificate managed by AWS Certificate Manager, created if needed per the conditions.</p></li><li><p><code>S3BucketForRedirect</code>: A <strong>PUBLIC</strong> S3 bucket configured to redirect all incoming requests to the destination domain using HTTP 301 redirects. </p></li><li><p><code>S3BucketPolicyForRedirect</code>: A bucket policy enabling public read access to the objects in the S3 bucket.</p></li><li><p><code>CloudFrontDistribution</code>: A CloudFront distribution configured to set <code>http-only</code> for the custom origin (since S3 websites do not support HTTPS) and redirect all viewer protocols to HTTPS. It uses the provided ACM certificate or the one created by the stack.</p></li><li><p><code>Route53RecordSetGroup</code>: DNS records in Route 53 (A and AAAA records) pointing the source domain to the CloudFront distribution, created if DNS record creation is enabled.</p></li></ul></li></ol><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!oYay!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85dc4291-22e7-4976-bf3f-43e7b3fd0357_1794x670.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!oYay!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85dc4291-22e7-4976-bf3f-43e7b3fd0357_1794x670.png 424w, https://substackcdn.com/image/fetch/$s_!oYay!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85dc4291-22e7-4976-bf3f-43e7b3fd0357_1794x670.png 848w, https://substackcdn.com/image/fetch/$s_!oYay!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85dc4291-22e7-4976-bf3f-43e7b3fd0357_1794x670.png 1272w, https://substackcdn.com/image/fetch/$s_!oYay!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85dc4291-22e7-4976-bf3f-43e7b3fd0357_1794x670.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!oYay!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85dc4291-22e7-4976-bf3f-43e7b3fd0357_1794x670.png" width="1200" height="448.35164835164835" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/85dc4291-22e7-4976-bf3f-43e7b3fd0357_1794x670.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:544,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:262012,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!oYay!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85dc4291-22e7-4976-bf3f-43e7b3fd0357_1794x670.png 424w, https://substackcdn.com/image/fetch/$s_!oYay!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85dc4291-22e7-4976-bf3f-43e7b3fd0357_1794x670.png 848w, https://substackcdn.com/image/fetch/$s_!oYay!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85dc4291-22e7-4976-bf3f-43e7b3fd0357_1794x670.png 1272w, https://substackcdn.com/image/fetch/$s_!oYay!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85dc4291-22e7-4976-bf3f-43e7b3fd0357_1794x670.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Our First request to http://123cloud.st takes us on a 301 to http<strong>s</strong>://123cloud.st which is served via CloudFront&#8217;s <code>ViewerProtocolPolicy: redirect-to-https</code></p><p>That request (below) takes us via 301 to https://<strong>www.</strong>123cloud.st which is configured by <br><code>WebsiteConfiguration:<br>  RedirectAllRequestsTo:<br>    HostName: !Ref DestinationDomain<br>    Protocol: 'https'</code></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!4jUg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46d26685-f3dc-463e-b9c6-a9db33f94691_1794x670.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4jUg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46d26685-f3dc-463e-b9c6-a9db33f94691_1794x670.png 424w, https://substackcdn.com/image/fetch/$s_!4jUg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46d26685-f3dc-463e-b9c6-a9db33f94691_1794x670.png 848w, https://substackcdn.com/image/fetch/$s_!4jUg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46d26685-f3dc-463e-b9c6-a9db33f94691_1794x670.png 1272w, https://substackcdn.com/image/fetch/$s_!4jUg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46d26685-f3dc-463e-b9c6-a9db33f94691_1794x670.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!4jUg!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46d26685-f3dc-463e-b9c6-a9db33f94691_1794x670.png" width="1200" height="448.35164835164835" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/46d26685-f3dc-463e-b9c6-a9db33f94691_1794x670.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:544,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:269885,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!4jUg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46d26685-f3dc-463e-b9c6-a9db33f94691_1794x670.png 424w, https://substackcdn.com/image/fetch/$s_!4jUg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46d26685-f3dc-463e-b9c6-a9db33f94691_1794x670.png 848w, https://substackcdn.com/image/fetch/$s_!4jUg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46d26685-f3dc-463e-b9c6-a9db33f94691_1794x670.png 1272w, https://substackcdn.com/image/fetch/$s_!4jUg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46d26685-f3dc-463e-b9c6-a9db33f94691_1794x670.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>Both Option 1 and Option 2 for subdomain redirection are relatively inexpensive, each serving very little data and using mostly free tier levels of resources (depending on your traffic volume). The main trade off is Option 1 gives you poor SEO performance, and Option 2 gives you a Public S3 bucket. </p><p><em>So is there an Option 3 that prioritizes SEO and Security?</em></p><div><hr></div><h2>Subdomain Redirection Option 3</h2><h4>Lets get <em>fancy</em> with Lambda@Edge</h4><p>Lambda@Edge is a feature of Amazon CloudFront that lets you run code closer to users of your application, which can improve performance and reduce latency. With Lambda@Edge, you don't have to provision or manage infrastructure in multiple locations around the world. You pay only for the compute time you consume - there is no charge when your code is not running.</p><blockquote><p>You can test this with <a href="https://123cloudstreet.com">123cloudstreet.com</a> or on your own with the Cloudformation template below.</p></blockquote><p><strong><a href="https://github.com/jeeshofone/Public-AWS-Website-Patterns/tree/main/Lambda%40Edge-301-https-subdomain-redirect">Link to Cloudformation Template</a></strong></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!WBmw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6a120ea-31dd-45b4-857f-2ad284abad9e.heic" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!WBmw!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6a120ea-31dd-45b4-857f-2ad284abad9e.heic 424w, https://substackcdn.com/image/fetch/$s_!WBmw!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6a120ea-31dd-45b4-857f-2ad284abad9e.heic 848w, https://substackcdn.com/image/fetch/$s_!WBmw!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6a120ea-31dd-45b4-857f-2ad284abad9e.heic 1272w, https://substackcdn.com/image/fetch/$s_!WBmw!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6a120ea-31dd-45b4-857f-2ad284abad9e.heic 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!WBmw!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6a120ea-31dd-45b4-857f-2ad284abad9e.heic" width="1200" height="712.8571428571429" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e6a120ea-31dd-45b4-857f-2ad284abad9e.heic&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:499,&quot;width&quot;:840,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:19209,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/heic&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!WBmw!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6a120ea-31dd-45b4-857f-2ad284abad9e.heic 424w, https://substackcdn.com/image/fetch/$s_!WBmw!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6a120ea-31dd-45b4-857f-2ad284abad9e.heic 848w, https://substackcdn.com/image/fetch/$s_!WBmw!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6a120ea-31dd-45b4-857f-2ad284abad9e.heic 1272w, https://substackcdn.com/image/fetch/$s_!WBmw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6a120ea-31dd-45b4-857f-2ad284abad9e.heic 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>Here's how we can use Lambda@Edge for a 301 redirect from a root domain to a subdomain. </p><p>Now when a request comes into your CloudFront distribution for the root domain, the Lambda function will be invoked. It will check the host header and return a 301 redirect to the www subdomain.</p><p>This approach has several benefits:</p><ul><li><p>It's SEO-friendly. 301 redirects are the recommended way to permanently redirect URLs for SEO purposes.</p></li><li><p>It's secure. You don't need to make your S3 bucket public. <s>You don&#8217;t even need an S3 Bucket.</s> This uses an empty private S3 bucket because CloudFront needs an origin configured. </p></li><li><p>It's scalable. Lambda@Edge scales automatically with your CloudFront traffic.</p></li><li><p>It's customizable. You have full control over the redirect logic in the Lambda function which could allow you to setup multiple redirects or control different patterns.</p></li></ul><p>The main drawback is that Lambda@Edge can be a bit more complex to set up compared to the other options. Also, keep in mind that Lambda@Edge is priced differently than regular Lambda functions.</p><p>Lambda@Edge charges for the total number of request for the function and for every GB-second. <br>Request pricing is $0.60 per 1 million requests ($0.0000006 per request).<br>Duration pricing is $0.00005001for every GB-second used</p><p>This means that &#8220;if you allocate 128MB of memory available per execution with your Lambda@Edge function, then your duration charge will be $0.00000625125 for every 128MB-second used, metered in 1ms granularity.&#8221;</p><div><hr></div><h2>Subdomain Redirection Option 4 - You probably want this one</h2><p>Let's get <em><strong>even fancier</strong></em> with CloudFront Functions!</p><p>CloudFront Functions are a lightweight serverless computing service designed specifically for content delivery, enabling you to run code closer to your users for optimal performance and reduced latency. This service is integral to CloudFront and helps in executing simple functions rapidly at CloudFront edge locations worldwide. You pay only for the compute time you consume, so there is no charge when your code is not running.</p><p>You can test this with <a href="https://123street.cloud">123street.cloud</a> or on your own with the provided CloudFormation template.</p><p><a href="https://github.com/jeeshofone/Public-AWS-Website-Patterns/tree/main/Cloudfront-function-301-https-subdomain-redirect">Link to CloudFormation Template</a></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!v_Wj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f3eeb54-666a-4c93-aa39-af36d32ffd11.heic" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!v_Wj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f3eeb54-666a-4c93-aa39-af36d32ffd11.heic 424w, https://substackcdn.com/image/fetch/$s_!v_Wj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f3eeb54-666a-4c93-aa39-af36d32ffd11.heic 848w, https://substackcdn.com/image/fetch/$s_!v_Wj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f3eeb54-666a-4c93-aa39-af36d32ffd11.heic 1272w, https://substackcdn.com/image/fetch/$s_!v_Wj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f3eeb54-666a-4c93-aa39-af36d32ffd11.heic 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!v_Wj!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f3eeb54-666a-4c93-aa39-af36d32ffd11.heic" width="1200" height="502.64672036823936" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2f3eeb54-666a-4c93-aa39-af36d32ffd11.heic&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:364,&quot;width&quot;:869,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:16914,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/heic&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!v_Wj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f3eeb54-666a-4c93-aa39-af36d32ffd11.heic 424w, https://substackcdn.com/image/fetch/$s_!v_Wj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f3eeb54-666a-4c93-aa39-af36d32ffd11.heic 848w, https://substackcdn.com/image/fetch/$s_!v_Wj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f3eeb54-666a-4c93-aa39-af36d32ffd11.heic 1272w, https://substackcdn.com/image/fetch/$s_!v_Wj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f3eeb54-666a-4c93-aa39-af36d32ffd11.heic 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3>Here&#8217;s how we can utilize CloudFront Functions for a 301 redirect from a root domain to a subdomain or from a root domain to another root domain.</h3><p>When a request reaches your CloudFront distribution for the root domain, the CloudFront Function will be executed. This function simply checks the request and returns a 301 redirect to the target subdomain.</p><p>This approach offers several benefits:</p><ul><li><p>SEO-friendly: Implements 301 redirects, which are preferred for permanent URL redirection in SEO.</p></li><li><p>Secure: The simplicity of CloudFront Functions eliminates the need for additional security configurations typically required for server-based setups.</p></li><li><p>Scalable: CloudFront Functions are designed to handle high request volumes, scaling automatically with the increase in CloudFront traffic.</p></li><li><p>Customizable: Though <s>much</s> simpler than Lambda@Edge, CloudFront Functions still offer the flexibility to define specific redirection behaviors based on the incoming request characteristics.</p></li></ul><p>The main advantage over Lambda@Edge is the simplicity and lower cost, particularly for simple tasks like redirections. CloudFront Functions are priced at a <strong>MUCH</strong> lower rate than Lambda@Edge, costing $0.10 per 1 million invocations!</p><p>This means that using CloudFront Functions, you benefit from reduced complexity and cost while achieving functionality specific to content delivery scenarios such as URL redirection! </p><h2>Root Domain to Subdomain Redirects Conclusion</h2><p>In conclusion, options for redirecting traffic from a root domain to a subdomain on AWS vary in complexity, cost, SEO impact, and security considerations. The four methods outlined offer scalable solutions ranging from simple HTML meta-refresh redirects, to S3 and CloudFront-based 301 redirects, and finally to the more complex but highly flexible Lambda@Edge approach.</p><ul><li><p><a href="https://www.123cloud.st/i/140668595/subdomain-redirection-option-finally-hes-showing-us-a-solution">Option 1,</a> using a meta-refresh HTML page, is the simplest to implement but is generally not recommended for SEO. Despite this, it serves as a quick and straightforward method for redirection, suitable for temporary or less critical redirection needs.</p></li><li><p><a href="https://www.123cloud.st/i/140668595/subdomain-redirection-option-you-probably-want-this-one">Option 2</a> leverages S3 for a 301 redirect, which is better for SEO as it conveys to search engines that the move is permanent. This method does require a public-facing S3 bucket, which may raise security concerns, though these can be mitigated with careful configuration.</p></li><li><p><a href="https://www.123cloud.st/i/140668595/subdomain-redirection-option">Option 3</a>, utilizing Lambda@Edge, represents a sophisticated approach that combines scalability, security, and SEO-friendliness. This method does not require a public bucket and allows for complex redirection logic to be implemented. While it is a bit more complex and very slightly more expensive regarding AWS charges, it arguably offers the best balance between functionality and best practices for professional use.</p></li><li><p><a href="https://www.123cloud.st/i/140668595/subdomain-redirection-option-you-probably-want-this-one">Option 4</a>, utilizing CloudFront Functions provides SEO - no S3 bucket and the lowest cost with the same level of security. <strong>This is most likely your best option for redirects in all cases.</strong> </p></li></ul><blockquote><p>Want my generic prescriptive guidance? Use Option 4 if you care about SEO and Option 1 if you just want it done dirty.  <a href="https://github.com/jeeshofone/Public-AWS-Website-Patterns">Get all the CloudFormation here.</a></p></blockquote><div><hr></div><h1><s>Standalone </s><strong><s>Public</s></strong><s> S3 Buckets</s></h1><p>Ah, the audacious charm of deploying standalone S3 public bucket websites&#8212;a culinary equivalent of serving a sizzling, rare steak in a vegan commune. It&#8217;s not just about throwing caution to the wind; it&#8217;s about embracing the grandiose belief that the open web is still a place of purity, much like believing in the sanctity of a street-side taco in Tijuana at 3 AM. This approach is the digital antithesis of a locked safe in a bank vault; it's more akin to leaving your front door wide open, inviting every passerby into the warm embrace of your data. Imagine striding confidently through the back alleys of Bangkok, your server logs fluttering in the breeze behind you, a testament to your unshakeable faith in the digital goodness of mankind. It's a reckless culinary adventure, liberally seasoned with potential calamities, yet thrilling in its defiance of the mundane best practices. So, pour yourself a glass of absinthe, toast to the boundless optimism of your pioneering spirit, and watch as the flavors of your bold decision mingle with the unpredictable spices of the world wide web, hoping the result is palatable, or at least, an unforgettable tale.</p><div><hr></div><h1>S3 + CloudFront Overview</h1><p>A match made in heaven, S3 and CloudFront will allow you to host a static website in a cost conscious, secure way without the need to maintain any infrastructure. </p><p>There are 2 main patterns here for securing access between S3 and CloudFront: OAI(legacy) and OAC.</p><p>Origin Access Control (OAC) represents a<s>n</s> <s>significant</s> advancement over Origin Access Identity (<strong>OAI</strong>) for securing Amazon S3 content delivered via CloudFront, primarily due to its integration with S3's Access Point policies and the simplification of access management. <strong>OAC</strong> enables precise control by leveraging AWS&#8217;s advanced policy-based management system, allowing for more granular and secure configurations that are aligned with <em><strong>least privilege access principles</strong></em>. While the transition to <strong>OAC</strong> offers improved security practices and streamlined configurations, it necessitates a comprehension of S3 Access Point policies and a <s>complex</s> migration for those already invested in <strong>OAI</strong> configurations. However, the benefits, including enhanced security measures, compliance capabilities, and future-proofing against evolving AWS features and best practices, strongly advocate for OAC&#8217;s adoption in modern cloud architectures.</p><p>Another topic we now need to discuss is CORS. <strong>So far, we have only been discussing redirection architecture,</strong> now that we&#8217;re hosting content, we need to <strong>make sure we use CORS</strong>. S3 and CloudFront both support Cross-Origin Resource Sharing (CORS), but they do so in slightly different manners, catering to their respective roles in content storage and distribution within the AWS ecosystem.</p><h3><strong>Amazon S3 and CORS:</strong></h3><p>Amazon S3 allows you to store and retrieve any amount of data at any time, from anywhere on the web. When it comes to CORS, S3 provides the capability to configure CORS settings for your buckets directly. This is crucial when your application hosted on one domain (e.g., <code>www.example.com</code>) needs to directly access or manipulate resources stored in an S3 bucket that's not on the same origin.</p><p>Configuring CORS on an S3 bucket involves setting up a CORS configuration rule as JSON in the bucket's permissions settings. This configuration includes specifying which origins are allowed to access the bucket, what HTTP methods (GET, PUT, POST, DELETE, etc.) are permitted, whether credentials are supported, and what headers can be exposed to the browser.</p><p>For example, if you&#8217;re hosting a web application on <code>www.example.com</code> that needs to retrieve assets from your S3 bucket (<code>myapp-assets.s3.amazonaws.com</code>), you would configure the S3 bucket's CORS settings to allow <code>GET</code> requests originating from <code>www.example.com</code>. This would block someone else from trying to have <code>badactorexample.com </code>from using your bucket to serve content on their site. </p><h3><strong>Amazon CloudFront and CORS:</strong></h3><p>CloudFront is a global content delivery network (CDN) service that accelerates the delivery of your websites, APIs, video content, or other web assets. It integrates with other Amazon Web Services products, like S3, to you an easy way to distribute content to end-users with low latency and high data transfer speeds.</p><p>When you use Amazon CloudFront to serve content stored in an S3 bucket, CORS configurations become slightly more complex since you're dealing with two services.</p><p>Here's how CORS works with CloudFront:</p><ol><li><p><strong>CORS Configuration on S3</strong>: First, you must set the CORS configuration on the S3 bucket as described above.</p></li><li><p><strong>CloudFront Behavior</strong>: Next, when configuring your CloudFront distribution, you can set specific behaviors to forward <code>Origin</code> headers to your S3 bucket. CloudFront can either forward all headers to your origin (which can impact caching), forward a whitelist of headers (including <code>Origin</code> for CORS), or not forward headers at all.</p></li><li><p><strong>Handling Preflight Requests</strong>: For preflight OPTIONS requests, you need to ensure your S3 bucket or application backend appropriately handles these requests and returns suitable CORS headers. CloudFront itself doesn't automatically respond to OPTIONS requests; the response depends on your origin&#8217;s CORS setup.</p></li><li><p><strong>Caching based on CORS Headers</strong>: You can configure CloudFront to cache responses based on the <code>Origin</code> header, allowing you to efficiently serve requests for different origins with the correct CORS headers.</p></li></ol><p>Ok great - so lets look at a best practice least privilege design for our first option.</p><h2>S3 + CloudFront with OAI (Option 1)</h2><p>OAI or Origin Access Identity is the legacy way of providing authentication between CloudFront and S3; however, it is still used and works just fine.  This pattern is well documented across the internet but in the interest of providing a one-stop guide I&#8217;ll cover it here.</p><p>You can test this pattern at <a href="https://oai.onetwentythree.cloud">oai.onetwentythree.cloud</a></p><p>Link to CloudFormation template <a href="https://github.com/jeeshofone/Public-AWS-Website-Patterns/tree/main/S3%2BCloudfront%20with%20OAI">https://github.com/jeeshofone/Public-AWS-Website-Patterns/tree/main/S3%2BCloudfront%20with%20OAI</a></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!pVsC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95dad695-9183-479c-bc04-9a23e98a71a3.heic" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!pVsC!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95dad695-9183-479c-bc04-9a23e98a71a3.heic 424w, https://substackcdn.com/image/fetch/$s_!pVsC!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95dad695-9183-479c-bc04-9a23e98a71a3.heic 848w, https://substackcdn.com/image/fetch/$s_!pVsC!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95dad695-9183-479c-bc04-9a23e98a71a3.heic 1272w, https://substackcdn.com/image/fetch/$s_!pVsC!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95dad695-9183-479c-bc04-9a23e98a71a3.heic 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!pVsC!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95dad695-9183-479c-bc04-9a23e98a71a3.heic" width="1200" height="539.0070921985815" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/95dad695-9183-479c-bc04-9a23e98a71a3.heic&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:380,&quot;width&quot;:846,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:20021,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/heic&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!pVsC!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95dad695-9183-479c-bc04-9a23e98a71a3.heic 424w, https://substackcdn.com/image/fetch/$s_!pVsC!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95dad695-9183-479c-bc04-9a23e98a71a3.heic 848w, https://substackcdn.com/image/fetch/$s_!pVsC!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95dad695-9183-479c-bc04-9a23e98a71a3.heic 1272w, https://substackcdn.com/image/fetch/$s_!pVsC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95dad695-9183-479c-bc04-9a23e98a71a3.heic 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This AWS CloudFormation template creates a secure, private AWS S3 bucket paired with a CloudFront distribution, utilizing an Origin Access Identity (OAI) to strictly control access. It also sets up a Lambda function for lifecycle management tasks such as initially populating and optionally clearing the S3 bucket. The S3 bucket is configured with a stringent public access block policy and a CORS rule that only allows GET requests from the specified domain.  An SSL certificate managed by AWS Certificate Manager is used to enforce HTTPS connections, while Route 53 is employed to set up DNS routing for the domain. </p><p>This is pretty straight forward; however, there are some things in the Cloudformation template I want to draw your attention to:</p><ol><li><p>CORS is provided by the S3 bucket configuration</p></li><li><p>Nothing but the Lambda function has permissions to write the the S3 bucket. </p></li><li><p>A custom resource exists to trigger the lambda function on stack creation and removal to make and delete the index.html file.</p></li><li><p>You must have a domain in your aws account and be using route53 for this template to work. </p></li><li><p>This template uses ACM for certificates (free) but must be deployed in US-East-1 even though Cloudformation will provide your website at the edge globally. </p></li></ol><p><strong>Now lets look at what needs to change to migrate this from OAI to OAC</strong></p><h2>S3 + Cloudfront with OAC (Option 2) - You probably want this one</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gc6w!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F297fb6a6-14c4-4df5-9da1-32a2bd3377c4_1466x820.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gc6w!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F297fb6a6-14c4-4df5-9da1-32a2bd3377c4_1466x820.png 424w, https://substackcdn.com/image/fetch/$s_!gc6w!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F297fb6a6-14c4-4df5-9da1-32a2bd3377c4_1466x820.png 848w, https://substackcdn.com/image/fetch/$s_!gc6w!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F297fb6a6-14c4-4df5-9da1-32a2bd3377c4_1466x820.png 1272w, https://substackcdn.com/image/fetch/$s_!gc6w!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F297fb6a6-14c4-4df5-9da1-32a2bd3377c4_1466x820.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gc6w!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F297fb6a6-14c4-4df5-9da1-32a2bd3377c4_1466x820.png" width="1200" height="670.8791208791209" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/297fb6a6-14c4-4df5-9da1-32a2bd3377c4_1466x820.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:814,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:209875,&quot;alt&quot;:&quot;colordiff S3+Cloudfront\\ with\\ OAI/template.yaml S3+Cloudfront\\ with\\ OAC/template.yaml 2c2 < Description: CloudFormation template for setting up a fully private S3 bucket with a CloudFront distribution with OAI --- > Description: CloudFormation template for setting up a fully private S3 bucket with a CloudFront distribution with OAC 43c43,46 <               CanonicalUser: !GetAtt CloudFrontOAI.S3CanonicalUserId --- >               Service: cloudfront.amazonaws.com >             Condition: >               StringEquals: >                 AWS:SourceArn: !Sub arn:aws:cloudfront::${AWS::AccountId}:distribution/${CloudFrontDistribution} 60,64c63,71 <   CloudFrontOAI: <     Type: AWS::CloudFront::CloudFrontOriginAccessIdentity <     Properties: <       CloudFrontOriginAccessIdentityConfig: <         Comment: !Sub 'OAI for ${DomainName}' --- >   CloudFrontOriginAccessControl: >     Type: AWS::CloudFront::OriginAccessControl >     Properties: >       OriginAccessControlConfig: >         Description: Default Origin Access Control >         Name: !Ref AWS::StackName >         OriginAccessControlOriginType: s3 >         SigningBehavior: always >         SigningProtocol: sigv4 95c102,103 <               OriginAccessIdentity: !Sub 'origin-access-identity/cloudfront/${CloudFrontOAI}' --- >               OriginAccessIdentity: '' >             OriginAccessControlId: !GetAtt CloudFrontOriginAccessControl.Id&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="colordiff S3+Cloudfront\ with\ OAI/template.yaml S3+Cloudfront\ with\ OAC/template.yaml 2c2 < Description: CloudFormation template for setting up a fully private S3 bucket with a CloudFront distribution with OAI --- > Description: CloudFormation template for setting up a fully private S3 bucket with a CloudFront distribution with OAC 43c43,46 <               CanonicalUser: !GetAtt CloudFrontOAI.S3CanonicalUserId --- >               Service: cloudfront.amazonaws.com >             Condition: >               StringEquals: >                 AWS:SourceArn: !Sub arn:aws:cloudfront::${AWS::AccountId}:distribution/${CloudFrontDistribution} 60,64c63,71 <   CloudFrontOAI: <     Type: AWS::CloudFront::CloudFrontOriginAccessIdentity <     Properties: <       CloudFrontOriginAccessIdentityConfig: <         Comment: !Sub 'OAI for ${DomainName}' --- >   CloudFrontOriginAccessControl: >     Type: AWS::CloudFront::OriginAccessControl >     Properties: >       OriginAccessControlConfig: >         Description: Default Origin Access Control >         Name: !Ref AWS::StackName >         OriginAccessControlOriginType: s3 >         SigningBehavior: always >         SigningProtocol: sigv4 95c102,103 <               OriginAccessIdentity: !Sub 'origin-access-identity/cloudfront/${CloudFrontOAI}' --- >               OriginAccessIdentity: '' >             OriginAccessControlId: !GetAtt CloudFrontOriginAccessControl.Id" title="colordiff S3+Cloudfront\ with\ OAI/template.yaml S3+Cloudfront\ with\ OAC/template.yaml 2c2 < Description: CloudFormation template for setting up a fully private S3 bucket with a CloudFront distribution with OAI --- > Description: CloudFormation template for setting up a fully private S3 bucket with a CloudFront distribution with OAC 43c43,46 <               CanonicalUser: !GetAtt CloudFrontOAI.S3CanonicalUserId --- >               Service: cloudfront.amazonaws.com >             Condition: >               StringEquals: >                 AWS:SourceArn: !Sub arn:aws:cloudfront::${AWS::AccountId}:distribution/${CloudFrontDistribution} 60,64c63,71 <   CloudFrontOAI: <     Type: AWS::CloudFront::CloudFrontOriginAccessIdentity <     Properties: <       CloudFrontOriginAccessIdentityConfig: <         Comment: !Sub 'OAI for ${DomainName}' --- >   CloudFrontOriginAccessControl: >     Type: AWS::CloudFront::OriginAccessControl >     Properties: >       OriginAccessControlConfig: >         Description: Default Origin Access Control >         Name: !Ref AWS::StackName >         OriginAccessControlOriginType: s3 >         SigningBehavior: always >         SigningProtocol: sigv4 95c102,103 <               OriginAccessIdentity: !Sub 'origin-access-identity/cloudfront/${CloudFrontOAI}' --- >               OriginAccessIdentity: '' >             OriginAccessControlId: !GetAtt CloudFrontOriginAccessControl.Id" srcset="https://substackcdn.com/image/fetch/$s_!gc6w!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F297fb6a6-14c4-4df5-9da1-32a2bd3377c4_1466x820.png 424w, https://substackcdn.com/image/fetch/$s_!gc6w!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F297fb6a6-14c4-4df5-9da1-32a2bd3377c4_1466x820.png 848w, https://substackcdn.com/image/fetch/$s_!gc6w!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F297fb6a6-14c4-4df5-9da1-32a2bd3377c4_1466x820.png 1272w, https://substackcdn.com/image/fetch/$s_!gc6w!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F297fb6a6-14c4-4df5-9da1-32a2bd3377c4_1466x820.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This is the difference between the OAI and the OAC template. We remove the Origin Access Identity and add the Origin Access Control in its place. Then inside the Cloudfront template we undefined the OAI and define the ID of the OAC. In the bucket policy we remove the access from the OAI and provide the access to the OAC. </p><p></p><p><em><strong>&#8220;SO WHAT?&#8221; you might ask - &#8220;good question&#8221; I might reply.</strong></em> </p><p></p><p>Why pick OAC over OAI?  The short answer is - it&#8217;s more secure, and is the supported method going forward. The long answer is here: <a href="https://aws.amazon.com/blogs/networking-and-content-delivery/amazon-cloudfront-introduces-origin-access-control-oac/">https://aws.amazon.com/blogs/networking-and-content-delivery/amazon-cloudfront-introduces-origin-access-control-oac/</a></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!YqAo!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccd0c073-8253-4d4a-98b8-e5e27670a371.heic" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!YqAo!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccd0c073-8253-4d4a-98b8-e5e27670a371.heic 424w, https://substackcdn.com/image/fetch/$s_!YqAo!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccd0c073-8253-4d4a-98b8-e5e27670a371.heic 848w, https://substackcdn.com/image/fetch/$s_!YqAo!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccd0c073-8253-4d4a-98b8-e5e27670a371.heic 1272w, https://substackcdn.com/image/fetch/$s_!YqAo!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccd0c073-8253-4d4a-98b8-e5e27670a371.heic 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!YqAo!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccd0c073-8253-4d4a-98b8-e5e27670a371.heic" width="1200" height="539.6449704142012" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ccd0c073-8253-4d4a-98b8-e5e27670a371.heic&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:380,&quot;width&quot;:845,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:20474,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/heic&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!YqAo!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccd0c073-8253-4d4a-98b8-e5e27670a371.heic 424w, https://substackcdn.com/image/fetch/$s_!YqAo!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccd0c073-8253-4d4a-98b8-e5e27670a371.heic 848w, https://substackcdn.com/image/fetch/$s_!YqAo!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccd0c073-8253-4d4a-98b8-e5e27670a371.heic 1272w, https://substackcdn.com/image/fetch/$s_!YqAo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccd0c073-8253-4d4a-98b8-e5e27670a371.heic 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p><a href="https://github.com/jeeshofone/Public-AWS-Website-Patterns/tree/main/S3%2BCloudfront%20with%20OAC">Link to OAC Cloudformation template</a> - it is exactly the same as the OAI template, but with security between S3 and Cloudfront via OAC instead of OAI. </p><p></p><h1>Conclusion</h1><p>This blog post has outlined various strategies for deploying basic websites and domain redirects on AWS, utilizing services such as S3, CloudFront, Lambda@Edge, and more. </p><p>I hope this guide gets you started faster on your journey to deploying your next website.  </p>]]></content:encoded></item><item><title><![CDATA[How concerned should I be about flies?]]></title><description><![CDATA[Part 1 of the "Bugs of Software" Series]]></description><link>https://www.123cloud.st/p/how-concerned-should-i-be-about-flies</link><guid isPermaLink="false">https://www.123cloud.st/p/how-concerned-should-i-be-about-flies</guid><dc:creator><![CDATA[Will Laws]]></dc:creator><pubDate>Sun, 07 Jan 2024 09:42:08 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!t2xg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71121d0a-bba4-4709-aa03-ca1331816e1e.heic" length="0" type="image/jpeg"/><content:encoded><![CDATA[<blockquote><p><em>This blog post about flies is a <a href="https://en.wikipedia.org/wiki/Wikipedia:Stub">stub</a> - you can help one twenty three cloud street grow by expanding upon your experience in the comments. </em></p></blockquote><h1>What is a Fly?</h1><p>We know a few things about the Fly</p><ul><li><p>Flies are insects from the order Diptera</p><ul><li><p>Diptera: Two-winged, highly maneuverable, diverse insects.</p></li></ul></li><li><p>Over 1 million species, many still undescribed.</p></li><li><p>Complete metamorphosis, larvae develop inside food sources.</p><ul><li><p>yuck</p></li></ul></li><li><p>Critical pollinators and disease vectors</p></li><li><p>Useful as fishing bait</p></li><li><p>Can be annoying.</p></li><li><p>A scrub is a guy that think&#8217;s he&#8217;s <em>fly</em> and is also known as a busta(<a href="https://www.youtube.com/watch?v=FrLequ6dUdM">1</a>)</p></li><li><p>Now I&#8217;m feeling so <em>fly</em>, like a G6 (<a href="https://www.youtube.com/watch?v=w4s6H4ku6ZY">2</a>)</p><ul><li><p>The mathematical property of transitive relation shows that a G6 is officially a Scrub.(<a href="https://en.wikipedia.org/wiki/Transitive_relation">3</a>)</p><ul><li><p>It also shows that a G6 is a busta. Remember that the next time your rich friend jets off to Monaco. </p></li></ul></li></ul></li><li><p><strong>Flies are symptoms of expired technical debt</strong></p></li></ul><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.123cloud.st/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">One Twenty Three Cloud Street is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>I&#8217;m not here to talk to you about the common house fly(Musca domestica) or the <a href="https://en.wikipedia.org/wiki/Culex_quinquefasciatus">Culex Quinquefasciatus</a>, or the <a href="https://en.wikipedia.org/wiki/Cylindromyia_brassicaria">Cylindromyia Brassicaria</a>.  I&#8217;m here to talk to you about the flies hovering around your stand-up table or in the break room.  </p><p></p><p>When <em>we/our/your</em> business <a href="https://www.123cloud.st/p/tech-debt-is-good">takes out a technical line of credit</a>, tech debt will always exist, this is arguably good and unavoidable; however, <strong>sometimes things can smell and then the flies get in.</strong>  </p><p></p><p>While the irritations of biological flies may be a nuisance in the office setting, they are nothing compared to the metaphorical 'flies' that buzz around the realm of our projects and code repositories. Such flies represent the disproportional accumulation of technical debt in a specific area&#8211; those pesky issues we know exist yet often <s>endlessly</s> defer, impacting the daily life and productivity of a development team.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!t2xg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71121d0a-bba4-4709-aa03-ca1331816e1e.heic" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!t2xg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71121d0a-bba4-4709-aa03-ca1331816e1e.heic 424w, https://substackcdn.com/image/fetch/$s_!t2xg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71121d0a-bba4-4709-aa03-ca1331816e1e.heic 848w, https://substackcdn.com/image/fetch/$s_!t2xg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71121d0a-bba4-4709-aa03-ca1331816e1e.heic 1272w, https://substackcdn.com/image/fetch/$s_!t2xg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71121d0a-bba4-4709-aa03-ca1331816e1e.heic 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!t2xg!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71121d0a-bba4-4709-aa03-ca1331816e1e.heic" width="1200" height="728.5714285714286" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/71121d0a-bba4-4709-aa03-ca1331816e1e.heic&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:884,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:1425544,&quot;alt&quot;:&quot;Looks like we've got a new type of \&quot;bug\&quot; in the system&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/heic&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="Looks like we've got a new type of &quot;bug&quot; in the system" title="Looks like we've got a new type of &quot;bug&quot; in the system" srcset="https://substackcdn.com/image/fetch/$s_!t2xg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71121d0a-bba4-4709-aa03-ca1331816e1e.heic 424w, https://substackcdn.com/image/fetch/$s_!t2xg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71121d0a-bba4-4709-aa03-ca1331816e1e.heic 848w, https://substackcdn.com/image/fetch/$s_!t2xg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71121d0a-bba4-4709-aa03-ca1331816e1e.heic 1272w, https://substackcdn.com/image/fetch/$s_!t2xg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71121d0a-bba4-4709-aa03-ca1331816e1e.heic 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">guess it&#8217;s time to debug the keyboard</figcaption></figure></div><h2><strong>So what really is a fly?</strong></h2><div class="pullquote"><p>A fly is an annoyance that doesn&#8217;t need immediately addressed but impacts the quality of life for everyone working near that fly.</p></div><p>These 'flies' can be remnants of expedited decisions, quick fixes, or postponed updates that we plan to address "<em>later</em>." </p><p>They are the exceptions we temporarily accept amid pressing deadlines and shifting priorities. Think of them as minor design flaws, instances of non-optimal code, lingering security patches, or even outdated documentation &#8211; <strong>each representing a small portion of technical debt that accrues interest over time.</strong></p><p>Though technical debt is an inevitable part of the development process, not all of it buzzes with the same intensity. Nonetheless, just as leaving food out too long invites trouble, allowing these 'flies' to loiter in your tech environment can lead to compounded challenges. They might seem trivial, easy to swat away or ignore, yet in a swarm, they can <strong>diminish a team's velocity</strong> and the overall quality of a project.</p><p>Addressing the 'flies' is not just about maintaining cleanliness; it's an exercise in vigilance and discipline. It means regularly revisiting and revising our architectural and developmental choices to ensure they continue to serve our evolving goals effectively. By doing so, we keep the 'flies' at bay, allowing our projects to thrive in a healthy, high-performing ecosystem.</p><h1>Story Time</h1><p>My <s>favorite</s> story about a fly starts with a company that was using Python Django to build their core product. Year after year, feature after feature flies flocked to this one particular area. </p><blockquote><p><em>&#8220;We can&#8217;t upgrade Django, we forked it 9 years ago and it would be too hard to bring those required changes forward.&#8220; </em></p></blockquote><p>We believed this fly to be true for 9 years - the Django version remained unpatched, insecure, and people began saying &#8220;<em>well if we could upgrade Django, my feature wouldn&#8217;t be so hard to implement and it would take me half the time&#8221;</em></p><p>Eventually someone investigated the root cause of the fly. The forked version of Django. It was indeed forked, and the only change - the README.md file.  </p><p>The fly pointed to the <s>mess</s> part of the project that didn&#8217;t get its fair share of the interest payments.  </p><h1>Swatting the Flies</h1><blockquote><p><strong>Flies are symptoms of technical debt with a <s>juicy</s> rotten root cause.</strong> </p></blockquote><p>Listening is often the first step to finding &#8220;flies&#8221;. You&#8217;ll hear them buzzing around the office, sometimes they die out on their own, sometimes you find one stuck on the break room ceiling holding on for dear life, they&#8217;re around every tech company in varying amounts. </p><p>Typically, they are less disruptive than a rumor about your company's <s>super-secret</s> upcoming merger but also deemed less critical than the slated features and sensitive tech debt looming overhead, right? Maybe not.</p><p>Sure, it's all tech debt, and we do pay it down now and again, but why should we prioritize an issue simply because it's irritating someone?</p><p><strong>It's because a fly symbolizes a more significant underlying issue.</strong></p><p>Flies are drawn to places where they can lay their eggs&#8212;after all, the goal of a fly is to produce more flies, right? Ask yourself: Why is this part of our technical line of credit attracting flies? From my experience, it&#8217;s often due to two main issues: a lack of resources or a gap in skills.</p><p>There is usually an outdated technology or practice in the mix that a gap in skills or a lack of resources has compounded. This overlooked segment of our 'technical line of credit' isn't receiving its due care.</p><div class="pullquote"><p>When we hear statements like <em>"We can't upgrade Django; we forked it 9 years ago, and unraveling it now is too complicated,"</em> it&#8217;s not just a throwaway remark&#8212;it's the buzzing of a fly. </p></div><p>Such laments hallmark the emergence of a 'fly': a problem that may have once seemed manageable or insignificant, yet with time, it matures to stifle efforts and hinder progress.</p><p>When team members suggest that tasks <em>"would be simpler if not for X," or "could be done in half the time if Y were resolved,"</em> it&#8217;s time to take action. These expressions of frustration are symptomatic, and akin to an exterminator homing in on the problem, developers and project managers need to track these 'flies' to their source.</p><p>I once nurtured a fly of my own, making excuses for why I hadn't upgraded our systems by saying,</p><blockquote><p><em>&#8220;It might be easier to re-write the whole project then upgrade our forked version of Django&#8221; - Will</em></p></blockquote><p>yeah. flies lay eggs.</p><p>The key is to find them before they hatch. Foster a culture of transparent communication within your team from all directions. Don't shy away from confronting flies; recognize that they&#8217;re indicative of wider issues.</p><p>Experiencing 'flies' can be a tough lesson, as many of us can attest. </p><p></p><p>I&#8217;d be eager to hear how you've faced off with these nuisances&#8212;share your 'fly' tales in the comments below.</p><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.123cloud.st/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">One Twenty Three Cloud Street is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Regional to Global - Adapting Amazon Location Service for Worldwide Use]]></title><description><![CDATA[Let me show you how to transform a regional AWS service into a global AWS service]]></description><link>https://www.123cloud.st/p/regional-to-global-adapting-amazon</link><guid isPermaLink="false">https://www.123cloud.st/p/regional-to-global-adapting-amazon</guid><dc:creator><![CDATA[Will Laws]]></dc:creator><pubDate>Mon, 18 Dec 2023 21:55:29 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!a4JD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7aa3971-4aad-440a-b959-48bd54d708bf_1175x1663.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Updated: 2024-03-18 - Post now has fully deployable Cloudformation Templates: <a href="https://github.com/jeeshofone/LocationServiceGateway">https://github.com/jeeshofone/LocationServiceGateway</a> </p><p><a href="https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-0">While building findyourfivepm.com</a>, I found myself knee-deep in the world of mapping services. The heart and soul of the site, the map, had to be more than just functional - it had to be a cheetah on steroids. </p><p><a href="https://findyourfivepm.com">This map</a> had to be the trifecta of digital cartography - it's like the age-old dilemma: cost, speed, quality. pick any two; however, two will not do. For I am not made of money, have no desire to pan around slowly, and I refuse to provide you a mediocre product. </p><p><a href="https://www.123cloud.st/i/138355441/whats-next">After a thorough comparison of many map providers</a>, Amazon Location Service emerged as the winner. But it had one drawback.</p><p><em>(I'm going to save myself some carpal tunnel syndrome and refer to Amazon Location Service as ALS from here on out.)</em></p><p>When my map is zipping around at warp speed, it needs to serve up image tiles faster than a sushi chef on a Saturday night. Every millisecond is a race against time. This became glaringly obvious during a <s>quick</s> trip from Sydney to the US. I had initially set up my ALS-based map in Sydney (ap-southeast-2), and upon touching down in the US, I was eager to show my <s>un</s>impressed friends this beautiful <s>and exceptionally useful</s> website. But the map was moving so fast that I couldn&#8217;t even see any of the tiles until it stopped. What had happened? This worked perfectly at my house in Sydney! <br></p><p>My latency to the mapping service was a mere 350ms, which might not sound like much, but in the world of real-time map tile delivery, it's a lifetime. </p><p></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.123cloud.st/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.123cloud.st/subscribe?"><span>Subscribe now</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.123cloud.st/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share&quot;,&quot;text&quot;:&quot;Share One Twenty Three Cloud Street&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.123cloud.st/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share One Twenty Three Cloud Street</span></a></p><h1>What doesn&#8217;t work</h1><p>Using Amazon Location Services, you can create location-enabled, and mapping applications without the operational burden and complexity of building and maintaining your own location-based services. Maintaining your own mapping service is hard, needs constant updating and takes up a ton of disk space. <a href="https://github.com/maptiler/tileserver-gl">https://github.com/maptiler/tileserver-gl</a> While Amazon Location Services exists in <a href="https://docs.aws.amazon.com/location/latest/developerguide/location-regions.html">13</a> (as of December 2023) different AWS regions and 2 GovCloud regions, <strong>there is no native way to direct end users to use the API in the region closest to them</strong>.  <br><br>So let&#8217;s first look at some obvious but non-functional options. </p><ul><li><p><strong>What if I simply put a Route53 Latency Based Routing DNS entry for each API endpoint provided by AWS (</strong><code>geo.us-east-1.amazonaws.com</code><strong>, </strong><code>geo.ap-southeast-2.amazonaws.com</code><strong>, etc) to be mapped to </strong><code>geo.mydomain.com</code><strong> ?</strong></p><ul><li><p>SSL validation will fail on the client side because Amazon Location Services provides the SSL certificate and it won&#8217;t match <code>geo.mydomain.com</code></p></li></ul></li><li><p><strong>What if I put client side logic into the website to select the closest region and then direct the user there??</strong></p><ul><li><p>Amazon Location Service uses either <a href="https://docs.aws.amazon.com/location/latest/developerguide/how-to-access.html">IAM, Cognito, or API Keys</a> to facilitate access. If you wanted to have un-authenticated users access your location service, you would need to setup an API Key and enable CORS, or anyone could use your API to load maps on their services (expensive for you, cheap for them) You also need a way to manage all those API key in your client side and rotating those keys would become a <s>fun</s> task. </p></li></ul></li></ul><h1>What does work</h1><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!a4JD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7aa3971-4aad-440a-b959-48bd54d708bf_1175x1663.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!a4JD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7aa3971-4aad-440a-b959-48bd54d708bf_1175x1663.png 424w, https://substackcdn.com/image/fetch/$s_!a4JD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7aa3971-4aad-440a-b959-48bd54d708bf_1175x1663.png 848w, https://substackcdn.com/image/fetch/$s_!a4JD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7aa3971-4aad-440a-b959-48bd54d708bf_1175x1663.png 1272w, https://substackcdn.com/image/fetch/$s_!a4JD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7aa3971-4aad-440a-b959-48bd54d708bf_1175x1663.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!a4JD!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7aa3971-4aad-440a-b959-48bd54d708bf_1175x1663.png" width="1200" height="1698.3829787234042" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c7aa3971-4aad-440a-b959-48bd54d708bf_1175x1663.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:1663,&quot;width&quot;:1175,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:201600,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!a4JD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7aa3971-4aad-440a-b959-48bd54d708bf_1175x1663.png 424w, https://substackcdn.com/image/fetch/$s_!a4JD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7aa3971-4aad-440a-b959-48bd54d708bf_1175x1663.png 848w, https://substackcdn.com/image/fetch/$s_!a4JD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7aa3971-4aad-440a-b959-48bd54d708bf_1175x1663.png 1272w, https://substackcdn.com/image/fetch/$s_!a4JD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7aa3971-4aad-440a-b959-48bd54d708bf_1175x1663.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Let me show you why and how it works. </p><p></p><p>In each region - I have created a copy of the same architecture. </p><ul><li><p>ALS with an Esri Navigation style map, and an API Key (you can&#8217;t use the same API keys across multiple regions and <s>you can&#8217;t use Cloudformation to make API Keys for ALS!!</s>)</p></li><li><p>API-Gateway with a request path proxy rule that injects the right API key for this region into the query string, and a certificate for geo.findyourfivepm.com</p></li></ul><p>In Route53 I have created a set  of A Records for <code>geo.findyourfivepm.com</code> that uses latency based routing to automatically direct you to the closest region. Additionally I have health checks on these endpoints. If a region is having a bad day, I can send you over to one that isn&#8217;t, keeping those 5pm moments flowing. </p><p></p><p>Now I just need to update my javascript to use this new technique properly. </p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!VEqL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65c098dd-f8ba-456d-a2a1-82df953db4f5_1796x446.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!VEqL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65c098dd-f8ba-456d-a2a1-82df953db4f5_1796x446.png 424w, https://substackcdn.com/image/fetch/$s_!VEqL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65c098dd-f8ba-456d-a2a1-82df953db4f5_1796x446.png 848w, https://substackcdn.com/image/fetch/$s_!VEqL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65c098dd-f8ba-456d-a2a1-82df953db4f5_1796x446.png 1272w, https://substackcdn.com/image/fetch/$s_!VEqL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65c098dd-f8ba-456d-a2a1-82df953db4f5_1796x446.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!VEqL!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65c098dd-f8ba-456d-a2a1-82df953db4f5_1796x446.png" width="1200" height="298.35164835164835" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/65c098dd-f8ba-456d-a2a1-82df953db4f5_1796x446.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:362,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:122789,&quot;alt&quot;:&quot;window.addEventListener(\&quot;load\&quot;, () => { // Initialize the map const apiKey = \&quot;v1.public.eyJqdGki0iI10WFhMmVjYy1iNGUwLTQwM2UtODFmYy11MmRhZWIwMWM2NjAifYHit933ZAoXDs8smiUAWOBWv3bcD126 const region = \&quot;ap-southeast-2\&quot;; const mapName = \&quot;5pm-production-esri-navigation\&quot;; const styleUrI = https://maps.geo.${region}.amazonaws.com/maps/v0/maps/${mapName}/style-descriptor?key=${apiKey}; var gl = L.maplibreGL({ style: styleUrl 3). addTo(map);&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="window.addEventListener(&quot;load&quot;, () => { // Initialize the map const apiKey = &quot;v1.public.eyJqdGki0iI10WFhMmVjYy1iNGUwLTQwM2UtODFmYy11MmRhZWIwMWM2NjAifYHit933ZAoXDs8smiUAWOBWv3bcD126 const region = &quot;ap-southeast-2&quot;; const mapName = &quot;5pm-production-esri-navigation&quot;; const styleUrI = https://maps.geo.${region}.amazonaws.com/maps/v0/maps/${mapName}/style-descriptor?key=${apiKey}; var gl = L.maplibreGL({ style: styleUrl 3). addTo(map);" title="window.addEventListener(&quot;load&quot;, () => { // Initialize the map const apiKey = &quot;v1.public.eyJqdGki0iI10WFhMmVjYy1iNGUwLTQwM2UtODFmYy11MmRhZWIwMWM2NjAifYHit933ZAoXDs8smiUAWOBWv3bcD126 const region = &quot;ap-southeast-2&quot;; const mapName = &quot;5pm-production-esri-navigation&quot;; const styleUrI = https://maps.geo.${region}.amazonaws.com/maps/v0/maps/${mapName}/style-descriptor?key=${apiKey}; var gl = L.maplibreGL({ style: styleUrl 3). addTo(map);" srcset="https://substackcdn.com/image/fetch/$s_!VEqL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65c098dd-f8ba-456d-a2a1-82df953db4f5_1796x446.png 424w, https://substackcdn.com/image/fetch/$s_!VEqL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65c098dd-f8ba-456d-a2a1-82df953db4f5_1796x446.png 848w, https://substackcdn.com/image/fetch/$s_!VEqL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65c098dd-f8ba-456d-a2a1-82df953db4f5_1796x446.png 1272w, https://substackcdn.com/image/fetch/$s_!VEqL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65c098dd-f8ba-456d-a2a1-82df953db4f5_1796x446.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Above is what I was using to call ALS on a single region. I provide the API Key, the region name, the map name and then combine those into a style URL. </p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_DUB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11aa406a-082f-4d01-8144-fd8103a32133_1430x328.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_DUB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11aa406a-082f-4d01-8144-fd8103a32133_1430x328.png 424w, https://substackcdn.com/image/fetch/$s_!_DUB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11aa406a-082f-4d01-8144-fd8103a32133_1430x328.png 848w, https://substackcdn.com/image/fetch/$s_!_DUB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11aa406a-082f-4d01-8144-fd8103a32133_1430x328.png 1272w, https://substackcdn.com/image/fetch/$s_!_DUB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11aa406a-082f-4d01-8144-fd8103a32133_1430x328.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!_DUB!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11aa406a-082f-4d01-8144-fd8103a32133_1430x328.png" width="1200" height="275.24475524475525" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/11aa406a-082f-4d01-8144-fd8103a32133_1430x328.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:328,&quot;width&quot;:1430,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:71982,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!_DUB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11aa406a-082f-4d01-8144-fd8103a32133_1430x328.png 424w, https://substackcdn.com/image/fetch/$s_!_DUB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11aa406a-082f-4d01-8144-fd8103a32133_1430x328.png 848w, https://substackcdn.com/image/fetch/$s_!_DUB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11aa406a-082f-4d01-8144-fd8103a32133_1430x328.png 1272w, https://substackcdn.com/image/fetch/$s_!_DUB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11aa406a-082f-4d01-8144-fd8103a32133_1430x328.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Now I only need to define the mapName. Route53 will direct the user to the location with the least latency between them and the request will land on API-Gateway which will inject <code>?key=&#8221;v1.public.abcdefg123&#8230;&#8221;</code> into the end of the URL string and pass the request onto ALS.  </p><p>Let&#8217;s explore this in more depth.</p><p></p><h2>&#127925;Simply having a wonderful mapping time&#127925;</h2><p></p><p>Remember when I mentioned that I care about cost?</p><p>Let&#8217;s review how this changes the price of the solution. </p><blockquote><p>For HTTP APIs, the API Gateway free tier includes one million API calls per month for up to 12 months. (<a href="https://aws.amazon.com/api-gateway/pricing/">1</a>)</p></blockquote><p>Now if I became really popular (probably because you&#8217;re going to <strong>share this post and visit <a href="http://findyourfivepm.com">findyourfivepm.com</a> every day?</strong>) how much would it cost me? <br></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.123cloud.st/p/regional-to-global-adapting-amazon?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.123cloud.st/p/regional-to-global-adapting-amazon?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><p><br>In the last 30 days I&#8217;ve had 60.8k tiles served and 941 page views/cities returned. </p><p>I get about 400k map tiles served every 6months. You can also see in the graph below the period of time where I was only using ap-southeast-2 to serve my map tiles. When I switched to the architecture in this post, you can see both how the number of views increased, but also from which locations they originate.  Most of my current user base is closer to us-east-2 than not, and traffic in eu-central-1 is picking up as well.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5-PY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dd725a1-57c6-41f1-a338-f1c951759beb_2794x1616.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5-PY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dd725a1-57c6-41f1-a338-f1c951759beb_2794x1616.png 424w, https://substackcdn.com/image/fetch/$s_!5-PY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dd725a1-57c6-41f1-a338-f1c951759beb_2794x1616.png 848w, https://substackcdn.com/image/fetch/$s_!5-PY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dd725a1-57c6-41f1-a338-f1c951759beb_2794x1616.png 1272w, https://substackcdn.com/image/fetch/$s_!5-PY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dd725a1-57c6-41f1-a338-f1c951759beb_2794x1616.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5-PY!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dd725a1-57c6-41f1-a338-f1c951759beb_2794x1616.png" width="1200" height="693.9560439560439" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4dd725a1-57c6-41f1-a338-f1c951759beb_2794x1616.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:842,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:621844,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!5-PY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dd725a1-57c6-41f1-a338-f1c951759beb_2794x1616.png 424w, https://substackcdn.com/image/fetch/$s_!5-PY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dd725a1-57c6-41f1-a338-f1c951759beb_2794x1616.png 848w, https://substackcdn.com/image/fetch/$s_!5-PY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dd725a1-57c6-41f1-a338-f1c951759beb_2794x1616.png 1272w, https://substackcdn.com/image/fetch/$s_!5-PY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dd725a1-57c6-41f1-a338-f1c951759beb_2794x1616.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>So pricing. It could get expensive, if I had many million API calls, and after you make my website popular, and I have 100 million tiles served a month will I be paying $3.50/million * 99 Million = $346/month just for this localized routing via API Gateway?</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_wfI!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3456d196-ce15-4ce7-b264-b1791114cdaa_1804x554.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_wfI!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3456d196-ce15-4ce7-b264-b1791114cdaa_1804x554.png 424w, https://substackcdn.com/image/fetch/$s_!_wfI!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3456d196-ce15-4ce7-b264-b1791114cdaa_1804x554.png 848w, https://substackcdn.com/image/fetch/$s_!_wfI!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3456d196-ce15-4ce7-b264-b1791114cdaa_1804x554.png 1272w, https://substackcdn.com/image/fetch/$s_!_wfI!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3456d196-ce15-4ce7-b264-b1791114cdaa_1804x554.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!_wfI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3456d196-ce15-4ce7-b264-b1791114cdaa_1804x554.png" width="1456" height="447" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3456d196-ce15-4ce7-b264-b1791114cdaa_1804x554.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:447,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:59814,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!_wfI!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3456d196-ce15-4ce7-b264-b1791114cdaa_1804x554.png 424w, https://substackcdn.com/image/fetch/$s_!_wfI!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3456d196-ce15-4ce7-b264-b1791114cdaa_1804x554.png 848w, https://substackcdn.com/image/fetch/$s_!_wfI!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3456d196-ce15-4ce7-b264-b1791114cdaa_1804x554.png 1272w, https://substackcdn.com/image/fetch/$s_!_wfI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3456d196-ce15-4ce7-b264-b1791114cdaa_1804x554.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>No, I will not and here&#8217;s why. </p><p>Lets inspect the initial request to geo.findyourfivepm.com.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!bhIb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd225bd89-5835-4711-8d5a-31ca1596134e_1320x330.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bhIb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd225bd89-5835-4711-8d5a-31ca1596134e_1320x330.png 424w, https://substackcdn.com/image/fetch/$s_!bhIb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd225bd89-5835-4711-8d5a-31ca1596134e_1320x330.png 848w, https://substackcdn.com/image/fetch/$s_!bhIb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd225bd89-5835-4711-8d5a-31ca1596134e_1320x330.png 1272w, https://substackcdn.com/image/fetch/$s_!bhIb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd225bd89-5835-4711-8d5a-31ca1596134e_1320x330.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bhIb!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd225bd89-5835-4711-8d5a-31ca1596134e_1320x330.png" width="1200" height="300" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d225bd89-5835-4711-8d5a-31ca1596134e_1320x330.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:330,&quot;width&quot;:1320,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:67894,&quot;alt&quot;:&quot;General Request URL: https://geo.findyourfivepm.com/maps/v0/maps/Geo-5pm-Map/style-descriptor Request Method: GET Status Code: &#169;200 Remote Address: 54.66.59.200:443 Referrer Policy: strict-origin-when-cross-origin&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="General Request URL: https://geo.findyourfivepm.com/maps/v0/maps/Geo-5pm-Map/style-descriptor Request Method: GET Status Code: &#169;200 Remote Address: 54.66.59.200:443 Referrer Policy: strict-origin-when-cross-origin" title="General Request URL: https://geo.findyourfivepm.com/maps/v0/maps/Geo-5pm-Map/style-descriptor Request Method: GET Status Code: &#169;200 Remote Address: 54.66.59.200:443 Referrer Policy: strict-origin-when-cross-origin" srcset="https://substackcdn.com/image/fetch/$s_!bhIb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd225bd89-5835-4711-8d5a-31ca1596134e_1320x330.png 424w, https://substackcdn.com/image/fetch/$s_!bhIb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd225bd89-5835-4711-8d5a-31ca1596134e_1320x330.png 848w, https://substackcdn.com/image/fetch/$s_!bhIb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd225bd89-5835-4711-8d5a-31ca1596134e_1320x330.png 1272w, https://substackcdn.com/image/fetch/$s_!bhIb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd225bd89-5835-4711-8d5a-31ca1596134e_1320x330.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Our call goes out to the URL of my latency based Route53 query and is handled by our API Gateway to:</p><p><code>geo.findyourfivepm.com/maps/v0/maps/Geo-5pm-Map/style-descriptor</code></p><p>We then get back this style descriptor document. Let&#8217;s inspect that. </p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!SfLD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93e36816-a0b8-4b87-a88d-d7d4d5ecfe20_1984x330.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!SfLD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93e36816-a0b8-4b87-a88d-d7d4d5ecfe20_1984x330.png 424w, https://substackcdn.com/image/fetch/$s_!SfLD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93e36816-a0b8-4b87-a88d-d7d4d5ecfe20_1984x330.png 848w, https://substackcdn.com/image/fetch/$s_!SfLD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93e36816-a0b8-4b87-a88d-d7d4d5ecfe20_1984x330.png 1272w, https://substackcdn.com/image/fetch/$s_!SfLD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93e36816-a0b8-4b87-a88d-d7d4d5ecfe20_1984x330.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!SfLD!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93e36816-a0b8-4b87-a88d-d7d4d5ecfe20_1984x330.png" width="1200" height="199.45054945054946" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/93e36816-a0b8-4b87-a88d-d7d4d5ecfe20_1984x330.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:242,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:118730,&quot;alt&quot;:&quot;* Headers Preview Response Initiator Timing    {version: 8, sources: {esri: {,}},..}    created: \&quot;0001-01-01T00:00:00Z\&quot;     glyphs: \&quot;https://maps.geo.ap-southeast-2.amazonaws.com/maps/v0/maps/Geo-5pm-Map/glyphs/{fontstack}/{range}.pbf?key=v1.public.eyJqdGki0iJk0DFIMTQy    &#8226; layers: K{id: \&quot;background\&quot;, layout: {}, paint: {background-color: \&quot;#a7d6fe\&quot;}, showProperties: false,&#8230;.&#8250;,&#8230;]   modified: \&quot;0001-01-01T00:00:00Z\&quot;   &#8226; sources: {esri: {,}}   version: &#167;   sprite: \&quot;https://maps.geo.ap-southeast-2.amazonaws.com/maps/v0/maps/Geo-5pm-Map/sprites/sprites?key=v1.public.eyJqdGki0iJk0DFIMTQyNS0zZDAzLTRiNWI&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="* Headers Preview Response Initiator Timing    {version: 8, sources: {esri: {,}},..}    created: &quot;0001-01-01T00:00:00Z&quot;     glyphs: &quot;https://maps.geo.ap-southeast-2.amazonaws.com/maps/v0/maps/Geo-5pm-Map/glyphs/{fontstack}/{range}.pbf?key=v1.public.eyJqdGki0iJk0DFIMTQy    &#8226; layers: K{id: &quot;background&quot;, layout: {}, paint: {background-color: &quot;#a7d6fe&quot;}, showProperties: false,&#8230;.&#8250;,&#8230;]   modified: &quot;0001-01-01T00:00:00Z&quot;   &#8226; sources: {esri: {,}}   version: &#167;   sprite: &quot;https://maps.geo.ap-southeast-2.amazonaws.com/maps/v0/maps/Geo-5pm-Map/sprites/sprites?key=v1.public.eyJqdGki0iJk0DFIMTQyNS0zZDAzLTRiNWI" title="* Headers Preview Response Initiator Timing    {version: 8, sources: {esri: {,}},..}    created: &quot;0001-01-01T00:00:00Z&quot;     glyphs: &quot;https://maps.geo.ap-southeast-2.amazonaws.com/maps/v0/maps/Geo-5pm-Map/glyphs/{fontstack}/{range}.pbf?key=v1.public.eyJqdGki0iJk0DFIMTQy    &#8226; layers: K{id: &quot;background&quot;, layout: {}, paint: {background-color: &quot;#a7d6fe&quot;}, showProperties: false,&#8230;.&#8250;,&#8230;]   modified: &quot;0001-01-01T00:00:00Z&quot;   &#8226; sources: {esri: {,}}   version: &#167;   sprite: &quot;https://maps.geo.ap-southeast-2.amazonaws.com/maps/v0/maps/Geo-5pm-Map/sprites/sprites?key=v1.public.eyJqdGki0iJk0DFIMTQyNS0zZDAzLTRiNWI" srcset="https://substackcdn.com/image/fetch/$s_!SfLD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93e36816-a0b8-4b87-a88d-d7d4d5ecfe20_1984x330.png 424w, https://substackcdn.com/image/fetch/$s_!SfLD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93e36816-a0b8-4b87-a88d-d7d4d5ecfe20_1984x330.png 848w, https://substackcdn.com/image/fetch/$s_!SfLD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93e36816-a0b8-4b87-a88d-d7d4d5ecfe20_1984x330.png 1272w, https://substackcdn.com/image/fetch/$s_!SfLD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93e36816-a0b8-4b87-a88d-d7d4d5ecfe20_1984x330.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Fantastic. We sent a single request thru the API-Gateway, it returned a style document from Amazon Location Service and in that style document we find paths directly to ALS (and not our API-Gateway!) with our API key pre-injected. No further requests will be sent to this API-Gateway endpoint as this document configures the local client to make calls directly to these endpoints on ALS.  This should be free for me to use up to about 1 million page views a month. The ratio of page views to tile&#8217;s served is currently 60800 Tiles / 941 cities viewed or about 64.6 tiles served per city. I will be more concerned about the cost of serving ALS tiles well before I begin to pay anything for my global API-Gateway setup. <br><br>Let&#8217;s do that math. </p><p>If I have the maximum free tier usage of API-Gateway at 1,000,000 requests in a month thats 64,000,000 tiles served. I am using <code>Esri maps</code>, which is a commercial data provider so I pay $0.040 per 1,000 tiles. This is about $2,560 for 64 million tiles and $0.00 for 1 million requests to API-Gateway. While I hope that if my site is that popular I can make some return on investment, I will be much more concerned about the tiles than the efficient, local and speedy way I can serve them to you. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6oRr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35e20f67-e200-4eb0-9d2b-a9411b0fb1fe_1820x1524.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6oRr!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35e20f67-e200-4eb0-9d2b-a9411b0fb1fe_1820x1524.png 424w, https://substackcdn.com/image/fetch/$s_!6oRr!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35e20f67-e200-4eb0-9d2b-a9411b0fb1fe_1820x1524.png 848w, https://substackcdn.com/image/fetch/$s_!6oRr!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35e20f67-e200-4eb0-9d2b-a9411b0fb1fe_1820x1524.png 1272w, https://substackcdn.com/image/fetch/$s_!6oRr!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35e20f67-e200-4eb0-9d2b-a9411b0fb1fe_1820x1524.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6oRr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35e20f67-e200-4eb0-9d2b-a9411b0fb1fe_1820x1524.png" width="1456" height="1219" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/35e20f67-e200-4eb0-9d2b-a9411b0fb1fe_1820x1524.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1219,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:308278,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!6oRr!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35e20f67-e200-4eb0-9d2b-a9411b0fb1fe_1820x1524.png 424w, https://substackcdn.com/image/fetch/$s_!6oRr!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35e20f67-e200-4eb0-9d2b-a9411b0fb1fe_1820x1524.png 848w, https://substackcdn.com/image/fetch/$s_!6oRr!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35e20f67-e200-4eb0-9d2b-a9411b0fb1fe_1820x1524.png 1272w, https://substackcdn.com/image/fetch/$s_!6oRr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35e20f67-e200-4eb0-9d2b-a9411b0fb1fe_1820x1524.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p> Let&#8217;s look at the other costs.</p><p>I have an ACM certificate in each region for <code>geo.findyourfivepm.com</code> but all ACM certs are free.</p><p>There&#8217;s one more cost to consider and it might surprise you. Route53.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!F25l!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb323b949-bfe2-449e-b817-40de09e9b623_1832x930.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!F25l!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb323b949-bfe2-449e-b817-40de09e9b623_1832x930.png 424w, https://substackcdn.com/image/fetch/$s_!F25l!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb323b949-bfe2-449e-b817-40de09e9b623_1832x930.png 848w, https://substackcdn.com/image/fetch/$s_!F25l!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb323b949-bfe2-449e-b817-40de09e9b623_1832x930.png 1272w, https://substackcdn.com/image/fetch/$s_!F25l!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb323b949-bfe2-449e-b817-40de09e9b623_1832x930.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!F25l!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb323b949-bfe2-449e-b817-40de09e9b623_1832x930.png" width="1200" height="609.065934065934" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b323b949-bfe2-449e-b817-40de09e9b623_1832x930.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:739,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:170380,&quot;alt&quot;:&quot;Queries The following query prices are prorated; for example, a hosted zone with 100,000 standard queries / month would be charged $0.04 and a hosted zone with 100,000 Latency-Based Routing queries / month would be charged $0.06. Standard Queries &#8226; $0.40 per million queries - first 1 Billion queries / month &#8226; $0.20 per million queries - over 1 Billion queries / month Latency Based Routing Queries &#8226; $0.60 per million queries - first 1 Billion queries / month &#8226; $0.30 per million queries - over 1 Billion queries / month Geo DNS and Geoproximity Queries &#8226; $0.70 per million queries -- first 1 Billion queries / month &#8226; $0.35 per million queries - over 1 Billion queries / month&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="Queries The following query prices are prorated; for example, a hosted zone with 100,000 standard queries / month would be charged $0.04 and a hosted zone with 100,000 Latency-Based Routing queries / month would be charged $0.06. Standard Queries &#8226; $0.40 per million queries - first 1 Billion queries / month &#8226; $0.20 per million queries - over 1 Billion queries / month Latency Based Routing Queries &#8226; $0.60 per million queries - first 1 Billion queries / month &#8226; $0.30 per million queries - over 1 Billion queries / month Geo DNS and Geoproximity Queries &#8226; $0.70 per million queries -- first 1 Billion queries / month &#8226; $0.35 per million queries - over 1 Billion queries / month" title="Queries The following query prices are prorated; for example, a hosted zone with 100,000 standard queries / month would be charged $0.04 and a hosted zone with 100,000 Latency-Based Routing queries / month would be charged $0.06. Standard Queries &#8226; $0.40 per million queries - first 1 Billion queries / month &#8226; $0.20 per million queries - over 1 Billion queries / month Latency Based Routing Queries &#8226; $0.60 per million queries - first 1 Billion queries / month &#8226; $0.30 per million queries - over 1 Billion queries / month Geo DNS and Geoproximity Queries &#8226; $0.70 per million queries -- first 1 Billion queries / month &#8226; $0.35 per million queries - over 1 Billion queries / month" srcset="https://substackcdn.com/image/fetch/$s_!F25l!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb323b949-bfe2-449e-b817-40de09e9b623_1832x930.png 424w, https://substackcdn.com/image/fetch/$s_!F25l!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb323b949-bfe2-449e-b817-40de09e9b623_1832x930.png 848w, https://substackcdn.com/image/fetch/$s_!F25l!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb323b949-bfe2-449e-b817-40de09e9b623_1832x930.png 1272w, https://substackcdn.com/image/fetch/$s_!F25l!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb323b949-bfe2-449e-b817-40de09e9b623_1832x930.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>You might think I&#8217;m paying $0.20/million queries <em>more</em> than a standard query for a latency based query but they&#8217;re actually free. These are alias queries and alias queries are all FREE.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fljj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7722c35f-16ea-4bc3-89a5-02da85ce80c2_1860x1596.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fljj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7722c35f-16ea-4bc3-89a5-02da85ce80c2_1860x1596.png 424w, https://substackcdn.com/image/fetch/$s_!fljj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7722c35f-16ea-4bc3-89a5-02da85ce80c2_1860x1596.png 848w, https://substackcdn.com/image/fetch/$s_!fljj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7722c35f-16ea-4bc3-89a5-02da85ce80c2_1860x1596.png 1272w, https://substackcdn.com/image/fetch/$s_!fljj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7722c35f-16ea-4bc3-89a5-02da85ce80c2_1860x1596.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!fljj!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7722c35f-16ea-4bc3-89a5-02da85ce80c2_1860x1596.png" width="1200" height="1029.3956043956043" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7722c35f-16ea-4bc3-89a5-02da85ce80c2_1860x1596.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:1249,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:384840,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!fljj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7722c35f-16ea-4bc3-89a5-02da85ce80c2_1860x1596.png 424w, https://substackcdn.com/image/fetch/$s_!fljj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7722c35f-16ea-4bc3-89a5-02da85ce80c2_1860x1596.png 848w, https://substackcdn.com/image/fetch/$s_!fljj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7722c35f-16ea-4bc3-89a5-02da85ce80c2_1860x1596.png 1272w, https://substackcdn.com/image/fetch/$s_!fljj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7722c35f-16ea-4bc3-89a5-02da85ce80c2_1860x1596.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Free is good and if my math is right, this solution costs no more than if all my map tiles are served from a single region - unless you <em><strong>finally</strong></em> make me popular and start sending me over a million page views a month. </p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.123cloud.st/p/regional-to-global-adapting-amazon?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.123cloud.st/p/regional-to-global-adapting-amazon?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.123cloud.st/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.123cloud.st/subscribe?"><span>Subscribe now</span></a></p><p>This solution is ingeniously simple yet effective <s>if i do say so myself</s>. By replicating the Amazon Location Service setup across various regions(I&#8217;m using 7) and utilizing API-Gateway with custom proxy rules, I can dynamically inject the correct regional API key. All the while, Route53's latency-based routing seamlessly directs users to the closest endpoint, ensuring optimal performance.</p><p>This architecture not only solved the latency issue but also proved to be cost-efficient. Leveraging API Gateway's free tier and the fact that additional requests are handled directly by ALS!<br><br>I hope you&#8217;ve found this post while working on your own mapping solution and that it can guide you towards a fast, good <em><strong>and</strong></em> cheap win.</p><h2>Try it for yourself!</h2><p>Take a look at <a href="https://github.com/jeeshofone/LocationServiceGateway">https://github.com/jeeshofone/LocationServiceGateway</a>  for my full guide on deploying this solution yourself. You&#8217;ll find fully functional Cloudformation Templates and deployment scripts. Happy Mapping!<br><br></p>]]></content:encoded></item><item><title><![CDATA[The sun never sets on 5pm - Part 4]]></title><description><![CDATA[SO WHAT.]]></description><link>https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-4</link><guid isPermaLink="false">https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-4</guid><dc:creator><![CDATA[Will Laws]]></dc:creator><pubDate>Sun, 05 Nov 2023 21:44:17 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!9sou!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F667029b3-ccad-4dd5-9942-e4ffa32e2dc6_256x256.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2>Manifest</h2><p><a href="https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-0">Part 0 - Introduction</a><br><a href="https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-1">Part 1 - Failing Fast (Building with prompts)</a><br><a href="https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-2">Part 2 - MVP and Deployments </a><br><a href="https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-3">Part 3 - MVPolish </a><br>Part 4 - So what. *<strong>You</strong> are <em>Here</em> &#128129;&#8205;&#9792;&#65039;</p><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.123cloud.st/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">One Twenty Three Cloud Street is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>As we stand at the precipice of conclusion, looking back over the time-zones we've traversed together, it's evident that our journey was a slow success. With <a href="http://findyourfivepm.com">findyourfivepm.com</a>, we've learned that the sun never truly sets; it simply shifts, reminding us that the end of one adventure is the <s>dawn</s> &#8220;5PM&#8221; of another. </p><h1><strong>The Good</strong></h1><p>Our expedition was illuminated by <s>the brilliance of</s> ChatGPT 4, <s>a technological marvel</s> a chatbot that often turned code into conversation and problems into puzzles <s>waiting</s> needing to be solved. In those moments when the AI's responses clicked perfectly into place, it felt as if we had harnessed a piece of the future, a sliver of some advanced civilization's normality. I honestly think we&#8217;re a long way away from a simple conversation turning into a production ready product.</p><h1><strong>The Not-So-Good</strong></h1><p>But as any seasoned <s>traveler</s> architect knows, &#8220;it depends&#8221;.  Our AI companion, for all its prowess, <s>sometimes</s> led us astray with misinterpretations and oversights that <s>only a</s> any human eye could catch and correct. These were the times when the project felt Sisyphean, the summit always just out of reach, the sun dipping below the horizon just as we thought it should be 5pm forever.</p><h1><strong>The Verdict</strong></h1><p>There is no short-cut for experience.  ChatGPT 4, for all the times it hastened our pace, it also <s>reminded</s> forced us to slow down.  Code completion AI, like CodeWhisperer, and even GitHub Copilot, those are ready for prime-time. Filling in a line or two, or twelve in an existing well thought out project is less of an art, and more of an auto-complete bot.  <strong>Having a conversation with an LLM and pretending along with them that they're the sole developer, engineer, and architect on a project, that&#8217;s insane &#8212; delightfully so, but insane nonetheless.</strong></p><h1><strong>The Conclusion</strong></h1><p>And now, as the final lines are written and the last echoes of our digital odyssey fade, we understand that "The Sun Never Sets on 5pm" is more than a title; it's a truth. Our efforts, our passions, our relentless pursuit of what's next &#8212; these are the constants, the never-ending day of our world.</p><p>The project <a href="http://findyourfivepm.com">findyourfivepm.com</a> stands not just as a <em>product</em> but as a testament to the journey of discovery. It is a reminder that we should take time to relax from our work and find what makes us happy. Whether we leave the office at 5pm, 5am or any time in-between - it's only right that we find what makes us happy and take a moment each day to relax, learn and discover again what makes us tick.</p><p></p><p>Thank you for <s>walking</s> reading this path with me. May your <strong>Five PM</strong> be forever. </p><p>Oh and don&#8217;t use ChatGPT, or any another LLM for that matter, as the <em>only</em> tool in your belt -  there is no shortcut for experience and you&#8217;ll just deprive yourself of an opportunity to learn.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.123cloud.st/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">One Twenty Three Cloud Street is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[The sun never sets on 5pm - Part 3]]></title><description><![CDATA[MVPolish]]></description><link>https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-3</link><guid isPermaLink="false">https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-3</guid><dc:creator><![CDATA[Will Laws]]></dc:creator><pubDate>Sun, 05 Nov 2023 21:35:14 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F495a0b50-da0d-4c2f-a485-46e0afe81085_8887x18075.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2>Manifest</h2><p><a href="https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-0">Part 0 - Introduction</a><br><a href="https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-1">Part 1 - Failing Fast (Building with prompts)</a><br><a href="https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-2">Part 2 - MVP and Deployments </a><br>Part 3 - MVPolish *<strong>You</strong> are <em>Here</em> &#128129;&#8205;&#9792;&#65039;<br><a href="https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-4">Part 4 - So what.</a></p><p></p><h1>Procrastination is important (a <s>quick</s> tangent)</h1><p>Procrastination, oddly enough, serves as my guiding compass. Many see it as a vice, an impediment to productivity, but for me, it's an indicator, a sign that I'm on the brink of something truly meaningful. The gravitational pull towards distraction isn&#8217;t a sign of laziness, but a manifestation of the underlying tension of creation. <em>When that urge to delay kicks in, it&#8217;s often because I'm subconsciously recognizing the magnitude of what lies ahead.</em></p><p>The initial 80% of a task can be deceiving. It gives a false sense of accomplishment, luring one into thinking that the bulk of the work is done. But that&#8217;s the easy part. It&#8217;s the linear path, the expected journey. The final 20%? That&#8217;s where the real magic happens. That&#8217;s where the nuances come alive, the finesse is applied, and the true essence of the creation is realized. <em><strong>And that's terrifying.</strong></em> Because it demands vulnerability, authenticity, and a willingness to confront potential failure head-on.</p><p>Procrastination, in this light, isn't a weakness; <em>it&#8217;s an emotional barometer.</em> It measures the depth of investment in a project. When I feel that familiar itch to defer, to delay, to put off, it's my internal alarm sounding off, reminding me that I'm on the cusp of birthing something<s> genuinely remarkable.</s></p><p>So, instead of chastising myself for these moments of hesitancy, I've learned to embrace them. I take a step back, reflect, and understand the root of the resistance. Is it fear of criticism? The daunting nature of perfection? Or the weight of expectation? Once identified, it becomes easier to navigate through the fog of uncertainty.</p><p>In a world that often measures worth by <s>worthless</s> relentless productivity, I&#8217;ve found solace in understanding my patterns of procrastination. It&#8217;s become a beacon, illuminating the projects and pursuits that truly matter. And in that clarity, I find the strength to push past the inertia and dive headfirst into that thrilling, daunting, and transformative final stretch.<br></p><h1>The final stretch?</h1><p>If you haven&#8217;t <s>accidentally</s> discovered it already <s>from the numerous hints I&#8217;ve been dropping</s> this website is called <a href="http://FindYour5pm.com">FindYour5pm.com</a> and below is the final(?) version.  It&#8217;s time for me to cheat, <em>one final time.</em></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!yYdA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F495a0b50-da0d-4c2f-a485-46e0afe81085_8887x18075.png" data-component-name="Image2ToDOM"><div class="image2-inset image2-full-screen"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!yYdA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F495a0b50-da0d-4c2f-a485-46e0afe81085_8887x18075.png 424w, https://substackcdn.com/image/fetch/$s_!yYdA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F495a0b50-da0d-4c2f-a485-46e0afe81085_8887x18075.png 848w, https://substackcdn.com/image/fetch/$s_!yYdA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F495a0b50-da0d-4c2f-a485-46e0afe81085_8887x18075.png 1272w, https://substackcdn.com/image/fetch/$s_!yYdA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F495a0b50-da0d-4c2f-a485-46e0afe81085_8887x18075.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!yYdA!,w_5760,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F495a0b50-da0d-4c2f-a485-46e0afe81085_8887x18075.png" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/495a0b50-da0d-4c2f-a485-46e0afe81085_8887x18075.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;full&quot;,&quot;height&quot;:2961,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:17134707,&quot;alt&quot;:&quot; laws.rocks     Home Merch About Blog Buy Me A Beer + &#8722;  Leaflet IT'S 5PM IN TAIOHAE Local Time: 2023-10-27 17:37:53 GET A NEW CITY CITY DETAILS CITY DETAILS  City: Taiohae, Timezone: Pacific/Marquesas, Local Time: 2023-10-27 17:37:53 Featured Wikipedia Article for This Location  Taioha'e Taioha'e is the main town on Nuku Hiva island. The town is located on a former volcanic crater, which has partly collapsed into the ocean, creating a bay.  This is the site of Fort Madison, set up by Porter in 1813.  MERCH HELP SUPPORT THIS SITE  Support Our Site by Browsing Handcrafted Designs! Your purchases play a critical role in sustaining this website, ensuring we can 'keep the lights on.' Revel in the joy of the 5PM moment with our unique and playful merchandise, custom-crafted with love by yours truly. This is but a small glimpse into what we offer. Explore my complete collection on Redbubble.   Foxpresso on Ice All Over Print Tote Bag Foxpresso on Ice All Over Print Tote Bag   Sandy Serenity Framed Art Print Sandy Serenity Framed Art Print   Rarely Makes UNINTENTIONAL Mistakes Pullover Sweatshirt Rarely Makes UNINTENTIONAL Mistakes Pullover Sweatshirt   Indiana Cornfield Drawstring Bag Indiana Cornfield Drawstring Bag   Find Your Five PM Glossy Sticker Find Your Five PM Glossy Sticker   Devious Spinach Head Desk Mat Devious Spinach Head Desk Mat  ABOUT ABOUT FINDYOURFIVEPM  Discover \&quot;Where It's Five O'Clock\&quot; and Embrace a Balanced Life WELCOME TO FINDYOURFIVEPM  Welcome to FindYourFivePM, the one-stop platform where it's not just \&quot;five o'clock somewhere\&quot;&#8212;it's five o'clock everywhere! Built by Will Laws in May of 2023 through state-of-the-art LLM-driven development, we specialize in answering the age-old question: \&quot;Where is it five o'clock?\&quot; We offer more than just a clever timekeeping service across over 198,000 global locations. Our mission goes beyond the catchy phrase \&quot;it's five o'clock somewhere\&quot; by taking that attitude seriously to harmonize your work-life balance and improve your mental health.  WHO NEEDS TO KNOW \&quot;WHERE IT'S FIVE O'CLOCK?\&quot;  Absolutely everyone. Whether you're chasing the sunset, planning a virtual happy hour, or looking for the perfect time to unwind, we've got your back. If you've ever caught yourself wondering \&quot;where is it five o'clock right now,\&quot; FindYourFivePM is your go-to source for that information and so much more.  IT'S ALWAYS \&quot;FIVE O'CLOCK SOMEWHERE\&quot; WITH OUR HIGH-SPEED, EXCEPTIONAL MAPPING  Designed through the cutting-edge capabilities of LLM-driven development, FindYourFivePM guarantees a fast, smooth experience. Spend less time waiting for pages to load and more time discovering where it's five o'clock in the world right now.  WHY CHOOSE FINDYOURFIVEPM?  The phrase \&quot;it's five o'clock somewhere\&quot; isn't just a saying; it's a lifestyle. At FindYourFivePM, we help you internalize this philosophy for better work-life balance and mental well-being. Find out where it's five o'clock, then take that time to truly pause, reflect, and recharge. MEET THE CREATOR: WILL LAWS  Will Laws isn't just the man behind the scenes; he's the visionary who took the universal longing for \&quot;it's five o'clock somewhere\&quot; and turned it into a tangible reality. Harnessing LLM-driven development, Will has created a unique space for everyone to find their own version of 5 PM, wherever and whenever they need it.  A project of love. By 123cloud.st  Email: will@123cloud.st   Useful Links  Home About us One Twenty Three Cloud Street laws.rocks Our Services  Merch Blog &#127866; Buy me a beer &#169; Copyright FindYourFivePM.com. All Rights Reserved&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-fullscreen" alt=" laws.rocks     Home Merch About Blog Buy Me A Beer + &#8722;  Leaflet IT'S 5PM IN TAIOHAE Local Time: 2023-10-27 17:37:53 GET A NEW CITY CITY DETAILS CITY DETAILS  City: Taiohae, Timezone: Pacific/Marquesas, Local Time: 2023-10-27 17:37:53 Featured Wikipedia Article for This Location  Taioha'e Taioha'e is the main town on Nuku Hiva island. The town is located on a former volcanic crater, which has partly collapsed into the ocean, creating a bay.  This is the site of Fort Madison, set up by Porter in 1813.  MERCH HELP SUPPORT THIS SITE  Support Our Site by Browsing Handcrafted Designs! Your purchases play a critical role in sustaining this website, ensuring we can 'keep the lights on.' Revel in the joy of the 5PM moment with our unique and playful merchandise, custom-crafted with love by yours truly. This is but a small glimpse into what we offer. Explore my complete collection on Redbubble.   Foxpresso on Ice All Over Print Tote Bag Foxpresso on Ice All Over Print Tote Bag   Sandy Serenity Framed Art Print Sandy Serenity Framed Art Print   Rarely Makes UNINTENTIONAL Mistakes Pullover Sweatshirt Rarely Makes UNINTENTIONAL Mistakes Pullover Sweatshirt   Indiana Cornfield Drawstring Bag Indiana Cornfield Drawstring Bag   Find Your Five PM Glossy Sticker Find Your Five PM Glossy Sticker   Devious Spinach Head Desk Mat Devious Spinach Head Desk Mat  ABOUT ABOUT FINDYOURFIVEPM  Discover &quot;Where It's Five O'Clock&quot; and Embrace a Balanced Life WELCOME TO FINDYOURFIVEPM  Welcome to FindYourFivePM, the one-stop platform where it's not just &quot;five o'clock somewhere&quot;&#8212;it's five o'clock everywhere! Built by Will Laws in May of 2023 through state-of-the-art LLM-driven development, we specialize in answering the age-old question: &quot;Where is it five o'clock?&quot; We offer more than just a clever timekeeping service across over 198,000 global locations. Our mission goes beyond the catchy phrase &quot;it's five o'clock somewhere&quot; by taking that attitude seriously to harmonize your work-life balance and improve your mental health.  WHO NEEDS TO KNOW &quot;WHERE IT'S FIVE O'CLOCK?&quot;  Absolutely everyone. Whether you're chasing the sunset, planning a virtual happy hour, or looking for the perfect time to unwind, we've got your back. If you've ever caught yourself wondering &quot;where is it five o'clock right now,&quot; FindYourFivePM is your go-to source for that information and so much more.  IT'S ALWAYS &quot;FIVE O'CLOCK SOMEWHERE&quot; WITH OUR HIGH-SPEED, EXCEPTIONAL MAPPING  Designed through the cutting-edge capabilities of LLM-driven development, FindYourFivePM guarantees a fast, smooth experience. Spend less time waiting for pages to load and more time discovering where it's five o'clock in the world right now.  WHY CHOOSE FINDYOURFIVEPM?  The phrase &quot;it's five o'clock somewhere&quot; isn't just a saying; it's a lifestyle. At FindYourFivePM, we help you internalize this philosophy for better work-life balance and mental well-being. Find out where it's five o'clock, then take that time to truly pause, reflect, and recharge. MEET THE CREATOR: WILL LAWS  Will Laws isn't just the man behind the scenes; he's the visionary who took the universal longing for &quot;it's five o'clock somewhere&quot; and turned it into a tangible reality. Harnessing LLM-driven development, Will has created a unique space for everyone to find their own version of 5 PM, wherever and whenever they need it.  A project of love. By 123cloud.st  Email: will@123cloud.st   Useful Links  Home About us One Twenty Three Cloud Street laws.rocks Our Services  Merch Blog &#127866; Buy me a beer &#169; Copyright FindYourFivePM.com. All Rights Reserved" title=" laws.rocks     Home Merch About Blog Buy Me A Beer + &#8722;  Leaflet IT'S 5PM IN TAIOHAE Local Time: 2023-10-27 17:37:53 GET A NEW CITY CITY DETAILS CITY DETAILS  City: Taiohae, Timezone: Pacific/Marquesas, Local Time: 2023-10-27 17:37:53 Featured Wikipedia Article for This Location  Taioha'e Taioha'e is the main town on Nuku Hiva island. The town is located on a former volcanic crater, which has partly collapsed into the ocean, creating a bay.  This is the site of Fort Madison, set up by Porter in 1813.  MERCH HELP SUPPORT THIS SITE  Support Our Site by Browsing Handcrafted Designs! Your purchases play a critical role in sustaining this website, ensuring we can 'keep the lights on.' Revel in the joy of the 5PM moment with our unique and playful merchandise, custom-crafted with love by yours truly. This is but a small glimpse into what we offer. Explore my complete collection on Redbubble.   Foxpresso on Ice All Over Print Tote Bag Foxpresso on Ice All Over Print Tote Bag   Sandy Serenity Framed Art Print Sandy Serenity Framed Art Print   Rarely Makes UNINTENTIONAL Mistakes Pullover Sweatshirt Rarely Makes UNINTENTIONAL Mistakes Pullover Sweatshirt   Indiana Cornfield Drawstring Bag Indiana Cornfield Drawstring Bag   Find Your Five PM Glossy Sticker Find Your Five PM Glossy Sticker   Devious Spinach Head Desk Mat Devious Spinach Head Desk Mat  ABOUT ABOUT FINDYOURFIVEPM  Discover &quot;Where It's Five O'Clock&quot; and Embrace a Balanced Life WELCOME TO FINDYOURFIVEPM  Welcome to FindYourFivePM, the one-stop platform where it's not just &quot;five o'clock somewhere&quot;&#8212;it's five o'clock everywhere! Built by Will Laws in May of 2023 through state-of-the-art LLM-driven development, we specialize in answering the age-old question: &quot;Where is it five o'clock?&quot; We offer more than just a clever timekeeping service across over 198,000 global locations. Our mission goes beyond the catchy phrase &quot;it's five o'clock somewhere&quot; by taking that attitude seriously to harmonize your work-life balance and improve your mental health.  WHO NEEDS TO KNOW &quot;WHERE IT'S FIVE O'CLOCK?&quot;  Absolutely everyone. Whether you're chasing the sunset, planning a virtual happy hour, or looking for the perfect time to unwind, we've got your back. If you've ever caught yourself wondering &quot;where is it five o'clock right now,&quot; FindYourFivePM is your go-to source for that information and so much more.  IT'S ALWAYS &quot;FIVE O'CLOCK SOMEWHERE&quot; WITH OUR HIGH-SPEED, EXCEPTIONAL MAPPING  Designed through the cutting-edge capabilities of LLM-driven development, FindYourFivePM guarantees a fast, smooth experience. Spend less time waiting for pages to load and more time discovering where it's five o'clock in the world right now.  WHY CHOOSE FINDYOURFIVEPM?  The phrase &quot;it's five o'clock somewhere&quot; isn't just a saying; it's a lifestyle. At FindYourFivePM, we help you internalize this philosophy for better work-life balance and mental well-being. Find out where it's five o'clock, then take that time to truly pause, reflect, and recharge. MEET THE CREATOR: WILL LAWS  Will Laws isn't just the man behind the scenes; he's the visionary who took the universal longing for &quot;it's five o'clock somewhere&quot; and turned it into a tangible reality. Harnessing LLM-driven development, Will has created a unique space for everyone to find their own version of 5 PM, wherever and whenever they need it.  A project of love. By 123cloud.st  Email: will@123cloud.st   Useful Links  Home About us One Twenty Three Cloud Street laws.rocks Our Services  Merch Blog &#127866; Buy me a beer &#169; Copyright FindYourFivePM.com. All Rights Reserved" srcset="https://substackcdn.com/image/fetch/$s_!yYdA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F495a0b50-da0d-4c2f-a485-46e0afe81085_8887x18075.png 424w, https://substackcdn.com/image/fetch/$s_!yYdA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F495a0b50-da0d-4c2f-a485-46e0afe81085_8887x18075.png 848w, https://substackcdn.com/image/fetch/$s_!yYdA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F495a0b50-da0d-4c2f-a485-46e0afe81085_8887x18075.png 1272w, https://substackcdn.com/image/fetch/$s_!yYdA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F495a0b50-da0d-4c2f-a485-46e0afe81085_8887x18075.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Remember in Part 0 where I said &#8220;Rounding out the features is a slick e-commerce integration, offering branded merchandise. Drop-shipped with minimal fuss and a modest markup, these trinkets and keepsakes add a physical touch to the digital experience, and offer a way to keep the lights on.&#8221; Well that&#8217;s finally here.</figcaption></figure></div><p>To achieve this <s>marvelous</s> design - I paid a guy on fiverr.com <s>a bit</s> more than $5AUD to get me setup. ChatGPT wasn&#8217;t cutting it. I could never get it to do the layout properly, or work with multiple files containing different parts of the code. </p><p>Sometimes it felt like this was because I couldn&#8217;t keep enough code in the available context space; sometimes I felt like it just wasn&#8217;t up to the task. What I got from my new friend on Fiverr was basically a website template with a full width map and what I assume is the right folder structure and layout for a front end. </p><p>I&#8217;ve spent the last 15 years working on backend infrastructure, both on-premise and in the AWS Cloud and have entirely ignored <em>everything</em> there is to know about front-end. I&#8217;ve found my talents best placed in the specialities of architecture, networking, containers and event driven systems. Also I bought a logo - sue me. </p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!hcMf!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6f6f85c-4f58-43c3-8772-1be68103f587_2654x578.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hcMf!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6f6f85c-4f58-43c3-8772-1be68103f587_2654x578.png 424w, https://substackcdn.com/image/fetch/$s_!hcMf!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6f6f85c-4f58-43c3-8772-1be68103f587_2654x578.png 848w, https://substackcdn.com/image/fetch/$s_!hcMf!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6f6f85c-4f58-43c3-8772-1be68103f587_2654x578.png 1272w, https://substackcdn.com/image/fetch/$s_!hcMf!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6f6f85c-4f58-43c3-8772-1be68103f587_2654x578.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!hcMf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6f6f85c-4f58-43c3-8772-1be68103f587_2654x578.png" width="1456" height="317" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a6f6f85c-4f58-43c3-8772-1be68103f587_2654x578.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:317,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:61916,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!hcMf!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6f6f85c-4f58-43c3-8772-1be68103f587_2654x578.png 424w, https://substackcdn.com/image/fetch/$s_!hcMf!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6f6f85c-4f58-43c3-8772-1be68103f587_2654x578.png 848w, https://substackcdn.com/image/fetch/$s_!hcMf!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6f6f85c-4f58-43c3-8772-1be68103f587_2654x578.png 1272w, https://substackcdn.com/image/fetch/$s_!hcMf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6f6f85c-4f58-43c3-8772-1be68103f587_2654x578.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p><br>That logo? It might sound trivial, but it's a symbol. A symbol of my willingness to venture outside my comfort zone. It's not just about aesthetics; it's about embracing change, adapting, and realizing that even a backend guy can appreciate the beauty of a well-designed interface. So here's to new beginnings, to taking leaps, and to the incredible Fiverr talents that help bridge the gaps in our knowledge. </p><p></p><p>Now back to the story.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!sHEz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fb90495-0eb8-4769-86f1-a747b462ca03_1000x770.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!sHEz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fb90495-0eb8-4769-86f1-a747b462ca03_1000x770.jpeg 424w, https://substackcdn.com/image/fetch/$s_!sHEz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fb90495-0eb8-4769-86f1-a747b462ca03_1000x770.jpeg 848w, https://substackcdn.com/image/fetch/$s_!sHEz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fb90495-0eb8-4769-86f1-a747b462ca03_1000x770.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!sHEz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fb90495-0eb8-4769-86f1-a747b462ca03_1000x770.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!sHEz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fb90495-0eb8-4769-86f1-a747b462ca03_1000x770.jpeg" width="324" height="249.48" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1fb90495-0eb8-4769-86f1-a747b462ca03_1000x770.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:770,&quot;width&quot;:1000,&quot;resizeWidth&quot;:324,&quot;bytes&quot;:85502,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!sHEz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fb90495-0eb8-4769-86f1-a747b462ca03_1000x770.jpeg 424w, https://substackcdn.com/image/fetch/$s_!sHEz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fb90495-0eb8-4769-86f1-a747b462ca03_1000x770.jpeg 848w, https://substackcdn.com/image/fetch/$s_!sHEz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fb90495-0eb8-4769-86f1-a747b462ca03_1000x770.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!sHEz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fb90495-0eb8-4769-86f1-a747b462ca03_1000x770.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h1>What&#8217;s Next?</h1><p>The broad strokes of my architecture are completed. I have 2 primary tasks left. Put a bit of work into my new frontend and <s>un</s>fortunately add some more backend services.  </p><p><strong>&#8220;What backend service is missing?&#8221;</strong> You might ask - and rightly so. </p><p>After all, our PoC had every component in the &#8220;final&#8221; state of the website, but not as pretty, functional or inspiring <s>as the quality you come to expect from me</s>. If you remember from Part 2 - I can&#8217;t use OpenStreet maps here. <a href="https://operations.osmfoundation.org/policies/tiles/">It&#8217;s against the ToS</a> and it&#8217;s going to rate-limit my users. It&#8217;s time to evaluate other map providers:</p><ul><li><p>Self-Hosted OpenStreet Maps</p></li><li><p>Google Maps - Tiles API</p></li><li><p>Amazon Location Service</p></li></ul><p>OpenStreet Maps helpfully provides a list of commercial tile servers that I can use! <a href="https://wiki.openstreetmap.org/wiki/Tile_servers">https://wiki.openstreetmap.org/wiki/Tile_servers</a> - Lets evaluate them!</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!9l0B!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4d581ed-4e05-4ad3-8546-b69f2080fc00_1464x546.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9l0B!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4d581ed-4e05-4ad3-8546-b69f2080fc00_1464x546.png 424w, https://substackcdn.com/image/fetch/$s_!9l0B!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4d581ed-4e05-4ad3-8546-b69f2080fc00_1464x546.png 848w, https://substackcdn.com/image/fetch/$s_!9l0B!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4d581ed-4e05-4ad3-8546-b69f2080fc00_1464x546.png 1272w, https://substackcdn.com/image/fetch/$s_!9l0B!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4d581ed-4e05-4ad3-8546-b69f2080fc00_1464x546.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!9l0B!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4d581ed-4e05-4ad3-8546-b69f2080fc00_1464x546.png" width="1456" height="543" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e4d581ed-4e05-4ad3-8546-b69f2080fc00_1464x546.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:543,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:173191,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!9l0B!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4d581ed-4e05-4ad3-8546-b69f2080fc00_1464x546.png 424w, https://substackcdn.com/image/fetch/$s_!9l0B!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4d581ed-4e05-4ad3-8546-b69f2080fc00_1464x546.png 848w, https://substackcdn.com/image/fetch/$s_!9l0B!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4d581ed-4e05-4ad3-8546-b69f2080fc00_1464x546.png 1272w, https://substackcdn.com/image/fetch/$s_!9l0B!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4d581ed-4e05-4ad3-8546-b69f2080fc00_1464x546.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>To use these tile servers, I would need to host an <em><strong>always on backend</strong></em> that contained the entire planet worth of tiles.  This sounds really fun! </p><p>I have done this in the past for other projects that I won&#8217;t get into here and the problem with this system is that I have to maintain all updates to the tiles, and I have to host an always on service regardless of how many users find my page. This will significantly increase my costs and not allow my website to scale dynamically in price with user volume. </p><p>Instead, I want someone else to host this non-trivial component for me. Thankfully there are numerous Raster and Vector Tile providers that do just this!</p><p><a href="https://wiki.openstreetmap.org/wiki/Raster_tile_providers">https://wiki.openstreetmap.org/wiki/Raster_tile_providers</a></p><p><a href="https://wiki.openstreetmap.org/wiki/Vector_tiles#Providers">https://wiki.openstreetmap.org/wiki/Vector_tiles#Providers</a></p><p>They all cost money. I&#8217;m ok with paying; however, most of the plans are not pay-as-you-go, but instead use an upfront plan with X number of tiles available to consume in a month. I don&#8217;t want to keep track of consumed tiles and work out how to update my plan accordingly and the prices are kinda expensive. </p><p>So what about <a href="https://developers.google.com/maps/documentation/tile">Google Maps Tiles API</a>?<br>This is pay as you go pricing!</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Bmgg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8027375b-e20c-411f-b08f-cc1f34601bd5_1828x690.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Bmgg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8027375b-e20c-411f-b08f-cc1f34601bd5_1828x690.png 424w, https://substackcdn.com/image/fetch/$s_!Bmgg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8027375b-e20c-411f-b08f-cc1f34601bd5_1828x690.png 848w, https://substackcdn.com/image/fetch/$s_!Bmgg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8027375b-e20c-411f-b08f-cc1f34601bd5_1828x690.png 1272w, https://substackcdn.com/image/fetch/$s_!Bmgg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8027375b-e20c-411f-b08f-cc1f34601bd5_1828x690.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Bmgg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8027375b-e20c-411f-b08f-cc1f34601bd5_1828x690.png" width="1456" height="550" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8027375b-e20c-411f-b08f-cc1f34601bd5_1828x690.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:550,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:136258,&quot;alt&quot;:&quot;Pricing for the Map Tiles API  SKU: Map Tiles API: 2D Map Tiles  A request to Map Tiles API retrieving Roadmap, Satellite, or Terrain Tiles. Note that Session Token and Viewport information requests aren't billed.  MONTHLY VOLUME RANGE (Price per REQUEST) 0 - 1,000,000\t1,000,001 - 5,000,000\t5,000,001+ 0.0006 USD per each (0.60 USD per 1000)\t0.00048 USD per each (0.48 USD per 1000)\tContact Sales for volume pricing&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Pricing for the Map Tiles API  SKU: Map Tiles API: 2D Map Tiles  A request to Map Tiles API retrieving Roadmap, Satellite, or Terrain Tiles. Note that Session Token and Viewport information requests aren't billed.  MONTHLY VOLUME RANGE (Price per REQUEST) 0 - 1,000,000&#9;1,000,001 - 5,000,000&#9;5,000,001+ 0.0006 USD per each (0.60 USD per 1000)&#9;0.00048 USD per each (0.48 USD per 1000)&#9;Contact Sales for volume pricing" title="Pricing for the Map Tiles API  SKU: Map Tiles API: 2D Map Tiles  A request to Map Tiles API retrieving Roadmap, Satellite, or Terrain Tiles. Note that Session Token and Viewport information requests aren't billed.  MONTHLY VOLUME RANGE (Price per REQUEST) 0 - 1,000,000&#9;1,000,001 - 5,000,000&#9;5,000,001+ 0.0006 USD per each (0.60 USD per 1000)&#9;0.00048 USD per each (0.48 USD per 1000)&#9;Contact Sales for volume pricing" srcset="https://substackcdn.com/image/fetch/$s_!Bmgg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8027375b-e20c-411f-b08f-cc1f34601bd5_1828x690.png 424w, https://substackcdn.com/image/fetch/$s_!Bmgg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8027375b-e20c-411f-b08f-cc1f34601bd5_1828x690.png 848w, https://substackcdn.com/image/fetch/$s_!Bmgg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8027375b-e20c-411f-b08f-cc1f34601bd5_1828x690.png 1272w, https://substackcdn.com/image/fetch/$s_!Bmgg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8027375b-e20c-411f-b08f-cc1f34601bd5_1828x690.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Google Maps Tiles API is priced at $0.60 USD per 1000 tiles (up to 1,000,000 tiles) per month. and then $0.48 USD per 1000 tiles from 1,000,001 to 5,000,000 tiles. (Before becoming famous from writing this blog post I used about 128,000 tiles per month)  1,000,000 tiles would cost $0.60 * 1,000 = $600USD/month. (128,000 tiles would cost $76/month) </p><p>That&#8217;s looking better - since right now hardly anyone uses this site, and maybe I&#8217;ll have a good conversion rate on my silly designs I sell on the site - this will very much be my biggest cost!</p><p></p><p>I work at AWS. Let&#8217;s checkout <a href="https://aws.amazon.com/location/pricing/">Amazon Location Service</a> then? </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!eCjo!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc172393-7995-4bb6-a54c-693f8508673a_1802x1322.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!eCjo!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc172393-7995-4bb6-a54c-693f8508673a_1802x1322.png 424w, https://substackcdn.com/image/fetch/$s_!eCjo!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc172393-7995-4bb6-a54c-693f8508673a_1802x1322.png 848w, https://substackcdn.com/image/fetch/$s_!eCjo!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc172393-7995-4bb6-a54c-693f8508673a_1802x1322.png 1272w, https://substackcdn.com/image/fetch/$s_!eCjo!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc172393-7995-4bb6-a54c-693f8508673a_1802x1322.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!eCjo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc172393-7995-4bb6-a54c-693f8508673a_1802x1322.png" width="1456" height="1068" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fc172393-7995-4bb6-a54c-693f8508673a_1802x1322.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1068,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:229934,&quot;alt&quot;:&quot;Amazon Location Service Paid Tier  After the three-month free-tier period is complete, or if you exceed the free tier limits defined below, you pay for the requests your application makes to the service outlined in the table below. Region:  Amazon Location Service offers a choice of commercial data providers or open data, where commercial providers generally offer higher data quality and open data options offer higher licensing flexibility. All providers are not available in all regions or for all capabilities. See Data Provider Availability.  Commercial Data Providers\tPrice Map tiles retrieved (Vector or Raster)*\t$0.040 per 1,000 Open Data\tPrice Map tiles retrieved (Vector or Raster)\t$0.035 per 1,000 *Using Hybrid map style results in a higher number of map tile requests. This style overlays two map tiles: the satellite image (raster tile) in the background and the road network and labels (vector tile) on top. Your charges will include all tiles retrieved.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Amazon Location Service Paid Tier  After the three-month free-tier period is complete, or if you exceed the free tier limits defined below, you pay for the requests your application makes to the service outlined in the table below. Region:  Amazon Location Service offers a choice of commercial data providers or open data, where commercial providers generally offer higher data quality and open data options offer higher licensing flexibility. All providers are not available in all regions or for all capabilities. See Data Provider Availability.  Commercial Data Providers&#9;Price Map tiles retrieved (Vector or Raster)*&#9;$0.040 per 1,000 Open Data&#9;Price Map tiles retrieved (Vector or Raster)&#9;$0.035 per 1,000 *Using Hybrid map style results in a higher number of map tile requests. This style overlays two map tiles: the satellite image (raster tile) in the background and the road network and labels (vector tile) on top. Your charges will include all tiles retrieved." title="Amazon Location Service Paid Tier  After the three-month free-tier period is complete, or if you exceed the free tier limits defined below, you pay for the requests your application makes to the service outlined in the table below. Region:  Amazon Location Service offers a choice of commercial data providers or open data, where commercial providers generally offer higher data quality and open data options offer higher licensing flexibility. All providers are not available in all regions or for all capabilities. See Data Provider Availability.  Commercial Data Providers&#9;Price Map tiles retrieved (Vector or Raster)*&#9;$0.040 per 1,000 Open Data&#9;Price Map tiles retrieved (Vector or Raster)&#9;$0.035 per 1,000 *Using Hybrid map style results in a higher number of map tile requests. This style overlays two map tiles: the satellite image (raster tile) in the background and the road network and labels (vector tile) on top. Your charges will include all tiles retrieved." srcset="https://substackcdn.com/image/fetch/$s_!eCjo!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc172393-7995-4bb6-a54c-693f8508673a_1802x1322.png 424w, https://substackcdn.com/image/fetch/$s_!eCjo!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc172393-7995-4bb6-a54c-693f8508673a_1802x1322.png 848w, https://substackcdn.com/image/fetch/$s_!eCjo!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc172393-7995-4bb6-a54c-693f8508673a_1802x1322.png 1272w, https://substackcdn.com/image/fetch/$s_!eCjo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc172393-7995-4bb6-a54c-693f8508673a_1802x1322.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>If I use a Commercial Data provider, I&#8217;ll pay $0.04 USD per 1000 tiles. </p><p>Updating my math this becomes:</p><p><strong>$40 per million tiles and $5.12 for 128k tiles! Sold. (15x cheaper than Google Maps)</strong></p><p>I also <a href="https://aws.amazon.com/location/data-providers/">get a choice</a> of ESRI, HERE, OpenStreetMaps, and GrabMaps (among others) and I can deploy this in my infrastructure as code templates. This is by far the cheapest and easiest, pay-as you go solution.  </p><p><br>As of this writing(<a href="https://xkcd.com/1179/">2023-11-02</a>) there is partial support for Amazon Location Services in Cloudformation. I am able to deploy a map service but cannot deploy an API key for the service. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!56TY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd10d0747-74e9-46d9-bf76-0dc85f30a377_738x348.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!56TY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd10d0747-74e9-46d9-bf76-0dc85f30a377_738x348.png 424w, https://substackcdn.com/image/fetch/$s_!56TY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd10d0747-74e9-46d9-bf76-0dc85f30a377_738x348.png 848w, https://substackcdn.com/image/fetch/$s_!56TY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd10d0747-74e9-46d9-bf76-0dc85f30a377_738x348.png 1272w, https://substackcdn.com/image/fetch/$s_!56TY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd10d0747-74e9-46d9-bf76-0dc85f30a377_738x348.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!56TY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd10d0747-74e9-46d9-bf76-0dc85f30a377_738x348.png" width="738" height="348" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d10d0747-74e9-46d9-bf76-0dc85f30a377_738x348.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:348,&quot;width&quot;:738,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:54153,&quot;alt&quot;:&quot;  GeoMap:     Type: 'AWS::Location::Map'     Properties:       Configuration:         Style: 'VectorEsriNavigation'       Description: 'Map for specific region'       MapName: 'Geo-5pm-Map'       PricingPlan: 'RequestBasedUsage'&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="  GeoMap:     Type: 'AWS::Location::Map'     Properties:       Configuration:         Style: 'VectorEsriNavigation'       Description: 'Map for specific region'       MapName: 'Geo-5pm-Map'       PricingPlan: 'RequestBasedUsage'" title="  GeoMap:     Type: 'AWS::Location::Map'     Properties:       Configuration:         Style: 'VectorEsriNavigation'       Description: 'Map for specific region'       MapName: 'Geo-5pm-Map'       PricingPlan: 'RequestBasedUsage'" srcset="https://substackcdn.com/image/fetch/$s_!56TY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd10d0747-74e9-46d9-bf76-0dc85f30a377_738x348.png 424w, https://substackcdn.com/image/fetch/$s_!56TY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd10d0747-74e9-46d9-bf76-0dc85f30a377_738x348.png 848w, https://substackcdn.com/image/fetch/$s_!56TY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd10d0747-74e9-46d9-bf76-0dc85f30a377_738x348.png 1272w, https://substackcdn.com/image/fetch/$s_!56TY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd10d0747-74e9-46d9-bf76-0dc85f30a377_738x348.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>I&#8217;ve discovered a way (and as far as I&#8217;m concerned this &#8220;innovation&#8221; is well outside the scope of asking ChatGPT for help) to put Amazon Location Service in each relevant AWS region and direct a user to the closet region while injecting the correct API key for that region into the request without putting the API key in the front end javascript. This will get its own blog post later(<a href="https://www.123cloud.st/p/regional-to-global-adapting-amazon">if it&#8217;s later enough, this is now a link!</a>) as I hope I can help others with this task since it&#8217;s off topic for this post. Here&#8217;s a glimpse of what that looks like:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!GTJL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5933d68e-94c0-4ad6-8677-e1512fcaed9a_2174x2136.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GTJL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5933d68e-94c0-4ad6-8677-e1512fcaed9a_2174x2136.png 424w, https://substackcdn.com/image/fetch/$s_!GTJL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5933d68e-94c0-4ad6-8677-e1512fcaed9a_2174x2136.png 848w, https://substackcdn.com/image/fetch/$s_!GTJL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5933d68e-94c0-4ad6-8677-e1512fcaed9a_2174x2136.png 1272w, https://substackcdn.com/image/fetch/$s_!GTJL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5933d68e-94c0-4ad6-8677-e1512fcaed9a_2174x2136.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!GTJL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5933d68e-94c0-4ad6-8677-e1512fcaed9a_2174x2136.png" width="1456" height="1431" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5933d68e-94c0-4ad6-8677-e1512fcaed9a_2174x2136.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1431,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:490388,&quot;alt&quot;:&quot;  GeoApiGateway:     Type: 'AWS::Serverless::Api'     Properties:       Description: 'API Geo Proxy Service for specific region'       StageName: 'Prod'       EndpointConfiguration: REGIONAL       Domain:         DomainName: 'geo.findyourfivepm.com'         CertificateArn:           Ref: 'Certificate'       DefinitionBody:         swagger: '2.0'         info:           title:             Ref: 'AWS::StackName'         paths:           '/{proxy+}':             x-amazon-apigateway-any-method:               parameters:               - name: 'proxy'                 in: 'path'                 required: true                 type: 'string'               responses:                 '200':                   description: '200 response'                   headers:                     Access-Control-Allow-Origin:                       type: 'string'                       default: 'findyourfivepm.com, findyour5pm.com, {redacted}.cloudfront.net'                     Access-Control-Allow-Headers:                       type: 'string'                       default: \&quot;'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'\&quot;                     Access-Control-Allow-Methods:                       type: 'string'                       default: \&quot;'GET,OPTIONS'\&quot;               x-amazon-apigateway-integration:                 httpMethod: 'ANY'                 type: 'http_proxy'                 uri:                    Fn::Sub:                     - 'https://${LocationServiceEndpoint}/{proxy}?key=${ApiKey}'                     - LocationServiceEndpoint:                          Fn::FindInMap:                           - RegionMap                           - Ref: 'AWS::Region'                           - LocationServiceEndpoint                       ApiKey:                          Ref: 'ApiKey'                 requestParameters:                   integration.request.path.proxy: 'method.request.path.proxy'                 responses:                   default:                     statusCode: '200'                     responseParameters:                       method.response.header.Access-Control-Allow-Origin: \&quot;'findyourfivepm.com, findyour5pm.com, {redacted}.cloudfront.net'\&quot;                       method.response.header.Access-Control-Allow-Headers: \&quot;'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'\&quot;                       method.response.header.Access-Control-Allow-Methods: \&quot;'GET,OPTIONS'\&quot;   &quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="  GeoApiGateway:     Type: 'AWS::Serverless::Api'     Properties:       Description: 'API Geo Proxy Service for specific region'       StageName: 'Prod'       EndpointConfiguration: REGIONAL       Domain:         DomainName: 'geo.findyourfivepm.com'         CertificateArn:           Ref: 'Certificate'       DefinitionBody:         swagger: '2.0'         info:           title:             Ref: 'AWS::StackName'         paths:           '/{proxy+}':             x-amazon-apigateway-any-method:               parameters:               - name: 'proxy'                 in: 'path'                 required: true                 type: 'string'               responses:                 '200':                   description: '200 response'                   headers:                     Access-Control-Allow-Origin:                       type: 'string'                       default: 'findyourfivepm.com, findyour5pm.com, {redacted}.cloudfront.net'                     Access-Control-Allow-Headers:                       type: 'string'                       default: &quot;'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'&quot;                     Access-Control-Allow-Methods:                       type: 'string'                       default: &quot;'GET,OPTIONS'&quot;               x-amazon-apigateway-integration:                 httpMethod: 'ANY'                 type: 'http_proxy'                 uri:                    Fn::Sub:                     - 'https://${LocationServiceEndpoint}/{proxy}?key=${ApiKey}'                     - LocationServiceEndpoint:                          Fn::FindInMap:                           - RegionMap                           - Ref: 'AWS::Region'                           - LocationServiceEndpoint                       ApiKey:                          Ref: 'ApiKey'                 requestParameters:                   integration.request.path.proxy: 'method.request.path.proxy'                 responses:                   default:                     statusCode: '200'                     responseParameters:                       method.response.header.Access-Control-Allow-Origin: &quot;'findyourfivepm.com, findyour5pm.com, {redacted}.cloudfront.net'&quot;                       method.response.header.Access-Control-Allow-Headers: &quot;'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'&quot;                       method.response.header.Access-Control-Allow-Methods: &quot;'GET,OPTIONS'&quot;   " title="  GeoApiGateway:     Type: 'AWS::Serverless::Api'     Properties:       Description: 'API Geo Proxy Service for specific region'       StageName: 'Prod'       EndpointConfiguration: REGIONAL       Domain:         DomainName: 'geo.findyourfivepm.com'         CertificateArn:           Ref: 'Certificate'       DefinitionBody:         swagger: '2.0'         info:           title:             Ref: 'AWS::StackName'         paths:           '/{proxy+}':             x-amazon-apigateway-any-method:               parameters:               - name: 'proxy'                 in: 'path'                 required: true                 type: 'string'               responses:                 '200':                   description: '200 response'                   headers:                     Access-Control-Allow-Origin:                       type: 'string'                       default: 'findyourfivepm.com, findyour5pm.com, {redacted}.cloudfront.net'                     Access-Control-Allow-Headers:                       type: 'string'                       default: &quot;'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'&quot;                     Access-Control-Allow-Methods:                       type: 'string'                       default: &quot;'GET,OPTIONS'&quot;               x-amazon-apigateway-integration:                 httpMethod: 'ANY'                 type: 'http_proxy'                 uri:                    Fn::Sub:                     - 'https://${LocationServiceEndpoint}/{proxy}?key=${ApiKey}'                     - LocationServiceEndpoint:                          Fn::FindInMap:                           - RegionMap                           - Ref: 'AWS::Region'                           - LocationServiceEndpoint                       ApiKey:                          Ref: 'ApiKey'                 requestParameters:                   integration.request.path.proxy: 'method.request.path.proxy'                 responses:                   default:                     statusCode: '200'                     responseParameters:                       method.response.header.Access-Control-Allow-Origin: &quot;'findyourfivepm.com, findyour5pm.com, {redacted}.cloudfront.net'&quot;                       method.response.header.Access-Control-Allow-Headers: &quot;'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'&quot;                       method.response.header.Access-Control-Allow-Methods: &quot;'GET,OPTIONS'&quot;   " srcset="https://substackcdn.com/image/fetch/$s_!GTJL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5933d68e-94c0-4ad6-8677-e1512fcaed9a_2174x2136.png 424w, https://substackcdn.com/image/fetch/$s_!GTJL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5933d68e-94c0-4ad6-8677-e1512fcaed9a_2174x2136.png 848w, https://substackcdn.com/image/fetch/$s_!GTJL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5933d68e-94c0-4ad6-8677-e1512fcaed9a_2174x2136.png 1272w, https://substackcdn.com/image/fetch/$s_!GTJL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5933d68e-94c0-4ad6-8677-e1512fcaed9a_2174x2136.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gFmZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4da97784-0682-4246-a948-4c5089f18e2d_749x1104.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gFmZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4da97784-0682-4246-a948-4c5089f18e2d_749x1104.png 424w, https://substackcdn.com/image/fetch/$s_!gFmZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4da97784-0682-4246-a948-4c5089f18e2d_749x1104.png 848w, https://substackcdn.com/image/fetch/$s_!gFmZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4da97784-0682-4246-a948-4c5089f18e2d_749x1104.png 1272w, https://substackcdn.com/image/fetch/$s_!gFmZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4da97784-0682-4246-a948-4c5089f18e2d_749x1104.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gFmZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4da97784-0682-4246-a948-4c5089f18e2d_749x1104.png" width="749" height="1104" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4da97784-0682-4246-a948-4c5089f18e2d_749x1104.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1104,&quot;width&quot;:749,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:165926,&quot;alt&quot;:&quot;I want to update my website to use amazon location services with an api key like is in this guide. however i won't be using amplify, instead ill be using an api key  import './style.css'; import 'leaflet/dist/leaflet.css'; import L from 'leaflet'; import '@maplibre/maplibre-gl-leaflet'; import { Amplify } from '@aws-amplify/core'; import { Auth } from '@aws-amplify/auth'; import { Geo, AmazonLocationServiceMapStyle } from '@aws-amplify/geo'; import awsconfig from './aws-exports'; import { AmplifyMapLibreRequest } from 'maplibre-gl-js-amplify'; L.Icon.Default.imagePath = 'img/icon/';  Amplify.configure(awsconfig); const credentials = await Auth.currentCredentials(); const defaultMap = Geo.getDefaultMap() as AmazonLocationServiceMapStyle; const { transformRequest } = new AmplifyMapLibreRequest(     credentials,     defaultMap.region );  const map = L.map('map', {     center: [35.681, 139.767],     zoom: 11,     layers: [         L.maplibreGL({             style: Geo.getDefaultMap().mapName,             transformRequest: transformRequest,         })     ], }); map.attributionControl.addAttribution(     '&#169; 2022 HERE' );   Here is part of my current javascript (ask if you need to see something else to help)&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="I want to update my website to use amazon location services with an api key like is in this guide. however i won't be using amplify, instead ill be using an api key  import './style.css'; import 'leaflet/dist/leaflet.css'; import L from 'leaflet'; import '@maplibre/maplibre-gl-leaflet'; import { Amplify } from '@aws-amplify/core'; import { Auth } from '@aws-amplify/auth'; import { Geo, AmazonLocationServiceMapStyle } from '@aws-amplify/geo'; import awsconfig from './aws-exports'; import { AmplifyMapLibreRequest } from 'maplibre-gl-js-amplify'; L.Icon.Default.imagePath = 'img/icon/';  Amplify.configure(awsconfig); const credentials = await Auth.currentCredentials(); const defaultMap = Geo.getDefaultMap() as AmazonLocationServiceMapStyle; const { transformRequest } = new AmplifyMapLibreRequest(     credentials,     defaultMap.region );  const map = L.map('map', {     center: [35.681, 139.767],     zoom: 11,     layers: [         L.maplibreGL({             style: Geo.getDefaultMap().mapName,             transformRequest: transformRequest,         })     ], }); map.attributionControl.addAttribution(     '&#169; 2022 HERE' );   Here is part of my current javascript (ask if you need to see something else to help)" title="I want to update my website to use amazon location services with an api key like is in this guide. however i won't be using amplify, instead ill be using an api key  import './style.css'; import 'leaflet/dist/leaflet.css'; import L from 'leaflet'; import '@maplibre/maplibre-gl-leaflet'; import { Amplify } from '@aws-amplify/core'; import { Auth } from '@aws-amplify/auth'; import { Geo, AmazonLocationServiceMapStyle } from '@aws-amplify/geo'; import awsconfig from './aws-exports'; import { AmplifyMapLibreRequest } from 'maplibre-gl-js-amplify'; L.Icon.Default.imagePath = 'img/icon/';  Amplify.configure(awsconfig); const credentials = await Auth.currentCredentials(); const defaultMap = Geo.getDefaultMap() as AmazonLocationServiceMapStyle; const { transformRequest } = new AmplifyMapLibreRequest(     credentials,     defaultMap.region );  const map = L.map('map', {     center: [35.681, 139.767],     zoom: 11,     layers: [         L.maplibreGL({             style: Geo.getDefaultMap().mapName,             transformRequest: transformRequest,         })     ], }); map.attributionControl.addAttribution(     '&#169; 2022 HERE' );   Here is part of my current javascript (ask if you need to see something else to help)" srcset="https://substackcdn.com/image/fetch/$s_!gFmZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4da97784-0682-4246-a948-4c5089f18e2d_749x1104.png 424w, https://substackcdn.com/image/fetch/$s_!gFmZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4da97784-0682-4246-a948-4c5089f18e2d_749x1104.png 848w, https://substackcdn.com/image/fetch/$s_!gFmZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4da97784-0682-4246-a948-4c5089f18e2d_749x1104.png 1272w, https://substackcdn.com/image/fetch/$s_!gFmZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4da97784-0682-4246-a948-4c5089f18e2d_749x1104.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>I ask ChatGPT to help me implement this. Amazon Location services has <a href="https://docs.aws.amazon.com/location/latest/developerguide/how-to-access.html">multiple different authentication methods</a>. You can (launched after GPT4&#8217;s knowledge cut off) use an API Key, IAM or Cognito to provide auth.  We&#8217;re going to be using an API Key. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!DJgl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d9e0def-ee4d-4ae7-bcd1-ab2e79869b05_826x1366.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!DJgl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d9e0def-ee4d-4ae7-bcd1-ab2e79869b05_826x1366.png 424w, https://substackcdn.com/image/fetch/$s_!DJgl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d9e0def-ee4d-4ae7-bcd1-ab2e79869b05_826x1366.png 848w, https://substackcdn.com/image/fetch/$s_!DJgl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d9e0def-ee4d-4ae7-bcd1-ab2e79869b05_826x1366.png 1272w, https://substackcdn.com/image/fetch/$s_!DJgl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d9e0def-ee4d-4ae7-bcd1-ab2e79869b05_826x1366.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!DJgl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d9e0def-ee4d-4ae7-bcd1-ab2e79869b05_826x1366.png" width="826" height="1366" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6d9e0def-ee4d-4ae7-bcd1-ab2e79869b05_826x1366.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1366,&quot;width&quot;:826,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:251831,&quot;alt&quot;:&quot;From your question, it seems you want to switch your current map service (OpenStreetMap) to Amazon Location Service.  You are already using Leaflet for rendering maps. Good news is you can continue using it with Amazon Location Service by incorporating the maplibre-gl-leaflet plugin. However, authentication with Amazon Location Service won't use the Amplify library but an API Key instead.  Here are the steps to switch from OpenStreetMap to Amazon Location Service:  Firstly, ensure you have the following scripts in your HTML file. You've already mentioned having the Leaflet scripts, so add the following:  <script src=\&quot;https://unpkg.com/@maplibre/maplibre-gl-leaflet\&quot; defer></script> Next, import the necessary modules in your JavaScript file:  import L from 'leaflet'; import '@maplibre/maplibre-gl-leaflet'; Set up your API Key from AWS:  const awsApiKey = 'Your_AWS_API_KEY'; Update your map initialization code to use Amazon Location Service with an API Key:  // Initialize the map const map = L.map(\&quot;map\&quot;, {gestureHandling: true}).setView([0, 0], 5); L.maplibreGL({   style: 'https://maps.geo.us-west-2.amazonaws.com/maps/v1/map_name',   transformRequest: (url, resourceType) => {     if (resourceType === 'Style' &amp;&amp; !url.includes('::')) {       url += `?api-key=${awsApiKey}`;     }     return {       url: url     }   } }).addTo(map); Note:  Replace 'map_name' with your desired Amazon Location Service map name. Adjust 'us-west-2' to your desired region. The transformRequest function injects your AWS API Key into the request for the map style. This is a simple method to authenticate with Amazon Location Services.  You would need to replace all instances of L.tileLayer in your JavaScript file with L.maplibreGL and provide the appropriate style URL and transformRequest option.  Finally, make sure you've set up your CORS policy on AWS to accept requests from the domain your site is hosted on. Otherwise, you may encounter errors when trying to fetch tiles.  15:28 You i can't do imports in my javascript file as its a client side javascript file and i don't want to use something like Browserify&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="From your question, it seems you want to switch your current map service (OpenStreetMap) to Amazon Location Service.  You are already using Leaflet for rendering maps. Good news is you can continue using it with Amazon Location Service by incorporating the maplibre-gl-leaflet plugin. However, authentication with Amazon Location Service won't use the Amplify library but an API Key instead.  Here are the steps to switch from OpenStreetMap to Amazon Location Service:  Firstly, ensure you have the following scripts in your HTML file. You've already mentioned having the Leaflet scripts, so add the following:  <script src=&quot;https://unpkg.com/@maplibre/maplibre-gl-leaflet&quot; defer></script> Next, import the necessary modules in your JavaScript file:  import L from 'leaflet'; import '@maplibre/maplibre-gl-leaflet'; Set up your API Key from AWS:  const awsApiKey = 'Your_AWS_API_KEY'; Update your map initialization code to use Amazon Location Service with an API Key:  // Initialize the map const map = L.map(&quot;map&quot;, {gestureHandling: true}).setView([0, 0], 5); L.maplibreGL({   style: 'https://maps.geo.us-west-2.amazonaws.com/maps/v1/map_name',   transformRequest: (url, resourceType) => {     if (resourceType === 'Style' &amp;&amp; !url.includes('::')) {       url += `?api-key=${awsApiKey}`;     }     return {       url: url     }   } }).addTo(map); Note:  Replace 'map_name' with your desired Amazon Location Service map name. Adjust 'us-west-2' to your desired region. The transformRequest function injects your AWS API Key into the request for the map style. This is a simple method to authenticate with Amazon Location Services.  You would need to replace all instances of L.tileLayer in your JavaScript file with L.maplibreGL and provide the appropriate style URL and transformRequest option.  Finally, make sure you've set up your CORS policy on AWS to accept requests from the domain your site is hosted on. Otherwise, you may encounter errors when trying to fetch tiles.  15:28 You i can't do imports in my javascript file as its a client side javascript file and i don't want to use something like Browserify" title="From your question, it seems you want to switch your current map service (OpenStreetMap) to Amazon Location Service.  You are already using Leaflet for rendering maps. Good news is you can continue using it with Amazon Location Service by incorporating the maplibre-gl-leaflet plugin. However, authentication with Amazon Location Service won't use the Amplify library but an API Key instead.  Here are the steps to switch from OpenStreetMap to Amazon Location Service:  Firstly, ensure you have the following scripts in your HTML file. You've already mentioned having the Leaflet scripts, so add the following:  <script src=&quot;https://unpkg.com/@maplibre/maplibre-gl-leaflet&quot; defer></script> Next, import the necessary modules in your JavaScript file:  import L from 'leaflet'; import '@maplibre/maplibre-gl-leaflet'; Set up your API Key from AWS:  const awsApiKey = 'Your_AWS_API_KEY'; Update your map initialization code to use Amazon Location Service with an API Key:  // Initialize the map const map = L.map(&quot;map&quot;, {gestureHandling: true}).setView([0, 0], 5); L.maplibreGL({   style: 'https://maps.geo.us-west-2.amazonaws.com/maps/v1/map_name',   transformRequest: (url, resourceType) => {     if (resourceType === 'Style' &amp;&amp; !url.includes('::')) {       url += `?api-key=${awsApiKey}`;     }     return {       url: url     }   } }).addTo(map); Note:  Replace 'map_name' with your desired Amazon Location Service map name. Adjust 'us-west-2' to your desired region. The transformRequest function injects your AWS API Key into the request for the map style. This is a simple method to authenticate with Amazon Location Services.  You would need to replace all instances of L.tileLayer in your JavaScript file with L.maplibreGL and provide the appropriate style URL and transformRequest option.  Finally, make sure you've set up your CORS policy on AWS to accept requests from the domain your site is hosted on. Otherwise, you may encounter errors when trying to fetch tiles.  15:28 You i can't do imports in my javascript file as its a client side javascript file and i don't want to use something like Browserify" srcset="https://substackcdn.com/image/fetch/$s_!DJgl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d9e0def-ee4d-4ae7-bcd1-ab2e79869b05_826x1366.png 424w, https://substackcdn.com/image/fetch/$s_!DJgl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d9e0def-ee4d-4ae7-bcd1-ab2e79869b05_826x1366.png 848w, https://substackcdn.com/image/fetch/$s_!DJgl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d9e0def-ee4d-4ae7-bcd1-ab2e79869b05_826x1366.png 1272w, https://substackcdn.com/image/fetch/$s_!DJgl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d9e0def-ee4d-4ae7-bcd1-ab2e79869b05_826x1366.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Yeah, you can&#8217;t do imports on a client side javascript package (without using something like <a href="https://browserify.org">Browserify</a> to do &#129668;&#10024;magic&#10024;) as far as I can tell at least. </p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!F-7P!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c8ee6d3-49a8-435f-983c-8c9e76e8874e_814x171.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!F-7P!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c8ee6d3-49a8-435f-983c-8c9e76e8874e_814x171.png 424w, https://substackcdn.com/image/fetch/$s_!F-7P!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c8ee6d3-49a8-435f-983c-8c9e76e8874e_814x171.png 848w, https://substackcdn.com/image/fetch/$s_!F-7P!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c8ee6d3-49a8-435f-983c-8c9e76e8874e_814x171.png 1272w, https://substackcdn.com/image/fetch/$s_!F-7P!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c8ee6d3-49a8-435f-983c-8c9e76e8874e_814x171.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!F-7P!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c8ee6d3-49a8-435f-983c-8c9e76e8874e_814x171.png" width="814" height="171" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8c8ee6d3-49a8-435f-983c-8c9e76e8874e_814x171.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:171,&quot;width&quot;:814,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:36872,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!F-7P!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c8ee6d3-49a8-435f-983c-8c9e76e8874e_814x171.png 424w, https://substackcdn.com/image/fetch/$s_!F-7P!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c8ee6d3-49a8-435f-983c-8c9e76e8874e_814x171.png 848w, https://substackcdn.com/image/fetch/$s_!F-7P!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c8ee6d3-49a8-435f-983c-8c9e76e8874e_814x171.png 1272w, https://substackcdn.com/image/fetch/$s_!F-7P!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c8ee6d3-49a8-435f-983c-8c9e76e8874e_814x171.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!nc83!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe66c9d00-4320-48ca-a021-42b29b409ace_807x261.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nc83!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe66c9d00-4320-48ca-a021-42b29b409ace_807x261.png 424w, https://substackcdn.com/image/fetch/$s_!nc83!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe66c9d00-4320-48ca-a021-42b29b409ace_807x261.png 848w, https://substackcdn.com/image/fetch/$s_!nc83!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe66c9d00-4320-48ca-a021-42b29b409ace_807x261.png 1272w, https://substackcdn.com/image/fetch/$s_!nc83!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe66c9d00-4320-48ca-a021-42b29b409ace_807x261.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!nc83!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe66c9d00-4320-48ca-a021-42b29b409ace_807x261.png" width="807" height="261" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e66c9d00-4320-48ca-a021-42b29b409ace_807x261.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:261,&quot;width&quot;:807,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:51518,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!nc83!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe66c9d00-4320-48ca-a021-42b29b409ace_807x261.png 424w, https://substackcdn.com/image/fetch/$s_!nc83!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe66c9d00-4320-48ca-a021-42b29b409ace_807x261.png 848w, https://substackcdn.com/image/fetch/$s_!nc83!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe66c9d00-4320-48ca-a021-42b29b409ace_807x261.png 1272w, https://substackcdn.com/image/fetch/$s_!nc83!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe66c9d00-4320-48ca-a021-42b29b409ace_807x261.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Yeah this is not working - we already lost the context that I can&#8217;t really do this import in my client side javascript.  This is very frustrating and an area where an LLM trained on my code base would really help me out. <s>Too bad this isn&#8217;t a thing</s>. Imagine true pair-programming with an AI that has <em>all the context</em> of your repo. <a href="https://aws.amazon.com/codewhisperer/customize/">https://aws.amazon.com/codewhisperer/customize/</a></p><p>After many back and forth&#8217;s and lots of trial and error at the request of ChatGPT, I end up with this error to troubleshoot. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zpFE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c79ae71-e12a-4ee8-87c4-b00d11c71a4a_822x286.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zpFE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c79ae71-e12a-4ee8-87c4-b00d11c71a4a_822x286.png 424w, https://substackcdn.com/image/fetch/$s_!zpFE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c79ae71-e12a-4ee8-87c4-b00d11c71a4a_822x286.png 848w, https://substackcdn.com/image/fetch/$s_!zpFE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c79ae71-e12a-4ee8-87c4-b00d11c71a4a_822x286.png 1272w, https://substackcdn.com/image/fetch/$s_!zpFE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c79ae71-e12a-4ee8-87c4-b00d11c71a4a_822x286.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zpFE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c79ae71-e12a-4ee8-87c4-b00d11c71a4a_822x286.png" width="822" height="286" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3c79ae71-e12a-4ee8-87c4-b00d11c71a4a_822x286.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:286,&quot;width&quot;:822,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:55673,&quot;alt&quot;:&quot;even with those changes, it still looks like the map is moving and the marker is present, but the tiles are still loading with the 400 response   {\&quot;message\&quot;:\&quot;tile resolution part of 'Y' must be omitted because 'VectorOpenDataStandardLight' is a vector style\&quot;,\&quot;reason\&quot;:\&quot;FieldValidationFailed\&quot;,\&quot;fieldList\&quot;:[{\&quot;name\&quot;:\&quot;Y\&quot;,\&quot;message\&quot;:\&quot;tile resolution part of 'Y' must be omitted because 'VectorOpenDataStandardLight' is a vector style\&quot;}]}&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="even with those changes, it still looks like the map is moving and the marker is present, but the tiles are still loading with the 400 response   {&quot;message&quot;:&quot;tile resolution part of 'Y' must be omitted because 'VectorOpenDataStandardLight' is a vector style&quot;,&quot;reason&quot;:&quot;FieldValidationFailed&quot;,&quot;fieldList&quot;:[{&quot;name&quot;:&quot;Y&quot;,&quot;message&quot;:&quot;tile resolution part of 'Y' must be omitted because 'VectorOpenDataStandardLight' is a vector style&quot;}]}" title="even with those changes, it still looks like the map is moving and the marker is present, but the tiles are still loading with the 400 response   {&quot;message&quot;:&quot;tile resolution part of 'Y' must be omitted because 'VectorOpenDataStandardLight' is a vector style&quot;,&quot;reason&quot;:&quot;FieldValidationFailed&quot;,&quot;fieldList&quot;:[{&quot;name&quot;:&quot;Y&quot;,&quot;message&quot;:&quot;tile resolution part of 'Y' must be omitted because 'VectorOpenDataStandardLight' is a vector style&quot;}]}" srcset="https://substackcdn.com/image/fetch/$s_!zpFE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c79ae71-e12a-4ee8-87c4-b00d11c71a4a_822x286.png 424w, https://substackcdn.com/image/fetch/$s_!zpFE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c79ae71-e12a-4ee8-87c4-b00d11c71a4a_822x286.png 848w, https://substackcdn.com/image/fetch/$s_!zpFE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c79ae71-e12a-4ee8-87c4-b00d11c71a4a_822x286.png 1272w, https://substackcdn.com/image/fetch/$s_!zpFE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c79ae71-e12a-4ee8-87c4-b00d11c71a4a_822x286.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>What I&#8217;m seeing is a blank map with no tiles. There is a sense of motion in void as we pan and zoom from one location to another; however, all requests to the tile endpoint are getting error messages. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!aM4e!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9adcc61-95fa-4fe8-8e43-d9cc9cb29014_796x281.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!aM4e!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9adcc61-95fa-4fe8-8e43-d9cc9cb29014_796x281.png 424w, https://substackcdn.com/image/fetch/$s_!aM4e!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9adcc61-95fa-4fe8-8e43-d9cc9cb29014_796x281.png 848w, https://substackcdn.com/image/fetch/$s_!aM4e!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9adcc61-95fa-4fe8-8e43-d9cc9cb29014_796x281.png 1272w, https://substackcdn.com/image/fetch/$s_!aM4e!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9adcc61-95fa-4fe8-8e43-d9cc9cb29014_796x281.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!aM4e!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9adcc61-95fa-4fe8-8e43-d9cc9cb29014_796x281.png" width="796" height="281" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a9adcc61-95fa-4fe8-8e43-d9cc9cb29014_796x281.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:281,&quot;width&quot;:796,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:66375,&quot;alt&quot;:&quot;The error message suggests there's a problem with how the map is trying to load tiles from the Amazon Location Service. This error might occur because of incorrect usage or configuration of the style descriptor.  It appears that the style descriptor you are using ('VectorOpenDataStandardLight') is a vector style. Vector styles typically define how vector data should be drawn but don't include information about where to get the actual data, such as the tile coordinates. The Y field in the error message usually refers to the Y-coordinate of a tile in a raster-based map, but isn't applicable for a vector style map.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="The error message suggests there's a problem with how the map is trying to load tiles from the Amazon Location Service. This error might occur because of incorrect usage or configuration of the style descriptor.  It appears that the style descriptor you are using ('VectorOpenDataStandardLight') is a vector style. Vector styles typically define how vector data should be drawn but don't include information about where to get the actual data, such as the tile coordinates. The Y field in the error message usually refers to the Y-coordinate of a tile in a raster-based map, but isn't applicable for a vector style map." title="The error message suggests there's a problem with how the map is trying to load tiles from the Amazon Location Service. This error might occur because of incorrect usage or configuration of the style descriptor.  It appears that the style descriptor you are using ('VectorOpenDataStandardLight') is a vector style. Vector styles typically define how vector data should be drawn but don't include information about where to get the actual data, such as the tile coordinates. The Y field in the error message usually refers to the Y-coordinate of a tile in a raster-based map, but isn't applicable for a vector style map." srcset="https://substackcdn.com/image/fetch/$s_!aM4e!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9adcc61-95fa-4fe8-8e43-d9cc9cb29014_796x281.png 424w, https://substackcdn.com/image/fetch/$s_!aM4e!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9adcc61-95fa-4fe8-8e43-d9cc9cb29014_796x281.png 848w, https://substackcdn.com/image/fetch/$s_!aM4e!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9adcc61-95fa-4fe8-8e43-d9cc9cb29014_796x281.png 1272w, https://substackcdn.com/image/fetch/$s_!aM4e!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9adcc61-95fa-4fe8-8e43-d9cc9cb29014_796x281.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Rz8i!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab1d9630-0d72-4781-b3ed-b634f07143f5_796x137.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Rz8i!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab1d9630-0d72-4781-b3ed-b634f07143f5_796x137.png 424w, https://substackcdn.com/image/fetch/$s_!Rz8i!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab1d9630-0d72-4781-b3ed-b634f07143f5_796x137.png 848w, https://substackcdn.com/image/fetch/$s_!Rz8i!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab1d9630-0d72-4781-b3ed-b634f07143f5_796x137.png 1272w, https://substackcdn.com/image/fetch/$s_!Rz8i!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab1d9630-0d72-4781-b3ed-b634f07143f5_796x137.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Rz8i!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab1d9630-0d72-4781-b3ed-b634f07143f5_796x137.png" width="796" height="137" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ab1d9630-0d72-4781-b3ed-b634f07143f5_796x137.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:137,&quot;width&quot;:796,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:30685,&quot;alt&quot;:&quot;Unfortunately, without more information or the ability to directly interact with your setup, it's difficult to provide a more specific solution. I would recommend reaching out to the support of the respective services (Amazon Location Services or Maplibre GL JS) for more targeted help.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Unfortunately, without more information or the ability to directly interact with your setup, it's difficult to provide a more specific solution. I would recommend reaching out to the support of the respective services (Amazon Location Services or Maplibre GL JS) for more targeted help." title="Unfortunately, without more information or the ability to directly interact with your setup, it's difficult to provide a more specific solution. I would recommend reaching out to the support of the respective services (Amazon Location Services or Maplibre GL JS) for more targeted help." srcset="https://substackcdn.com/image/fetch/$s_!Rz8i!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab1d9630-0d72-4781-b3ed-b634f07143f5_796x137.png 424w, https://substackcdn.com/image/fetch/$s_!Rz8i!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab1d9630-0d72-4781-b3ed-b634f07143f5_796x137.png 848w, https://substackcdn.com/image/fetch/$s_!Rz8i!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab1d9630-0d72-4781-b3ed-b634f07143f5_796x137.png 1272w, https://substackcdn.com/image/fetch/$s_!Rz8i!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab1d9630-0d72-4781-b3ed-b634f07143f5_796x137.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><h3>Vector and Raster maps. Let&#8217;s talk about the differences quickly. </h3><p><strong>Raster maps</strong> are composed of pixels, each representing a specific geographic area, much like a digital photograph. These maps are essentially images where each pixel has a defined geographical position. They are best suited for intricate visual representations, such as satellite imagery or detailed terrain maps. Their main limitation is that as you zoom in, the image can become pixelated or require additional tiles at higher resolutions. </p><p>In contrast, <strong>vector maps</strong> are made up of points, lines, and polygons that represent real-world features like roads, rivers, and boundaries. The data in vector maps is mathematically defined, allowing for smooth scaling and crisp representations at any zoom level. These maps are often more interactive, as individual elements can be easily highlighted, colored, or labeled. However, they may require more computational power to render, especially when displaying complex data. </p><blockquote><p>While raster maps offer a fixed visual, vector maps are more dynamic and customizable, making them ideal for interactive web applications or when data overlay and manipulation are required.</p></blockquote><p>Choosing between the two often depends on the application's needs: the level of detail required, the degree of interactivity, and the available computational resources. For this project I&#8217;m using a Vector map since its fewer map tiles and in my opinion fits into the design language of the page more eloquently. </p><p></p><p>After some back and forth with ChatGPT <s>I</s> we end up using both MapLibreGL and Leaflet together to handle the map. Here is what that looks like:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!WPM4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F701524ca-a98a-4b2c-8dc9-f905b8368a9a_836x125.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!WPM4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F701524ca-a98a-4b2c-8dc9-f905b8368a9a_836x125.png 424w, https://substackcdn.com/image/fetch/$s_!WPM4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F701524ca-a98a-4b2c-8dc9-f905b8368a9a_836x125.png 848w, https://substackcdn.com/image/fetch/$s_!WPM4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F701524ca-a98a-4b2c-8dc9-f905b8368a9a_836x125.png 1272w, https://substackcdn.com/image/fetch/$s_!WPM4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F701524ca-a98a-4b2c-8dc9-f905b8368a9a_836x125.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!WPM4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F701524ca-a98a-4b2c-8dc9-f905b8368a9a_836x125.png" width="836" height="125" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/701524ca-a98a-4b2c-8dc9-f905b8368a9a_836x125.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:125,&quot;width&quot;:836,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:27449,&quot;alt&quot;:&quot;You will have to replace your map initialization with a leaflet map instance and then attach the maplibre-gl to it. Also, map.flyTo function's parameters are different in Leaflet as compared to Mapbox. Here is the updated code:&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="You will have to replace your map initialization with a leaflet map instance and then attach the maplibre-gl to it. Also, map.flyTo function's parameters are different in Leaflet as compared to Mapbox. Here is the updated code:" title="You will have to replace your map initialization with a leaflet map instance and then attach the maplibre-gl to it. Also, map.flyTo function's parameters are different in Leaflet as compared to Mapbox. Here is the updated code:" srcset="https://substackcdn.com/image/fetch/$s_!WPM4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F701524ca-a98a-4b2c-8dc9-f905b8368a9a_836x125.png 424w, https://substackcdn.com/image/fetch/$s_!WPM4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F701524ca-a98a-4b2c-8dc9-f905b8368a9a_836x125.png 848w, https://substackcdn.com/image/fetch/$s_!WPM4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F701524ca-a98a-4b2c-8dc9-f905b8368a9a_836x125.png 1272w, https://substackcdn.com/image/fetch/$s_!WPM4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F701524ca-a98a-4b2c-8dc9-f905b8368a9a_836x125.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!9Kmc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd84aeb78-2b90-4c5c-ad01-0b468819ece9_1462x1260.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9Kmc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd84aeb78-2b90-4c5c-ad01-0b468819ece9_1462x1260.png 424w, https://substackcdn.com/image/fetch/$s_!9Kmc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd84aeb78-2b90-4c5c-ad01-0b468819ece9_1462x1260.png 848w, https://substackcdn.com/image/fetch/$s_!9Kmc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd84aeb78-2b90-4c5c-ad01-0b468819ece9_1462x1260.png 1272w, https://substackcdn.com/image/fetch/$s_!9Kmc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd84aeb78-2b90-4c5c-ad01-0b468819ece9_1462x1260.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!9Kmc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd84aeb78-2b90-4c5c-ad01-0b468819ece9_1462x1260.png" width="1456" height="1255" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d84aeb78-2b90-4c5c-ad01-0b468819ece9_1462x1260.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1255,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:265198,&quot;alt&quot;:&quot;var map = L.map(\&quot;map\&quot;, {   center: [-25.2702, 134.2798],   zoom: 4,   gestureHandling: true }); let marker = L.marker([-25.2702, 134.2798]).addTo(map);  window.addEventListener(\&quot;load\&quot;, () => {   // Initialize the map   const mapName = \&quot;Geo-5pm-Map\&quot;;   const styleUrl = `https://geo.findyourfivepm.com/maps/v0/maps/${mapName}/style-descriptor`;    var gl = L.maplibreGL({     style: styleUrl   }).addTo(map);    // Now that the map has been initialized, we can proceed with the original load event logic.   if (window.location.hash) {     if (select(window.location.hash)) {       scrollto(window.location.hash);     }   } else {     // Extract geonameid query parameter from the URL     const urlParams = new URLSearchParams(window.location.search);     const geonameid = urlParams.get(\&quot;geonameid\&quot;);      if (geonameid) {       loadMap(geonameid);     } else {       // geonameid is not passed so set it to null       const geonameid = null;       loadMap(geonameid);     }   } });&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="var map = L.map(&quot;map&quot;, {   center: [-25.2702, 134.2798],   zoom: 4,   gestureHandling: true }); let marker = L.marker([-25.2702, 134.2798]).addTo(map);  window.addEventListener(&quot;load&quot;, () => {   // Initialize the map   const mapName = &quot;Geo-5pm-Map&quot;;   const styleUrl = `https://geo.findyourfivepm.com/maps/v0/maps/${mapName}/style-descriptor`;    var gl = L.maplibreGL({     style: styleUrl   }).addTo(map);    // Now that the map has been initialized, we can proceed with the original load event logic.   if (window.location.hash) {     if (select(window.location.hash)) {       scrollto(window.location.hash);     }   } else {     // Extract geonameid query parameter from the URL     const urlParams = new URLSearchParams(window.location.search);     const geonameid = urlParams.get(&quot;geonameid&quot;);      if (geonameid) {       loadMap(geonameid);     } else {       // geonameid is not passed so set it to null       const geonameid = null;       loadMap(geonameid);     }   } });" title="var map = L.map(&quot;map&quot;, {   center: [-25.2702, 134.2798],   zoom: 4,   gestureHandling: true }); let marker = L.marker([-25.2702, 134.2798]).addTo(map);  window.addEventListener(&quot;load&quot;, () => {   // Initialize the map   const mapName = &quot;Geo-5pm-Map&quot;;   const styleUrl = `https://geo.findyourfivepm.com/maps/v0/maps/${mapName}/style-descriptor`;    var gl = L.maplibreGL({     style: styleUrl   }).addTo(map);    // Now that the map has been initialized, we can proceed with the original load event logic.   if (window.location.hash) {     if (select(window.location.hash)) {       scrollto(window.location.hash);     }   } else {     // Extract geonameid query parameter from the URL     const urlParams = new URLSearchParams(window.location.search);     const geonameid = urlParams.get(&quot;geonameid&quot;);      if (geonameid) {       loadMap(geonameid);     } else {       // geonameid is not passed so set it to null       const geonameid = null;       loadMap(geonameid);     }   } });" srcset="https://substackcdn.com/image/fetch/$s_!9Kmc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd84aeb78-2b90-4c5c-ad01-0b468819ece9_1462x1260.png 424w, https://substackcdn.com/image/fetch/$s_!9Kmc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd84aeb78-2b90-4c5c-ad01-0b468819ece9_1462x1260.png 848w, https://substackcdn.com/image/fetch/$s_!9Kmc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd84aeb78-2b90-4c5c-ad01-0b468819ece9_1462x1260.png 1272w, https://substackcdn.com/image/fetch/$s_!9Kmc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd84aeb78-2b90-4c5c-ad01-0b468819ece9_1462x1260.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zrtx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02fb6be8-0a4f-4c08-8138-0dbde4be2fdd_2000x920.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zrtx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02fb6be8-0a4f-4c08-8138-0dbde4be2fdd_2000x920.png 424w, https://substackcdn.com/image/fetch/$s_!zrtx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02fb6be8-0a4f-4c08-8138-0dbde4be2fdd_2000x920.png 848w, https://substackcdn.com/image/fetch/$s_!zrtx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02fb6be8-0a4f-4c08-8138-0dbde4be2fdd_2000x920.png 1272w, https://substackcdn.com/image/fetch/$s_!zrtx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02fb6be8-0a4f-4c08-8138-0dbde4be2fdd_2000x920.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zrtx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02fb6be8-0a4f-4c08-8138-0dbde4be2fdd_2000x920.png" width="1456" height="670" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/02fb6be8-0a4f-4c08-8138-0dbde4be2fdd_2000x920.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:670,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:278558,&quot;alt&quot;:&quot;   // Fetch city information and update the map and text   fetch(apiUrl)     .then((response) => response.json())     .then((data) => {     const { city, local_time, latitude, longitude, timezone, admin1_code_name, admin2_code_name, country_code, country_name } = data;        const initialZoomLevel = 10;       const finalZoomLevel = 14;       if (marker) {         marker.setLatLng([latitude, longitude]);       }       document.getElementById(         \&quot;city-info\&quot;       ).innerText = `City: ${city}, Timezone: ${timezone}, Local Time: ${local_time}`;       document.getElementById(\&quot;city-name\&quot;).innerText = city;       document.getElementById(\&quot;local-time\&quot;).innerText = local_time;       // Fetch Wikipedia articles for the given coordinates       fetchWikipediaArticles(data);       // Smooth zoom out using flyTo method then zoom in to the final zoom level       map.flyTo([latitude, longitude], finalZoomLevel, { duration: 7, easeLinearity: 0.1, animate: true });       btnLoader.style.display = \&quot;none\&quot;;       btnText.style.display = \&quot;inline-block\&quot;;     })     .catch((error) => {       console.error(\&quot;Error fetching data:\&quot;, error);     });&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="   // Fetch city information and update the map and text   fetch(apiUrl)     .then((response) => response.json())     .then((data) => {     const { city, local_time, latitude, longitude, timezone, admin1_code_name, admin2_code_name, country_code, country_name } = data;        const initialZoomLevel = 10;       const finalZoomLevel = 14;       if (marker) {         marker.setLatLng([latitude, longitude]);       }       document.getElementById(         &quot;city-info&quot;       ).innerText = `City: ${city}, Timezone: ${timezone}, Local Time: ${local_time}`;       document.getElementById(&quot;city-name&quot;).innerText = city;       document.getElementById(&quot;local-time&quot;).innerText = local_time;       // Fetch Wikipedia articles for the given coordinates       fetchWikipediaArticles(data);       // Smooth zoom out using flyTo method then zoom in to the final zoom level       map.flyTo([latitude, longitude], finalZoomLevel, { duration: 7, easeLinearity: 0.1, animate: true });       btnLoader.style.display = &quot;none&quot;;       btnText.style.display = &quot;inline-block&quot;;     })     .catch((error) => {       console.error(&quot;Error fetching data:&quot;, error);     });" title="   // Fetch city information and update the map and text   fetch(apiUrl)     .then((response) => response.json())     .then((data) => {     const { city, local_time, latitude, longitude, timezone, admin1_code_name, admin2_code_name, country_code, country_name } = data;        const initialZoomLevel = 10;       const finalZoomLevel = 14;       if (marker) {         marker.setLatLng([latitude, longitude]);       }       document.getElementById(         &quot;city-info&quot;       ).innerText = `City: ${city}, Timezone: ${timezone}, Local Time: ${local_time}`;       document.getElementById(&quot;city-name&quot;).innerText = city;       document.getElementById(&quot;local-time&quot;).innerText = local_time;       // Fetch Wikipedia articles for the given coordinates       fetchWikipediaArticles(data);       // Smooth zoom out using flyTo method then zoom in to the final zoom level       map.flyTo([latitude, longitude], finalZoomLevel, { duration: 7, easeLinearity: 0.1, animate: true });       btnLoader.style.display = &quot;none&quot;;       btnText.style.display = &quot;inline-block&quot;;     })     .catch((error) => {       console.error(&quot;Error fetching data:&quot;, error);     });" srcset="https://substackcdn.com/image/fetch/$s_!zrtx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02fb6be8-0a4f-4c08-8138-0dbde4be2fdd_2000x920.png 424w, https://substackcdn.com/image/fetch/$s_!zrtx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02fb6be8-0a4f-4c08-8138-0dbde4be2fdd_2000x920.png 848w, https://substackcdn.com/image/fetch/$s_!zrtx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02fb6be8-0a4f-4c08-8138-0dbde4be2fdd_2000x920.png 1272w, https://substackcdn.com/image/fetch/$s_!zrtx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02fb6be8-0a4f-4c08-8138-0dbde4be2fdd_2000x920.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Q3TA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff693d216-8561-4672-b60a-89fad34ecd4a_791x621.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Q3TA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff693d216-8561-4672-b60a-89fad34ecd4a_791x621.png 424w, https://substackcdn.com/image/fetch/$s_!Q3TA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff693d216-8561-4672-b60a-89fad34ecd4a_791x621.png 848w, https://substackcdn.com/image/fetch/$s_!Q3TA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff693d216-8561-4672-b60a-89fad34ecd4a_791x621.png 1272w, https://substackcdn.com/image/fetch/$s_!Q3TA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff693d216-8561-4672-b60a-89fad34ecd4a_791x621.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Q3TA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff693d216-8561-4672-b60a-89fad34ecd4a_791x621.png" width="791" height="621" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f693d216-8561-4672-b60a-89fad34ecd4a_791x621.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:621,&quot;width&quot;:791,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:114598,&quot;alt&quot;:&quot;I apologize for misunderstanding your original intent. You are correct that you are using the MapLibre GL JS integration with Leaflet, which means you are working with a Leaflet map that can display MapLibre GL JS layers.  The error you are encountering seems to suggest that the Leaflet's method addTo() is not functioning correctly when attempting to add a marker to the map. This method is part of Leaflet's API and should work as expected.  Please make sure you are using the correct methods provided by Leaflet to add markers, since it seems you are mixing up MapLibre and Leaflet methods.  Try replacing your marker code with this:  if (marker) {     marker.setLatLng([latitude, longitude]);     map.panTo([latitude, longitude]); } else {     marker = L.marker([latitude, longitude]).addTo(map);     map.panTo([latitude, longitude]); } This should move the map to the correct position and place the marker on the map. If you are still encountering issues, please let me know.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="I apologize for misunderstanding your original intent. You are correct that you are using the MapLibre GL JS integration with Leaflet, which means you are working with a Leaflet map that can display MapLibre GL JS layers.  The error you are encountering seems to suggest that the Leaflet's method addTo() is not functioning correctly when attempting to add a marker to the map. This method is part of Leaflet's API and should work as expected.  Please make sure you are using the correct methods provided by Leaflet to add markers, since it seems you are mixing up MapLibre and Leaflet methods.  Try replacing your marker code with this:  if (marker) {     marker.setLatLng([latitude, longitude]);     map.panTo([latitude, longitude]); } else {     marker = L.marker([latitude, longitude]).addTo(map);     map.panTo([latitude, longitude]); } This should move the map to the correct position and place the marker on the map. If you are still encountering issues, please let me know." title="I apologize for misunderstanding your original intent. You are correct that you are using the MapLibre GL JS integration with Leaflet, which means you are working with a Leaflet map that can display MapLibre GL JS layers.  The error you are encountering seems to suggest that the Leaflet's method addTo() is not functioning correctly when attempting to add a marker to the map. This method is part of Leaflet's API and should work as expected.  Please make sure you are using the correct methods provided by Leaflet to add markers, since it seems you are mixing up MapLibre and Leaflet methods.  Try replacing your marker code with this:  if (marker) {     marker.setLatLng([latitude, longitude]);     map.panTo([latitude, longitude]); } else {     marker = L.marker([latitude, longitude]).addTo(map);     map.panTo([latitude, longitude]); } This should move the map to the correct position and place the marker on the map. If you are still encountering issues, please let me know." srcset="https://substackcdn.com/image/fetch/$s_!Q3TA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff693d216-8561-4672-b60a-89fad34ecd4a_791x621.png 424w, https://substackcdn.com/image/fetch/$s_!Q3TA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff693d216-8561-4672-b60a-89fad34ecd4a_791x621.png 848w, https://substackcdn.com/image/fetch/$s_!Q3TA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff693d216-8561-4672-b60a-89fad34ecd4a_791x621.png 1272w, https://substackcdn.com/image/fetch/$s_!Q3TA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff693d216-8561-4672-b60a-89fad34ecd4a_791x621.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>I then work through a few minor issues with the integration of MapLibre GL and Leaflet (taking maybe 10-15 messages) and I&#8217;m finally done with migrating the map to Amazon Location Service.<br><br>Yet another task that should have taken less than half this much time had I done it alone. <br></p><h1>E-Commerce</h1><p>If you remember back to Part 0:</p><div class="pullquote"><p>Rounding out the features is a slick e-commerce integration, offering branded merchandise. Drop-shipped with minimal fuss and a modest markup, these trinkets and keepsakes add a physical touch to the digital experience, and offer a way to keep the lights on. It's an inviting blend of education, entertainment, and commerce - a small slice of the globe served up on a silver web platter, with a side of fun.</p></div><p>Well right now all I have is a grid of static pictures with a box for text under them. That is neither slick nor integrated. Lets polish. </p><blockquote><p>Together, ChatGPT and I go thru the same process as before. But let's skip the technical back-and-forth this time?</p></blockquote><p>I have a few products on Redbubble - I want to show 6 random products on my page, this is what the HTML currently looks like - write a javascript function that puts them here - help me make a Lambda function that reads a json file of all the products and returns it via an API-Gateway endpoint - make the javascript function call the endpoint and show the 6 products that are returned. </p><div class="pullquote"><p>Cool it works - it took longer than I wanted - it needed coddling - and I made myself frustrated for the purpose of education, one, more, time.  Sound Familiar?</p></div><p>What's important is the result: a <s>living, breathing</s> front-end that now cycles through products <s>with a vigor that static images could never achieve</s>. The once bland grid has evolved into a carousel of creativity, <s>a vibrant display that beckons the onlooker</s> with the promise of <s>novelty and excitement</s> site-supporting-revenue with each visitor.</p><p>I, on the other hand, am happy. The satisfaction of seeing this in action is twofold: the visible, tangible product that speaks to the efforts of <s>development</s> shouting at a computer for months on end, and the <s>invisible, immeasurable growth</s> frustration that comes from tackling a challenge head-on. This part won't be seen by the users, but it doesn't diminish its value to me. </p><p>If anything, it's the secret ingredient that makes the visible elements that much more compelling.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.123cloud.st/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.123cloud.st/subscribe?"><span>Subscribe now</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-3?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-3?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><p>As we near the end of this blog series, I can't help but reflect on the journey. From the humble beginnings of an idea to the intricate web of services that now comprise <a href="http://FindYour5pm.com">FindYour5pm.com</a>, it's been a trek <s>through unknown territories, through valleys of doubt, and over peaks of achievement</s> and I&#8217;m tired of yelling at the machine.</p><p>The next and final installment, will pivot from the '<em>how</em>' and '<em>why</em>' and into the &#8220;<em>so what</em>?&#8221;</p><p>But for now, allow yourself a moment of procrastination &#8212; it might just lead you to your next big idea.</p><p></p><h2>Manifest</h2><p><a href="https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-0">Part 0 - Introduction</a><br><a href="https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-1">Part 1 - Failing Fast (Building with prompts)</a><br><a href="https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-2">Part 2 - MVP and Deployments </a><br>Part 3 - MVPolish *<strong>You</strong> are <em>Here</em> &#128129;&#8205;&#9792;&#65039;<br><a href="https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-4">Part 4 - So what.</a></p>]]></content:encoded></item><item><title><![CDATA[The sun never sets on 5pm - Part 2]]></title><description><![CDATA[MVP and Deployments]]></description><link>https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-2</link><guid isPermaLink="false">https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-2</guid><dc:creator><![CDATA[Will Laws]]></dc:creator><pubDate>Sat, 28 Oct 2023 05:52:51 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed155f18-0a2f-4245-8697-145e431b90ac_3908x1192.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2>Manifest</h2><p><a href="https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-0">Part 0 - Introduction</a><br><a href="https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-1">Part 1 - Failing Fast (Building with prompts)</a><br>Part 2 - MVP and Deployments *<strong>You</strong> are <em>Here</em> &#128129;&#8205;&#9792;&#65039;<br><a href="https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-3">Part 3 - MVPolish</a><br><a href="https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-4">Part 4 - So what.</a></p><h2>re: Cap</h2><p>We just got the backend Lambda function to return a valid JSON object and now it&#8217;s time to build out an MVP. We&#8217;re only using GPT-4 to write code and it&#8217;s taking way more questions than it really should to build what we need. </p><h4>Here&#8217;s what we have so far:</h4><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!eLVT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff59cb5aa-ed6d-40b3-af46-0948d8d1c496.heic" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!eLVT!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff59cb5aa-ed6d-40b3-af46-0948d8d1c496.heic 424w, https://substackcdn.com/image/fetch/$s_!eLVT!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff59cb5aa-ed6d-40b3-af46-0948d8d1c496.heic 848w, https://substackcdn.com/image/fetch/$s_!eLVT!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff59cb5aa-ed6d-40b3-af46-0948d8d1c496.heic 1272w, https://substackcdn.com/image/fetch/$s_!eLVT!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff59cb5aa-ed6d-40b3-af46-0948d8d1c496.heic 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!eLVT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff59cb5aa-ed6d-40b3-af46-0948d8d1c496.heic" width="256" height="120" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f59cb5aa-ed6d-40b3-af46-0948d8d1c496.heic&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:120,&quot;width&quot;:256,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:5550,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/heic&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!eLVT!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff59cb5aa-ed6d-40b3-af46-0948d8d1c496.heic 424w, https://substackcdn.com/image/fetch/$s_!eLVT!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff59cb5aa-ed6d-40b3-af46-0948d8d1c496.heic 848w, https://substackcdn.com/image/fetch/$s_!eLVT!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff59cb5aa-ed6d-40b3-af46-0948d8d1c496.heic 1272w, https://substackcdn.com/image/fetch/$s_!eLVT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff59cb5aa-ed6d-40b3-af46-0948d8d1c496.heic 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a><figcaption class="image-caption">Pathetic.</figcaption></figure></div><h4>Here&#8217;s where we&#8217;re going:</h4><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!xEy6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60f0478d-bc9c-48ea-bad5-7fc452ebb05f.heic" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!xEy6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60f0478d-bc9c-48ea-bad5-7fc452ebb05f.heic 424w, https://substackcdn.com/image/fetch/$s_!xEy6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60f0478d-bc9c-48ea-bad5-7fc452ebb05f.heic 848w, https://substackcdn.com/image/fetch/$s_!xEy6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60f0478d-bc9c-48ea-bad5-7fc452ebb05f.heic 1272w, https://substackcdn.com/image/fetch/$s_!xEy6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60f0478d-bc9c-48ea-bad5-7fc452ebb05f.heic 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!xEy6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60f0478d-bc9c-48ea-bad5-7fc452ebb05f.heic" width="1456" height="964" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/60f0478d-bc9c-48ea-bad5-7fc452ebb05f.heic&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:964,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:245180,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/heic&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!xEy6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60f0478d-bc9c-48ea-bad5-7fc452ebb05f.heic 424w, https://substackcdn.com/image/fetch/$s_!xEy6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60f0478d-bc9c-48ea-bad5-7fc452ebb05f.heic 848w, https://substackcdn.com/image/fetch/$s_!xEy6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60f0478d-bc9c-48ea-bad5-7fc452ebb05f.heic 1272w, https://substackcdn.com/image/fetch/$s_!xEy6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60f0478d-bc9c-48ea-bad5-7fc452ebb05f.heic 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>I&#8217;m calling this practice LLM-Driven-Development. It's not exactly a <s>virgin birth</s> new kind of an idea, but I'm pushing it to the brink, to the edge of the precipice where <s>people with too much time on their hands</s> the daring, and reckless tread. </p><p>When used to accelerate your own efforts, LLM&#8217;s in a development setting work <s>very</s> well! Take a gander at <a href="https://aws.amazon.com/codewhisperer/">CodeWhisperer</a>. Its been forged in the fires of this very crucible, purpose-built for this kind of heavy lifting. </p><p>But let's not get ahead of ourselves. As of the current date, mid-2023, with the state of LLMs as they stand, it's a bit of a stretch, a leap of faith, to anticipate an entire project to spontaneously spring forth from the ether.</p><p>It's like expecting a perfect <strong>Coq au Vin</strong> to materialize out of thin air - you need the right ingredients, the right chef, and the right amount of time. </p><p>So, let's roll up our sleeves, get our <s>hands</s> prompts dirty, and see what we can cook up with LLM-Driven-Development.</p><h2>Frontend</h2><p>Now let&#8217;s try making an MVP frontend served by API-Gateway. API Gateway is a fully managed service that makes it easy for developers to create, publish, maintain, monitor, and secure APIs at any scale, allowing communication between an application and AWS services using HTTP, REST, and WebSocket protocols.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!UVEY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38ed2fe3-40e3-44b3-8dd8-bd296cf3d3ff_1390x1162.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!UVEY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38ed2fe3-40e3-44b3-8dd8-bd296cf3d3ff_1390x1162.png 424w, https://substackcdn.com/image/fetch/$s_!UVEY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38ed2fe3-40e3-44b3-8dd8-bd296cf3d3ff_1390x1162.png 848w, https://substackcdn.com/image/fetch/$s_!UVEY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38ed2fe3-40e3-44b3-8dd8-bd296cf3d3ff_1390x1162.png 1272w, https://substackcdn.com/image/fetch/$s_!UVEY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38ed2fe3-40e3-44b3-8dd8-bd296cf3d3ff_1390x1162.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!UVEY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38ed2fe3-40e3-44b3-8dd8-bd296cf3d3ff_1390x1162.png" width="1390" height="1162" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/38ed2fe3-40e3-44b3-8dd8-bd296cf3d3ff_1390x1162.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1162,&quot;width&quot;:1390,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:345599,&quot;alt&quot;:&quot;To create an API Gateway in front of your Lambda function, follow these steps:  Sign in to the AWS Management Console and open the Amazon API Gateway console. Choose Create API. Select REST API and click Build. Choose New API and provide a name and description for your API. Then click Create API. In the Actions menu, choose Create Resource. Provide a resource name and a path for the resource, and click Create Resource. With the new resource selected, choose Create Method from the Actions menu, and select GET. In the GET method configuration, choose Lambda Function for the Integration type, select the Use Lambda Proxy integration checkbox, and select the region where your Lambda function is deployed. Start typing the name of your Lambda function in the Lambda Function field, and select it from the dropdown list. Click Save and confirm the permission setting to allow API Gateway to invoke your Lambda function. In the Actions menu, choose Deploy API. Choose [New Stage] for the Deployment stage and provide a name for the new stage (e.g., \&quot;prod\&quot;). Click Deploy. After the deployment is complete, you will see the Invoke URL at the top of the stage editor. This is the base URL for your API. Now, you can use the Invoke URL to call your API Gateway from a static webpage. To do this, you can use JavaScript to make an AJAX request and display the information on the page. Here's a sample HTML template to get you started:&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="To create an API Gateway in front of your Lambda function, follow these steps:  Sign in to the AWS Management Console and open the Amazon API Gateway console. Choose Create API. Select REST API and click Build. Choose New API and provide a name and description for your API. Then click Create API. In the Actions menu, choose Create Resource. Provide a resource name and a path for the resource, and click Create Resource. With the new resource selected, choose Create Method from the Actions menu, and select GET. In the GET method configuration, choose Lambda Function for the Integration type, select the Use Lambda Proxy integration checkbox, and select the region where your Lambda function is deployed. Start typing the name of your Lambda function in the Lambda Function field, and select it from the dropdown list. Click Save and confirm the permission setting to allow API Gateway to invoke your Lambda function. In the Actions menu, choose Deploy API. Choose [New Stage] for the Deployment stage and provide a name for the new stage (e.g., &quot;prod&quot;). Click Deploy. After the deployment is complete, you will see the Invoke URL at the top of the stage editor. This is the base URL for your API. Now, you can use the Invoke URL to call your API Gateway from a static webpage. To do this, you can use JavaScript to make an AJAX request and display the information on the page. Here's a sample HTML template to get you started:" title="To create an API Gateway in front of your Lambda function, follow these steps:  Sign in to the AWS Management Console and open the Amazon API Gateway console. Choose Create API. Select REST API and click Build. Choose New API and provide a name and description for your API. Then click Create API. In the Actions menu, choose Create Resource. Provide a resource name and a path for the resource, and click Create Resource. With the new resource selected, choose Create Method from the Actions menu, and select GET. In the GET method configuration, choose Lambda Function for the Integration type, select the Use Lambda Proxy integration checkbox, and select the region where your Lambda function is deployed. Start typing the name of your Lambda function in the Lambda Function field, and select it from the dropdown list. Click Save and confirm the permission setting to allow API Gateway to invoke your Lambda function. In the Actions menu, choose Deploy API. Choose [New Stage] for the Deployment stage and provide a name for the new stage (e.g., &quot;prod&quot;). Click Deploy. After the deployment is complete, you will see the Invoke URL at the top of the stage editor. This is the base URL for your API. Now, you can use the Invoke URL to call your API Gateway from a static webpage. To do this, you can use JavaScript to make an AJAX request and display the information on the page. Here's a sample HTML template to get you started:" srcset="https://substackcdn.com/image/fetch/$s_!UVEY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38ed2fe3-40e3-44b3-8dd8-bd296cf3d3ff_1390x1162.png 424w, https://substackcdn.com/image/fetch/$s_!UVEY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38ed2fe3-40e3-44b3-8dd8-bd296cf3d3ff_1390x1162.png 848w, https://substackcdn.com/image/fetch/$s_!UVEY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38ed2fe3-40e3-44b3-8dd8-bd296cf3d3ff_1390x1162.png 1272w, https://substackcdn.com/image/fetch/$s_!UVEY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38ed2fe3-40e3-44b3-8dd8-bd296cf3d3ff_1390x1162.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>GPT-4 hands me a lengthy guide for setting up an API-Gateway via the AWS console. Until now, Infrastructure as Code (IaC) hasn't been employed, and truth be told, we've already rolled past the <s>second</s> third weekend. </p><p>As of this writing, GPT-4 has a limit of 25 messages every three hours, and I'm not going to resort to GPT-3.5. (Hi this is Will, from the future, I started writing this back in late March of 2023. That limit is gone now and also Code Interpreter Exists; additionally, I&#8217;ve moved on to using <strong><a href="https://docs.aws.amazon.com/sagemaker/latest/dg/jumpstart-foundation-models-choose.html">AWS Foundational Models</a>, CodeWhisperer, and <a href="https://aws.amazon.com/bedrock/">Bedrock</a> </strong>for the majority of my LLM Driven Development exploration) </p><p>I'm sure I'd face a chorus of remarks about the superiority of GPT-4 over 3.5 and how &#8220;<em>this isn&#8217;t a test of the latest version</em>&#8221; and blah.. blah.. blah so I waited the 3 hours to get 25 more questions out so I can keep you happy. </p><div class="pullquote"><p>I asked 443 questions in this thread alone, which at 25 questions per 3 hours is (443/25*3)~=53hrs - I spent a lot of time waiting.</p></div><p>In the mix of tasks, I've also requested GPT-4 to create a basic index.html file for backend testing purposes. After wrestling with the 'float vs decimal' conundrum <strong>again</strong> for a good ten messages, we've finally arrived at our first version of the index.html. Let's take a look at our initial test page. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!khY3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56d15ff7-afc8-49a7-9898-7eb3d4588051_1246x476.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!khY3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56d15ff7-afc8-49a7-9898-7eb3d4588051_1246x476.png 424w, https://substackcdn.com/image/fetch/$s_!khY3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56d15ff7-afc8-49a7-9898-7eb3d4588051_1246x476.png 848w, https://substackcdn.com/image/fetch/$s_!khY3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56d15ff7-afc8-49a7-9898-7eb3d4588051_1246x476.png 1272w, https://substackcdn.com/image/fetch/$s_!khY3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56d15ff7-afc8-49a7-9898-7eb3d4588051_1246x476.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!khY3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56d15ff7-afc8-49a7-9898-7eb3d4588051_1246x476.png" width="1246" height="476" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/56d15ff7-afc8-49a7-9898-7eb3d4588051_1246x476.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:476,&quot;width&quot;:1246,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:92971,&quot;alt&quot;:&quot;This is what my api-gateway returns   {\&quot;city\&quot;: \&quot;Atafu Village\&quot;, \&quot;local_time\&quot;: \&quot;2023-03-26 17:08:05\&quot;, \&quot;latitude\&quot;: -8.54212, \&quot;longitude\&quot;: -172.51591, \&quot;timezone\&quot;: \&quot;Pacific/Fakaofo\&quot;}  can you make an html page that displays it on page load  ChatGPT Sure! Below is a simple HTML page with JavaScript that fetches data from your API Gateway and displays it on the page when loaded:&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="This is what my api-gateway returns   {&quot;city&quot;: &quot;Atafu Village&quot;, &quot;local_time&quot;: &quot;2023-03-26 17:08:05&quot;, &quot;latitude&quot;: -8.54212, &quot;longitude&quot;: -172.51591, &quot;timezone&quot;: &quot;Pacific/Fakaofo&quot;}  can you make an html page that displays it on page load  ChatGPT Sure! Below is a simple HTML page with JavaScript that fetches data from your API Gateway and displays it on the page when loaded:" title="This is what my api-gateway returns   {&quot;city&quot;: &quot;Atafu Village&quot;, &quot;local_time&quot;: &quot;2023-03-26 17:08:05&quot;, &quot;latitude&quot;: -8.54212, &quot;longitude&quot;: -172.51591, &quot;timezone&quot;: &quot;Pacific/Fakaofo&quot;}  can you make an html page that displays it on page load  ChatGPT Sure! Below is a simple HTML page with JavaScript that fetches data from your API Gateway and displays it on the page when loaded:" srcset="https://substackcdn.com/image/fetch/$s_!khY3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56d15ff7-afc8-49a7-9898-7eb3d4588051_1246x476.png 424w, https://substackcdn.com/image/fetch/$s_!khY3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56d15ff7-afc8-49a7-9898-7eb3d4588051_1246x476.png 848w, https://substackcdn.com/image/fetch/$s_!khY3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56d15ff7-afc8-49a7-9898-7eb3d4588051_1246x476.png 1272w, https://substackcdn.com/image/fetch/$s_!khY3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56d15ff7-afc8-49a7-9898-7eb3d4588051_1246x476.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!EZJE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65382625-0c76-4d5e-b702-5f1eecab3266_564x520.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!EZJE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65382625-0c76-4d5e-b702-5f1eecab3266_564x520.png 424w, https://substackcdn.com/image/fetch/$s_!EZJE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65382625-0c76-4d5e-b702-5f1eecab3266_564x520.png 848w, https://substackcdn.com/image/fetch/$s_!EZJE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65382625-0c76-4d5e-b702-5f1eecab3266_564x520.png 1272w, https://substackcdn.com/image/fetch/$s_!EZJE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65382625-0c76-4d5e-b702-5f1eecab3266_564x520.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!EZJE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65382625-0c76-4d5e-b702-5f1eecab3266_564x520.png" width="564" height="520" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/65382625-0c76-4d5e-b702-5f1eecab3266_564x520.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:520,&quot;width&quot;:564,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:42118,&quot;alt&quot;:&quot;5 PM City Finder City: Altona North  Local Time: 2023-06-04 17:05:52  Latitude: -37.83487  Longitude: 144.84735  Timezone: Australia/Melbourne&quot;,&quot;title&quot;:&quot;5 PM City Finder City: Altona North  Local Time: 2023-06-04 17:05:52  Latitude: -37.83487  Longitude: 144.84735  Timezone: Australia/Melbourne&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="5 PM City Finder City: Altona North  Local Time: 2023-06-04 17:05:52  Latitude: -37.83487  Longitude: 144.84735  Timezone: Australia/Melbourne" title="5 PM City Finder City: Altona North  Local Time: 2023-06-04 17:05:52  Latitude: -37.83487  Longitude: 144.84735  Timezone: Australia/Melbourne" srcset="https://substackcdn.com/image/fetch/$s_!EZJE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65382625-0c76-4d5e-b702-5f1eecab3266_564x520.png 424w, https://substackcdn.com/image/fetch/$s_!EZJE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65382625-0c76-4d5e-b702-5f1eecab3266_564x520.png 848w, https://substackcdn.com/image/fetch/$s_!EZJE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65382625-0c76-4d5e-b702-5f1eecab3266_564x520.png 1272w, https://substackcdn.com/image/fetch/$s_!EZJE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65382625-0c76-4d5e-b702-5f1eecab3266_564x520.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Ignore the date, I was too excited with my first stage of success to take a screenshot. This screenshot is from when I started writing the blog post.</figcaption></figure></div><p>You can try this page out yourself here:<br><a href="https://findyourfivepm.com/index-original.html">https://findyourfivepm.com/index-original.html</a></p><p><br>I&#8217;ve kept the <s>future</s> API backwards compatible. </p><p>Feeling bold, I decide to spice things up. I request the integration of a theme and <strong>a map</strong> in the page that navigates to the specified coordinates. Immediately, GPT-4 responds with a barrage of CSS and JavaScript. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!lgA4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25b4a8c0-ca9f-4967-a97e-60bd526e050c_655x343.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!lgA4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25b4a8c0-ca9f-4967-a97e-60bd526e050c_655x343.png 424w, https://substackcdn.com/image/fetch/$s_!lgA4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25b4a8c0-ca9f-4967-a97e-60bd526e050c_655x343.png 848w, https://substackcdn.com/image/fetch/$s_!lgA4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25b4a8c0-ca9f-4967-a97e-60bd526e050c_655x343.png 1272w, https://substackcdn.com/image/fetch/$s_!lgA4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25b4a8c0-ca9f-4967-a97e-60bd526e050c_655x343.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!lgA4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25b4a8c0-ca9f-4967-a97e-60bd526e050c_655x343.png" width="655" height="343" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/25b4a8c0-ca9f-4967-a97e-60bd526e050c_655x343.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:343,&quot;width&quot;:655,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:55885,&quot;alt&quot;:&quot;can you make my webpage have a nice theme, with a map in the middle that automatically goes to the coordinates of the location?  ChatGPT Certainly! I'll provide you with a sample HTML template that includes a nice theme using Bootstrap and a map using Leaflet.js. The map will automatically pan to the coordinates of the location when the page loads.  First, include the required CSS and JS files in the head section of your HTML file:&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="can you make my webpage have a nice theme, with a map in the middle that automatically goes to the coordinates of the location?  ChatGPT Certainly! I'll provide you with a sample HTML template that includes a nice theme using Bootstrap and a map using Leaflet.js. The map will automatically pan to the coordinates of the location when the page loads.  First, include the required CSS and JS files in the head section of your HTML file:" title="can you make my webpage have a nice theme, with a map in the middle that automatically goes to the coordinates of the location?  ChatGPT Certainly! I'll provide you with a sample HTML template that includes a nice theme using Bootstrap and a map using Leaflet.js. The map will automatically pan to the coordinates of the location when the page loads.  First, include the required CSS and JS files in the head section of your HTML file:" srcset="https://substackcdn.com/image/fetch/$s_!lgA4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25b4a8c0-ca9f-4967-a97e-60bd526e050c_655x343.png 424w, https://substackcdn.com/image/fetch/$s_!lgA4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25b4a8c0-ca9f-4967-a97e-60bd526e050c_655x343.png 848w, https://substackcdn.com/image/fetch/$s_!lgA4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25b4a8c0-ca9f-4967-a97e-60bd526e050c_655x343.png 1272w, https://substackcdn.com/image/fetch/$s_!lgA4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25b4a8c0-ca9f-4967-a97e-60bd526e050c_655x343.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Feeling confident, I ask GPT-4 to add a unique background effect, making it look like it's raining &#127866; emojis. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!DpEP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed155f18-0a2f-4245-8697-145e431b90ac_3908x1192.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!DpEP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed155f18-0a2f-4245-8697-145e431b90ac_3908x1192.png 424w, https://substackcdn.com/image/fetch/$s_!DpEP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed155f18-0a2f-4245-8697-145e431b90ac_3908x1192.png 848w, https://substackcdn.com/image/fetch/$s_!DpEP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed155f18-0a2f-4245-8697-145e431b90ac_3908x1192.png 1272w, https://substackcdn.com/image/fetch/$s_!DpEP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed155f18-0a2f-4245-8697-145e431b90ac_3908x1192.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!DpEP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed155f18-0a2f-4245-8697-145e431b90ac_3908x1192.png" width="1456" height="444" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ed155f18-0a2f-4245-8697-145e431b90ac_3908x1192.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:444,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:790878,&quot;alt&quot;:&quot;It's 5pm Here! Saipan Local time: 2023-06-04 17:13:24 &#215; + &#8722; Leaflet | &#169; OpenStreetMap contributors City: Saipan, Timezone: Pacific/Saipan, Local Time: 2023-06-04 17:13:24&quot;,&quot;title&quot;:&quot;It's 5pm Here! Saipan Local time: 2023-06-04 17:13:24 &#215; + &#8722; Leaflet | &#169; OpenStreetMap contributors City: Saipan, Timezone: Pacific/Saipan, Local Time: 2023-06-04 17:13:24&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="It's 5pm Here! Saipan Local time: 2023-06-04 17:13:24 &#215; + &#8722; Leaflet | &#169; OpenStreetMap contributors City: Saipan, Timezone: Pacific/Saipan, Local Time: 2023-06-04 17:13:24" title="It's 5pm Here! Saipan Local time: 2023-06-04 17:13:24 &#215; + &#8722; Leaflet | &#169; OpenStreetMap contributors City: Saipan, Timezone: Pacific/Saipan, Local Time: 2023-06-04 17:13:24" srcset="https://substackcdn.com/image/fetch/$s_!DpEP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed155f18-0a2f-4245-8697-145e431b90ac_3908x1192.png 424w, https://substackcdn.com/image/fetch/$s_!DpEP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed155f18-0a2f-4245-8697-145e431b90ac_3908x1192.png 848w, https://substackcdn.com/image/fetch/$s_!DpEP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed155f18-0a2f-4245-8697-145e431b90ac_3908x1192.png 1272w, https://substackcdn.com/image/fetch/$s_!DpEP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed155f18-0a2f-4245-8697-145e431b90ac_3908x1192.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Remarkable.<br>This page is also still online here: <a href="https://findyourfivepm.com/index-old.html">https://findyourfivepm.com/index-old.html</a></p><p>Two consecutive commands, and the execution is spot on.  Surprisingly, not only has GPT-4 implemented OpenStreetMaps with Leaflet aptly without any explicit instruction to use those tools, but the page also presents itself rather nicely. I&#8217;ve officially reached the 'proof of concept' or MVP stage. Honestly, I'm rather <strong><s>im</s>pressed</strong>. </p><p>It's been <s>two</s> three weekends of collaborative coding with GPT-4, and we've <s>already</s> <strong>barely, just barely,</strong> crafted a <s>compelling</s> webpage.</p><p>Our Lambda is still <em>pretty, pretty</em> slow. Let&#8217;s see how Chat GPT can improve it</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!BBOJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F87ba9121-21f0-40e1-9e85-572fd4c36ea6_1200x797.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!BBOJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F87ba9121-21f0-40e1-9e85-572fd4c36ea6_1200x797.jpeg 424w, https://substackcdn.com/image/fetch/$s_!BBOJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F87ba9121-21f0-40e1-9e85-572fd4c36ea6_1200x797.jpeg 848w, https://substackcdn.com/image/fetch/$s_!BBOJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F87ba9121-21f0-40e1-9e85-572fd4c36ea6_1200x797.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!BBOJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F87ba9121-21f0-40e1-9e85-572fd4c36ea6_1200x797.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!BBOJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F87ba9121-21f0-40e1-9e85-572fd4c36ea6_1200x797.jpeg" width="490" height="325.44166666666666" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/87ba9121-21f0-40e1-9e85-572fd4c36ea6_1200x797.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:797,&quot;width&quot;:1200,&quot;resizeWidth&quot;:490,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Pretty, pretty, pretty, pretty good news: \&quot;Curb Your Enthusiasm\&quot; to return  for 9th season, HBO confirms | Salon.com&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Pretty, pretty, pretty, pretty good news: &quot;Curb Your Enthusiasm&quot; to return  for 9th season, HBO confirms | Salon.com" title="Pretty, pretty, pretty, pretty good news: &quot;Curb Your Enthusiasm&quot; to return  for 9th season, HBO confirms | Salon.com" srcset="https://substackcdn.com/image/fetch/$s_!BBOJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F87ba9121-21f0-40e1-9e85-572fd4c36ea6_1200x797.jpeg 424w, https://substackcdn.com/image/fetch/$s_!BBOJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F87ba9121-21f0-40e1-9e85-572fd4c36ea6_1200x797.jpeg 848w, https://substackcdn.com/image/fetch/$s_!BBOJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F87ba9121-21f0-40e1-9e85-572fd4c36ea6_1200x797.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!BBOJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F87ba9121-21f0-40e1-9e85-572fd4c36ea6_1200x797.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h1>Improving the Lambda</h1><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!rflm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb130121e-5d57-4d70-bc76-05aad48b5f6c_1390x1474.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!rflm!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb130121e-5d57-4d70-bc76-05aad48b5f6c_1390x1474.png 424w, https://substackcdn.com/image/fetch/$s_!rflm!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb130121e-5d57-4d70-bc76-05aad48b5f6c_1390x1474.png 848w, https://substackcdn.com/image/fetch/$s_!rflm!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb130121e-5d57-4d70-bc76-05aad48b5f6c_1390x1474.png 1272w, https://substackcdn.com/image/fetch/$s_!rflm!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb130121e-5d57-4d70-bc76-05aad48b5f6c_1390x1474.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!rflm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb130121e-5d57-4d70-bc76-05aad48b5f6c_1390x1474.png" width="1390" height="1474" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b130121e-5d57-4d70-bc76-05aad48b5f6c_1390x1474.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1474,&quot;width&quot;:1390,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:277353,&quot;alt&quot;:&quot;I don't think I want to do that:  can you suggest ways to improve the performance of the lambda:  import boto3 import random from botocore.exceptions import ClientError from datetime import datetime import pytz import os import json  # this is how we hydrated the table \&quot;\&quot;\&quot; def hydrate_data():     try:         with open('cities.json', 'r') as file:             cities = json.load(file)             for city in cities:                 city['latitude'] = Decimal(str(city['latitude']))                 city['longitude'] = Decimal(str(city['longitude']))                 city['id'] = f\&quot;{city['city']}_{city['timezone']}\&quot;  # Update this line to use 'city' instead of 'name'                 table = dynamodb.Table('Cities')                 table.put_item(Item=city)         print(\&quot;Data hydrated successfully.\&quot;)     except Exception as e:         print(f\&quot;Error hydrating data: {e}\&quot;) \&quot;\&quot;\&quot; # sample json # {\&quot;city\&quot;: \&quot;les Escaldes\&quot;, \&quot;timezone\&quot;: \&quot;Europe/Andorra\&quot;, \&quot;latitude\&quot;: 42.50729, \&quot;longitude\&quot;: 1.53414}, {\&quot;city\&quot;: \&quot;la Massana\&quot;, \&quot;timezone\&quot;: \&quot;Europe/Andorra\&quot;, \&quot;latitude\&quot;: 42.54499, \&quot;longitude\&quot;: 1.51483} ########  dynamodb = boto3.resource('dynamodb') table_name = os.environ['TABLE_NAME'] table = dynamodb.Table(table_name)&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="I don't think I want to do that:  can you suggest ways to improve the performance of the lambda:  import boto3 import random from botocore.exceptions import ClientError from datetime import datetime import pytz import os import json  # this is how we hydrated the table &quot;&quot;&quot; def hydrate_data():     try:         with open('cities.json', 'r') as file:             cities = json.load(file)             for city in cities:                 city['latitude'] = Decimal(str(city['latitude']))                 city['longitude'] = Decimal(str(city['longitude']))                 city['id'] = f&quot;{city['city']}_{city['timezone']}&quot;  # Update this line to use 'city' instead of 'name'                 table = dynamodb.Table('Cities')                 table.put_item(Item=city)         print(&quot;Data hydrated successfully.&quot;)     except Exception as e:         print(f&quot;Error hydrating data: {e}&quot;) &quot;&quot;&quot; # sample json # {&quot;city&quot;: &quot;les Escaldes&quot;, &quot;timezone&quot;: &quot;Europe/Andorra&quot;, &quot;latitude&quot;: 42.50729, &quot;longitude&quot;: 1.53414}, {&quot;city&quot;: &quot;la Massana&quot;, &quot;timezone&quot;: &quot;Europe/Andorra&quot;, &quot;latitude&quot;: 42.54499, &quot;longitude&quot;: 1.51483} ########  dynamodb = boto3.resource('dynamodb') table_name = os.environ['TABLE_NAME'] table = dynamodb.Table(table_name)" title="I don't think I want to do that:  can you suggest ways to improve the performance of the lambda:  import boto3 import random from botocore.exceptions import ClientError from datetime import datetime import pytz import os import json  # this is how we hydrated the table &quot;&quot;&quot; def hydrate_data():     try:         with open('cities.json', 'r') as file:             cities = json.load(file)             for city in cities:                 city['latitude'] = Decimal(str(city['latitude']))                 city['longitude'] = Decimal(str(city['longitude']))                 city['id'] = f&quot;{city['city']}_{city['timezone']}&quot;  # Update this line to use 'city' instead of 'name'                 table = dynamodb.Table('Cities')                 table.put_item(Item=city)         print(&quot;Data hydrated successfully.&quot;)     except Exception as e:         print(f&quot;Error hydrating data: {e}&quot;) &quot;&quot;&quot; # sample json # {&quot;city&quot;: &quot;les Escaldes&quot;, &quot;timezone&quot;: &quot;Europe/Andorra&quot;, &quot;latitude&quot;: 42.50729, &quot;longitude&quot;: 1.53414}, {&quot;city&quot;: &quot;la Massana&quot;, &quot;timezone&quot;: &quot;Europe/Andorra&quot;, &quot;latitude&quot;: 42.54499, &quot;longitude&quot;: 1.51483} ########  dynamodb = boto3.resource('dynamodb') table_name = os.environ['TABLE_NAME'] table = dynamodb.Table(table_name)" srcset="https://substackcdn.com/image/fetch/$s_!rflm!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb130121e-5d57-4d70-bc76-05aad48b5f6c_1390x1474.png 424w, https://substackcdn.com/image/fetch/$s_!rflm!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb130121e-5d57-4d70-bc76-05aad48b5f6c_1390x1474.png 848w, https://substackcdn.com/image/fetch/$s_!rflm!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb130121e-5d57-4d70-bc76-05aad48b5f6c_1390x1474.png 1272w, https://substackcdn.com/image/fetch/$s_!rflm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb130121e-5d57-4d70-bc76-05aad48b5f6c_1390x1474.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The reset of the function continues below this - truncated for brevity. </figcaption></figure></div><p>Don&#8217;t worry too much about the first line &#8220;I don&#8217;t think I want to do that:&#8221; - I was experimenting with Step Functions and ultimately decided to keep the scope simpler. I&#8217;ve asked for performance improvements for the lambda.<br></p><p><strong>You&#8217;ve probably noticed I keep pasting in the code. It&#8217;s annoying, and </strong><em><strong>necessary</strong></em><strong>. </strong></p><p><br>I constantly refresh the context of the LLM with the content of the code we&#8217;re talking about - I also include details about how the data is structured in the DynamoDB table - this really seems to help when debugging as it is likely that the code I have provided previously is no longer fully contained in the context of my messages.</p><h2>Oh yeah? How does Context Length work? Glad you asked, dear reader. Glad you asked. </h2><p>Imagine that you and your friend go to dinner. You start the meal talking about one thing and then as the meal progresses, so does your conversation. You discuss many different topics and without a defined agenda you both end up just talking about what was on your mind.  By the end of the dinner you probably can&#8217;t remember verbatim what was said but you can remember how you felt, many important selective details, and a broad idea of how the conversation went. Unless you&#8217;re Mike Ross then context length functions very similarly to how humans do.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!7BCd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80eefbc2-5632-4384-8b6b-8b2bb59a4c24.heic" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!7BCd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80eefbc2-5632-4384-8b6b-8b2bb59a4c24.heic 424w, https://substackcdn.com/image/fetch/$s_!7BCd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80eefbc2-5632-4384-8b6b-8b2bb59a4c24.heic 848w, https://substackcdn.com/image/fetch/$s_!7BCd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80eefbc2-5632-4384-8b6b-8b2bb59a4c24.heic 1272w, https://substackcdn.com/image/fetch/$s_!7BCd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80eefbc2-5632-4384-8b6b-8b2bb59a4c24.heic 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!7BCd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80eefbc2-5632-4384-8b6b-8b2bb59a4c24.heic" width="418" height="239.54154727793696" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/80eefbc2-5632-4384-8b6b-8b2bb59a4c24.heic&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:400,&quot;width&quot;:698,&quot;resizeWidth&quot;:418,&quot;bytes&quot;:23491,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/heic&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!7BCd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80eefbc2-5632-4384-8b6b-8b2bb59a4c24.heic 424w, https://substackcdn.com/image/fetch/$s_!7BCd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80eefbc2-5632-4384-8b6b-8b2bb59a4c24.heic 848w, https://substackcdn.com/image/fetch/$s_!7BCd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80eefbc2-5632-4384-8b6b-8b2bb59a4c24.heic 1272w, https://substackcdn.com/image/fetch/$s_!7BCd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80eefbc2-5632-4384-8b6b-8b2bb59a4c24.heic 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">I just finished watching Suits. Please don&#8217;t sue me.</figcaption></figure></div><h3><strong>What is Context Length?</strong></h3><p>In simple terms, context length refers to the amount of recent information a language model can &#8220;remember&#8221; or &#8220;consider&#8221; during its current operation. This information could be a couple of sentences, a full paragraph, or even more.</p><p>The longer the chatbot's memory, the better it can understand and respond to multi-sentence queries, ensuring <s>more</s> satisfying user interactions.</p><h3><strong>Introducing Langchain</strong></h3><p>As we rely more on chatbots and LLMs, ensuring they have a continuous understanding of the conversation becomes crucial. Enter 'langchain' - a conceptual tool that chains the dialogue, making sure the model remains updated with the ongoing context.</p><p>Langchain ensures that even when a conversation spans over multiple turns, the chatbot can retain the context. It's like giving the chatbot a tool to revisit past conversations and stay updated, allowing it to provide answers that are not just relevant to the last sentence but to the entire conversation.</p><h3><strong>Tips for Keeping the Chatbot Current with Context</strong></h3><ol><li><p><strong>Be Explicit:</strong> While LLMs are designed to understand context, sometimes being more explicit in your statements can help. </p></li><li><p><strong>Chunk Information:</strong> If you're providing a lot of details, try breaking it into smaller, related chunks. This way, you allow the chatbot to process each bit of information more efficiently.</p></li><li><p><strong>Recap Occasionally:</strong> Just like in a human conversation, recapping can be beneficial.</p></li></ol><p></p><p>Now Back to the Lambda.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ElVw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Face89070-fb29-4b22-a7e1-bcba09a5346f_1368x550.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ElVw!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Face89070-fb29-4b22-a7e1-bcba09a5346f_1368x550.png 424w, https://substackcdn.com/image/fetch/$s_!ElVw!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Face89070-fb29-4b22-a7e1-bcba09a5346f_1368x550.png 848w, https://substackcdn.com/image/fetch/$s_!ElVw!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Face89070-fb29-4b22-a7e1-bcba09a5346f_1368x550.png 1272w, https://substackcdn.com/image/fetch/$s_!ElVw!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Face89070-fb29-4b22-a7e1-bcba09a5346f_1368x550.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ElVw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Face89070-fb29-4b22-a7e1-bcba09a5346f_1368x550.png" width="1368" height="550" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ace89070-fb29-4b22-a7e1-bcba09a5346f_1368x550.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:550,&quot;width&quot;:1368,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:118782,&quot;alt&quot;:&quot;There are a few improvements you can make to your Lambda function to enhance its performance:  Cache the list of available timezones and block list outside of the Lambda handler function. This way, it won't be recreated each time the Lambda function is invoked. Create a helper function to filter valid items from the query response. It will make your code more modular and easier to test. Instead of a while loop to retry the query, use a for loop. It makes the code cleaner and prevents the possibility of an infinite loop. Here's the modified Lambda function:&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="There are a few improvements you can make to your Lambda function to enhance its performance:  Cache the list of available timezones and block list outside of the Lambda handler function. This way, it won't be recreated each time the Lambda function is invoked. Create a helper function to filter valid items from the query response. It will make your code more modular and easier to test. Instead of a while loop to retry the query, use a for loop. It makes the code cleaner and prevents the possibility of an infinite loop. Here's the modified Lambda function:" title="There are a few improvements you can make to your Lambda function to enhance its performance:  Cache the list of available timezones and block list outside of the Lambda handler function. This way, it won't be recreated each time the Lambda function is invoked. Create a helper function to filter valid items from the query response. It will make your code more modular and easier to test. Instead of a while loop to retry the query, use a for loop. It makes the code cleaner and prevents the possibility of an infinite loop. Here's the modified Lambda function:" srcset="https://substackcdn.com/image/fetch/$s_!ElVw!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Face89070-fb29-4b22-a7e1-bcba09a5346f_1368x550.png 424w, https://substackcdn.com/image/fetch/$s_!ElVw!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Face89070-fb29-4b22-a7e1-bcba09a5346f_1368x550.png 848w, https://substackcdn.com/image/fetch/$s_!ElVw!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Face89070-fb29-4b22-a7e1-bcba09a5346f_1368x550.png 1272w, https://substackcdn.com/image/fetch/$s_!ElVw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Face89070-fb29-4b22-a7e1-bcba09a5346f_1368x550.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The very first item in the list is really the only one that is going to help us with performance. We should move things outside the lambda handler if possible. This won&#8217;t help with cold starts, but it will help with each subsequent invocation. For instance, if you&#8217;re using an SDK that needs to be initialized just once, like a database connection, or need to load some resources like machine learning models, keeping this kind of code outside the handler improves performance. </p><p>The <s>real</s> laziest performance gain comes from <a href="https://docs.aws.amazon.com/lambda/latest/operatorguide/profile-functions.html">Lambda Power Tuning.</a></p><p>AWS Lambda Power Tuning is an optimization tool for balancing the speed and cost of Lambda functions by automating memory allocation tests. It employs AWS Step Functions to run multiple function versions concurrently at different memory allocations, measuring performance through live HTTP calls and SDK interactions. Graphing the results helps visualize performance and cost trade-offs, aiding in better configuration decisions.</p><p><a href="https://lambda-power-tuning.show/#gAAAAQACAAQACMAL;q5InRatqpURVdSBEVRWfQwAAMEOrKjVD;8/yYNnMMlzY4fJI2kpKRNryhoDaO+PM2">Here are my results. </a></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Y3NV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1d4eba6-432b-4f9c-a16a-b2d1c1dabfa9_2830x1180.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Y3NV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1d4eba6-432b-4f9c-a16a-b2d1c1dabfa9_2830x1180.png 424w, https://substackcdn.com/image/fetch/$s_!Y3NV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1d4eba6-432b-4f9c-a16a-b2d1c1dabfa9_2830x1180.png 848w, https://substackcdn.com/image/fetch/$s_!Y3NV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1d4eba6-432b-4f9c-a16a-b2d1c1dabfa9_2830x1180.png 1272w, https://substackcdn.com/image/fetch/$s_!Y3NV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1d4eba6-432b-4f9c-a16a-b2d1c1dabfa9_2830x1180.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Y3NV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1d4eba6-432b-4f9c-a16a-b2d1c1dabfa9_2830x1180.png" width="1456" height="607" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f1d4eba6-432b-4f9c-a16a-b2d1c1dabfa9_2830x1180.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:607,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:308902,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Y3NV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1d4eba6-432b-4f9c-a16a-b2d1c1dabfa9_2830x1180.png 424w, https://substackcdn.com/image/fetch/$s_!Y3NV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1d4eba6-432b-4f9c-a16a-b2d1c1dabfa9_2830x1180.png 848w, https://substackcdn.com/image/fetch/$s_!Y3NV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1d4eba6-432b-4f9c-a16a-b2d1c1dabfa9_2830x1180.png 1272w, https://substackcdn.com/image/fetch/$s_!Y3NV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1d4eba6-432b-4f9c-a16a-b2d1c1dabfa9_2830x1180.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This is because Lambda's resources (CPU, memory, disk, and network) are allocated in proportion to each other. Therefore, by increasing the memory size, you not only get more memory but also a proportional increase in CPU power, which can lead to faster execution times for CPU-bound tasks. I highly recommend using Lambda Power Tuning on all your lambda functions especially after a big update. </p><p>Now that our main Lambda function is working well; lets move on to IaC</p><p></p><h1>IaC - CloudFormation</h1><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!sitA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa90cd0ec-6fbd-46f3-8a00-cea8dbe94101_1294x496.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!sitA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa90cd0ec-6fbd-46f3-8a00-cea8dbe94101_1294x496.png 424w, https://substackcdn.com/image/fetch/$s_!sitA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa90cd0ec-6fbd-46f3-8a00-cea8dbe94101_1294x496.png 848w, https://substackcdn.com/image/fetch/$s_!sitA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa90cd0ec-6fbd-46f3-8a00-cea8dbe94101_1294x496.png 1272w, https://substackcdn.com/image/fetch/$s_!sitA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa90cd0ec-6fbd-46f3-8a00-cea8dbe94101_1294x496.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!sitA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa90cd0ec-6fbd-46f3-8a00-cea8dbe94101_1294x496.png" width="1294" height="496" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a90cd0ec-6fbd-46f3-8a00-cea8dbe94101_1294x496.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:496,&quot;width&quot;:1294,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:107921,&quot;alt&quot;:&quot;ok so i want to create a deployment pipeline that makes my lambda package and puts it in my AWS account, my code is hosted in GitHub. I also want the pipeline to hydrate my dynamodb table and create my api-gateway all as infrastructure as code  ChatGPT To create a deployment pipeline that deploys your Lambda function, hydrates your DynamoDB table, and creates your API Gateway using Infrastructure as Code (IaC), you can use AWS CloudFormation and GitHub Actions.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="ok so i want to create a deployment pipeline that makes my lambda package and puts it in my AWS account, my code is hosted in GitHub. I also want the pipeline to hydrate my dynamodb table and create my api-gateway all as infrastructure as code  ChatGPT To create a deployment pipeline that deploys your Lambda function, hydrates your DynamoDB table, and creates your API Gateway using Infrastructure as Code (IaC), you can use AWS CloudFormation and GitHub Actions." title="ok so i want to create a deployment pipeline that makes my lambda package and puts it in my AWS account, my code is hosted in GitHub. I also want the pipeline to hydrate my dynamodb table and create my api-gateway all as infrastructure as code  ChatGPT To create a deployment pipeline that deploys your Lambda function, hydrates your DynamoDB table, and creates your API Gateway using Infrastructure as Code (IaC), you can use AWS CloudFormation and GitHub Actions." srcset="https://substackcdn.com/image/fetch/$s_!sitA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa90cd0ec-6fbd-46f3-8a00-cea8dbe94101_1294x496.png 424w, https://substackcdn.com/image/fetch/$s_!sitA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa90cd0ec-6fbd-46f3-8a00-cea8dbe94101_1294x496.png 848w, https://substackcdn.com/image/fetch/$s_!sitA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa90cd0ec-6fbd-46f3-8a00-cea8dbe94101_1294x496.png 1272w, https://substackcdn.com/image/fetch/$s_!sitA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa90cd0ec-6fbd-46f3-8a00-cea8dbe94101_1294x496.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Well, I&#8217;ve now asked my inaugural IaC question. Remember when I talked to you about refreshing the context to ensure maximum results? The resulting CloudFormation template thinks the lambda is written in Node and forgot that way earlier in the project, literally 3-4 weeks ago, I suggested we use AWS CodeBuild and CodePipeline. We&#8217;re now using GitHub Actions. I spend a few messages refreshing ChatGPT and telling it that we&#8217;re using Python (and pasting in the relevant code) and that I&#8217;d like to use CodeBuild and CodePipeline with my CloudFormation template. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!z5TU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63b34080-f712-4124-b740-5ecda99aa1d0_1278x2692.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!z5TU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63b34080-f712-4124-b740-5ecda99aa1d0_1278x2692.png 424w, https://substackcdn.com/image/fetch/$s_!z5TU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63b34080-f712-4124-b740-5ecda99aa1d0_1278x2692.png 848w, https://substackcdn.com/image/fetch/$s_!z5TU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63b34080-f712-4124-b740-5ecda99aa1d0_1278x2692.png 1272w, https://substackcdn.com/image/fetch/$s_!z5TU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63b34080-f712-4124-b740-5ecda99aa1d0_1278x2692.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!z5TU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63b34080-f712-4124-b740-5ecda99aa1d0_1278x2692.png" width="1278" height="2692" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/63b34080-f712-4124-b740-5ecda99aa1d0_1278x2692.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:2692,&quot;width&quot;:1278,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:347896,&quot;alt&quot;:&quot;ok so i want to create a deployment pipeline that makes my lambda package and puts it in my AWS account, my code is hosted in GitHub. I also want the pipeline to hydrate my dynamodb table and create my api-gateway all as infrastructure as code  ChatGPT To create a deployment pipeline that deploys your Lambda function, hydrates your DynamoDB table, and creates your API Gateway using Infrastructure as Code (IaC), you can use AWS CloudFormation and GitHub Actions.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="ok so i want to create a deployment pipeline that makes my lambda package and puts it in my AWS account, my code is hosted in GitHub. I also want the pipeline to hydrate my dynamodb table and create my api-gateway all as infrastructure as code  ChatGPT To create a deployment pipeline that deploys your Lambda function, hydrates your DynamoDB table, and creates your API Gateway using Infrastructure as Code (IaC), you can use AWS CloudFormation and GitHub Actions." title="ok so i want to create a deployment pipeline that makes my lambda package and puts it in my AWS account, my code is hosted in GitHub. I also want the pipeline to hydrate my dynamodb table and create my api-gateway all as infrastructure as code  ChatGPT To create a deployment pipeline that deploys your Lambda function, hydrates your DynamoDB table, and creates your API Gateway using Infrastructure as Code (IaC), you can use AWS CloudFormation and GitHub Actions." srcset="https://substackcdn.com/image/fetch/$s_!z5TU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63b34080-f712-4124-b740-5ecda99aa1d0_1278x2692.png 424w, https://substackcdn.com/image/fetch/$s_!z5TU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63b34080-f712-4124-b740-5ecda99aa1d0_1278x2692.png 848w, https://substackcdn.com/image/fetch/$s_!z5TU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63b34080-f712-4124-b740-5ecda99aa1d0_1278x2692.png 1272w, https://substackcdn.com/image/fetch/$s_!z5TU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63b34080-f712-4124-b740-5ecda99aa1d0_1278x2692.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>OK. That got us somewhere, the first CloudFormation template now has:</p><ol><li><p>LambdaRole for IAM permissions</p></li><li><p>CityFinderLambda - the actual Lambda function</p></li><li><p>CitiesTable - in DynamoDB</p></li></ol><p>I also have a basic buildspec.yaml that will install our requirements for the lambda and deploy the CloudFormation template. </p><p>I ask to add the S3 Bucket for packaged CloudFormation templates and the API Gateway. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!FDnW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62a43a22-9c60-4883-9293-5978d1113429_1410x404.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!FDnW!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62a43a22-9c60-4883-9293-5978d1113429_1410x404.png 424w, https://substackcdn.com/image/fetch/$s_!FDnW!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62a43a22-9c60-4883-9293-5978d1113429_1410x404.png 848w, https://substackcdn.com/image/fetch/$s_!FDnW!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62a43a22-9c60-4883-9293-5978d1113429_1410x404.png 1272w, https://substackcdn.com/image/fetch/$s_!FDnW!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62a43a22-9c60-4883-9293-5978d1113429_1410x404.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!FDnW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62a43a22-9c60-4883-9293-5978d1113429_1410x404.png" width="1410" height="404" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/62a43a22-9c60-4883-9293-5978d1113429_1410x404.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:404,&quot;width&quot;:1410,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:70649,&quot;alt&quot;:&quot;can you add the creation of the s3 bucket and the api gateway to the build spec and write the requirements.txt file  ChatGPT To create an S3 bucket and an API Gateway, you need to add them to the CloudFormation template instead of the buildspec.yml file. I'll modify the template.yaml file accordingly:  template.yaml:&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="can you add the creation of the s3 bucket and the api gateway to the build spec and write the requirements.txt file  ChatGPT To create an S3 bucket and an API Gateway, you need to add them to the CloudFormation template instead of the buildspec.yml file. I'll modify the template.yaml file accordingly:  template.yaml:" title="can you add the creation of the s3 bucket and the api gateway to the build spec and write the requirements.txt file  ChatGPT To create an S3 bucket and an API Gateway, you need to add them to the CloudFormation template instead of the buildspec.yml file. I'll modify the template.yaml file accordingly:  template.yaml:" srcset="https://substackcdn.com/image/fetch/$s_!FDnW!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62a43a22-9c60-4883-9293-5978d1113429_1410x404.png 424w, https://substackcdn.com/image/fetch/$s_!FDnW!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62a43a22-9c60-4883-9293-5978d1113429_1410x404.png 848w, https://substackcdn.com/image/fetch/$s_!FDnW!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62a43a22-9c60-4883-9293-5978d1113429_1410x404.png 1272w, https://substackcdn.com/image/fetch/$s_!FDnW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62a43a22-9c60-4883-9293-5978d1113429_1410x404.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zyGm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6ba7856-154c-4fa8-a34f-426b100e86a5_1176x2926.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zyGm!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6ba7856-154c-4fa8-a34f-426b100e86a5_1176x2926.png 424w, https://substackcdn.com/image/fetch/$s_!zyGm!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6ba7856-154c-4fa8-a34f-426b100e86a5_1176x2926.png 848w, https://substackcdn.com/image/fetch/$s_!zyGm!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6ba7856-154c-4fa8-a34f-426b100e86a5_1176x2926.png 1272w, https://substackcdn.com/image/fetch/$s_!zyGm!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6ba7856-154c-4fa8-a34f-426b100e86a5_1176x2926.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zyGm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6ba7856-154c-4fa8-a34f-426b100e86a5_1176x2926.png" width="1176" height="2926" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b6ba7856-154c-4fa8-a34f-426b100e86a5_1176x2926.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:2926,&quot;width&quot;:1176,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:394986,&quot;alt&quot;:&quot;AWSTemplateFormatVersion: '2010-09-09' Transform: 'AWS::Serverless-2016-10-31'  Description: '5PM City Finder'  Resources:    # Add the S3 Bucket resource   ArtifactBucket:     Type: 'AWS::S3::Bucket'    LambdaRole:     Type: 'AWS::IAM::Role'     Properties:       AssumeRolePolicyDocument:         Version: '2012-10-17'         Statement:           - Effect: 'Allow'             Principal:               Service:                 - 'lambda.amazonaws.com'             Action:               - 'sts:AssumeRole'       Policies:         - PolicyName: 'LambdaPolicy'           PolicyDocument:             Version: '2012-10-17'             Statement:               - Effect: 'Allow'                 Action:                   - 'dynamodb:Query'                   - 'logs:CreateLogGroup'                   - 'logs:CreateLogStream'                   - 'logs:PutLogEvents'                 Resource: '*'    CityFinderLambda:     Type: 'AWS::Serverless::Function'     Properties:       FunctionName: '5PMCityFinder'       Description: 'Finds cities where the local time is 5 PM'       Handler: 'lambda.lambda_handler'       Runtime: 'python3.8'       Role: !GetAtt LambdaRole.Arn       Timeout: 10       MemorySize: 128       Environment:         Variables:           TABLE_NAME: !Ref CitiesTable       Events:         ApiEvent:           Type: 'Api'           Properties:             Path: '/findcity'             Method: 'GET'    CitiesTable:     Type: 'AWS::DynamoDB::Table'     Properties:       TableName: 'Cities'       BillingMode: 'PAY_PER_REQUEST'       AttributeDefinitions:         - AttributeName: 'id'           AttributeType: 'S'         - AttributeName: 'timezone'           AttributeType: 'S'       KeySchema:         - AttributeName: 'id'           KeyType: 'HASH'       GlobalSecondaryIndexes:         - IndexName: 'TimezoneIndex'           KeySchema:             - AttributeName: 'timezone'               KeyType: 'HASH'           Projection:             ProjectionType: 'ALL'&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="AWSTemplateFormatVersion: '2010-09-09' Transform: 'AWS::Serverless-2016-10-31'  Description: '5PM City Finder'  Resources:    # Add the S3 Bucket resource   ArtifactBucket:     Type: 'AWS::S3::Bucket'    LambdaRole:     Type: 'AWS::IAM::Role'     Properties:       AssumeRolePolicyDocument:         Version: '2012-10-17'         Statement:           - Effect: 'Allow'             Principal:               Service:                 - 'lambda.amazonaws.com'             Action:               - 'sts:AssumeRole'       Policies:         - PolicyName: 'LambdaPolicy'           PolicyDocument:             Version: '2012-10-17'             Statement:               - Effect: 'Allow'                 Action:                   - 'dynamodb:Query'                   - 'logs:CreateLogGroup'                   - 'logs:CreateLogStream'                   - 'logs:PutLogEvents'                 Resource: '*'    CityFinderLambda:     Type: 'AWS::Serverless::Function'     Properties:       FunctionName: '5PMCityFinder'       Description: 'Finds cities where the local time is 5 PM'       Handler: 'lambda.lambda_handler'       Runtime: 'python3.8'       Role: !GetAtt LambdaRole.Arn       Timeout: 10       MemorySize: 128       Environment:         Variables:           TABLE_NAME: !Ref CitiesTable       Events:         ApiEvent:           Type: 'Api'           Properties:             Path: '/findcity'             Method: 'GET'    CitiesTable:     Type: 'AWS::DynamoDB::Table'     Properties:       TableName: 'Cities'       BillingMode: 'PAY_PER_REQUEST'       AttributeDefinitions:         - AttributeName: 'id'           AttributeType: 'S'         - AttributeName: 'timezone'           AttributeType: 'S'       KeySchema:         - AttributeName: 'id'           KeyType: 'HASH'       GlobalSecondaryIndexes:         - IndexName: 'TimezoneIndex'           KeySchema:             - AttributeName: 'timezone'               KeyType: 'HASH'           Projection:             ProjectionType: 'ALL'" title="AWSTemplateFormatVersion: '2010-09-09' Transform: 'AWS::Serverless-2016-10-31'  Description: '5PM City Finder'  Resources:    # Add the S3 Bucket resource   ArtifactBucket:     Type: 'AWS::S3::Bucket'    LambdaRole:     Type: 'AWS::IAM::Role'     Properties:       AssumeRolePolicyDocument:         Version: '2012-10-17'         Statement:           - Effect: 'Allow'             Principal:               Service:                 - 'lambda.amazonaws.com'             Action:               - 'sts:AssumeRole'       Policies:         - PolicyName: 'LambdaPolicy'           PolicyDocument:             Version: '2012-10-17'             Statement:               - Effect: 'Allow'                 Action:                   - 'dynamodb:Query'                   - 'logs:CreateLogGroup'                   - 'logs:CreateLogStream'                   - 'logs:PutLogEvents'                 Resource: '*'    CityFinderLambda:     Type: 'AWS::Serverless::Function'     Properties:       FunctionName: '5PMCityFinder'       Description: 'Finds cities where the local time is 5 PM'       Handler: 'lambda.lambda_handler'       Runtime: 'python3.8'       Role: !GetAtt LambdaRole.Arn       Timeout: 10       MemorySize: 128       Environment:         Variables:           TABLE_NAME: !Ref CitiesTable       Events:         ApiEvent:           Type: 'Api'           Properties:             Path: '/findcity'             Method: 'GET'    CitiesTable:     Type: 'AWS::DynamoDB::Table'     Properties:       TableName: 'Cities'       BillingMode: 'PAY_PER_REQUEST'       AttributeDefinitions:         - AttributeName: 'id'           AttributeType: 'S'         - AttributeName: 'timezone'           AttributeType: 'S'       KeySchema:         - AttributeName: 'id'           KeyType: 'HASH'       GlobalSecondaryIndexes:         - IndexName: 'TimezoneIndex'           KeySchema:             - AttributeName: 'timezone'               KeyType: 'HASH'           Projection:             ProjectionType: 'ALL'" srcset="https://substackcdn.com/image/fetch/$s_!zyGm!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6ba7856-154c-4fa8-a34f-426b100e86a5_1176x2926.png 424w, https://substackcdn.com/image/fetch/$s_!zyGm!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6ba7856-154c-4fa8-a34f-426b100e86a5_1176x2926.png 848w, https://substackcdn.com/image/fetch/$s_!zyGm!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6ba7856-154c-4fa8-a34f-426b100e86a5_1176x2926.png 1272w, https://substackcdn.com/image/fetch/$s_!zyGm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6ba7856-154c-4fa8-a34f-426b100e86a5_1176x2926.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This does <em>not</em> add the requested API-Gateway explicitly. Instead it defines the API-Gateway as part of the <code>AWS::Serverless::Function</code> resource within the Events section. This is <em>perfectly</em> valid, but does not do what I want for the future maintainability of this project, as I want the flexibility to configure the API-Gateway in other ways. A simple follow up message and this is cleared up. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!IyKm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3533eb6-e53b-48ac-812b-4b2db4b34a16_1204x2410.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!IyKm!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3533eb6-e53b-48ac-812b-4b2db4b34a16_1204x2410.png 424w, https://substackcdn.com/image/fetch/$s_!IyKm!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3533eb6-e53b-48ac-812b-4b2db4b34a16_1204x2410.png 848w, https://substackcdn.com/image/fetch/$s_!IyKm!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3533eb6-e53b-48ac-812b-4b2db4b34a16_1204x2410.png 1272w, https://substackcdn.com/image/fetch/$s_!IyKm!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3533eb6-e53b-48ac-812b-4b2db4b34a16_1204x2410.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!IyKm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3533eb6-e53b-48ac-812b-4b2db4b34a16_1204x2410.png" width="1204" height="2410" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a3533eb6-e53b-48ac-812b-4b2db4b34a16_1204x2410.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:2410,&quot;width&quot;:1204,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:318683,&quot;alt&quot;:&quot;If you would like to explicitly create an API Gateway resource, you can do that by adding an AWS::Serverless::Api resource to the template:  yaml Copy code AWSTemplateFormatVersion: '2010-09-09' Transform: 'AWS::Serverless-2016-10-31'  Description: '5PM City Finder'  Resources:    # Add the S3 Bucket resource   ArtifactBucket:     Type: 'AWS::S3::Bucket'    # ... Other resources ...    CityFinderApi:     Type: 'AWS::Serverless::Api'     Properties:       StageName: 'Prod'       DefinitionBody:         swagger: '2.0'         info:           title: 'City Finder API'         paths:           /findcity:             get:               x-amazon-apigateway-integration:                 httpMethod: 'POST'                 type: 'aws_proxy'                 uri:                   Fn::Sub: 'arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${CityFinderLambda.Arn}/invocations'               responses: {}    # ... Other resources ... Then, update the CityFinderLambda resource to include the CityFinderApi:  yaml Copy code CityFinderLambda:     Type: 'AWS::Serverless::Function'     Properties:       # ... Other properties ...       Events:         ApiEvent:           Type: 'Api'           Properties:             Path: '/findcity'             Method: 'GET'             RestApiId: !Ref CityFinderApi Now, the API Gateway is explicitly defined in the CloudFormation template, and the Lambda function is linked to it.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="If you would like to explicitly create an API Gateway resource, you can do that by adding an AWS::Serverless::Api resource to the template:  yaml Copy code AWSTemplateFormatVersion: '2010-09-09' Transform: 'AWS::Serverless-2016-10-31'  Description: '5PM City Finder'  Resources:    # Add the S3 Bucket resource   ArtifactBucket:     Type: 'AWS::S3::Bucket'    # ... Other resources ...    CityFinderApi:     Type: 'AWS::Serverless::Api'     Properties:       StageName: 'Prod'       DefinitionBody:         swagger: '2.0'         info:           title: 'City Finder API'         paths:           /findcity:             get:               x-amazon-apigateway-integration:                 httpMethod: 'POST'                 type: 'aws_proxy'                 uri:                   Fn::Sub: 'arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${CityFinderLambda.Arn}/invocations'               responses: {}    # ... Other resources ... Then, update the CityFinderLambda resource to include the CityFinderApi:  yaml Copy code CityFinderLambda:     Type: 'AWS::Serverless::Function'     Properties:       # ... Other properties ...       Events:         ApiEvent:           Type: 'Api'           Properties:             Path: '/findcity'             Method: 'GET'             RestApiId: !Ref CityFinderApi Now, the API Gateway is explicitly defined in the CloudFormation template, and the Lambda function is linked to it." title="If you would like to explicitly create an API Gateway resource, you can do that by adding an AWS::Serverless::Api resource to the template:  yaml Copy code AWSTemplateFormatVersion: '2010-09-09' Transform: 'AWS::Serverless-2016-10-31'  Description: '5PM City Finder'  Resources:    # Add the S3 Bucket resource   ArtifactBucket:     Type: 'AWS::S3::Bucket'    # ... Other resources ...    CityFinderApi:     Type: 'AWS::Serverless::Api'     Properties:       StageName: 'Prod'       DefinitionBody:         swagger: '2.0'         info:           title: 'City Finder API'         paths:           /findcity:             get:               x-amazon-apigateway-integration:                 httpMethod: 'POST'                 type: 'aws_proxy'                 uri:                   Fn::Sub: 'arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${CityFinderLambda.Arn}/invocations'               responses: {}    # ... Other resources ... Then, update the CityFinderLambda resource to include the CityFinderApi:  yaml Copy code CityFinderLambda:     Type: 'AWS::Serverless::Function'     Properties:       # ... Other properties ...       Events:         ApiEvent:           Type: 'Api'           Properties:             Path: '/findcity'             Method: 'GET'             RestApiId: !Ref CityFinderApi Now, the API Gateway is explicitly defined in the CloudFormation template, and the Lambda function is linked to it." srcset="https://substackcdn.com/image/fetch/$s_!IyKm!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3533eb6-e53b-48ac-812b-4b2db4b34a16_1204x2410.png 424w, https://substackcdn.com/image/fetch/$s_!IyKm!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3533eb6-e53b-48ac-812b-4b2db4b34a16_1204x2410.png 848w, https://substackcdn.com/image/fetch/$s_!IyKm!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3533eb6-e53b-48ac-812b-4b2db4b34a16_1204x2410.png 1272w, https://substackcdn.com/image/fetch/$s_!IyKm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3533eb6-e53b-48ac-812b-4b2db4b34a16_1204x2410.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h2><strong>I spend the next 2 weeks here. </strong></h2><p>I <s>failed</s> flailed around with a <strong>stupid</strong> idea. In my index.html I have a section that looks like this</p><pre><code>  &lt;script&gt;
    function createRain() {
      const numberOfDrops = 100;
      const rainContainer = document.querySelector(".rain");
  
      for (let i = 0; i &lt; numberOfDrops; i++) {
        const drop = document.createElement("span");
        drop.innerHTML = "&#127866;";
        drop.classList.add("drop");
        drop.style.left = Math.random() * 100 + "vw";
        drop.style.animationDuration = Math.random() * 6 + 4 + "s";
        drop.style.animationDelay = Math.random() * 2 + "s";
        rainContainer.appendChild(drop);
      }
    }
  
    document.addEventListener("DOMContentLoaded", function () {
      const apiUrl = "https://abcde12345.execute-api.ap-southeast-2.amazonaws.com/prod/find_location";
      createRain();
  
      // Initialize the map
      const map = L.map("map").setView([0, 0], 5);
      L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", {
        attribution: '&amp;copy; &lt;a href="https://www.openstreetmap.org/copyright"&gt;OpenStreetMap&lt;/a&gt; contributors',
      }).addTo(map);
  
    // Fetch city information and update the map and text
    fetch(apiUrl)
      .then((response) =&gt; response.json())
      .then((data) =&gt; {
        const { city, local_time, latitude, longitude, timezone } = data;
        const initialZoomLevel = 19;
        const finalZoomLevel = 9;

        map.setView([latitude, longitude], initialZoomLevel);
        const marker = L.marker([latitude, longitude]).addTo(map);
        marker.bindPopup(`&lt;b&gt;${city}&lt;/b&gt;&lt;br&gt;Local time: ${local_time}`).openPopup();
        document.getElementById("city-info").innerText = `City: ${city}, Timezone: ${timezone}, Local Time: ${local_time}`;

        // Smooth zoom out using flyTo method
        map.flyTo([latitude, longitude], finalZoomLevel, { duration: 10 });
      })
      .catch((error) =&gt; {
        console.error("Error fetching data:", error);
      });
  });
&lt;/script&gt;</code></pre><p>The part we&#8217;re concerned with is:<br></p><pre><code>    document.addEventListener("DOMContentLoaded", function () {
      const apiUrl = "https://abcde12345.execute-api.ap-southeast-2.amazonaws.com/prod/find_location";</code></pre><p>Since we&#8217;re deploying as IaC into a blank account, I don&#8217;t know the URL of the API-Gateway before the index.html file exists. I&#8217;m not really interested in using parameter store or doing anything <s>correctly</s> fancy with this part since this is likely to never change once deployed; but I do something stupid anyway. Since I have <s>free labour with</s> ChatGPT, I setup the <s>audacious</s> goal of having my CloudFormation Stack change this code (not the build spec, which would have been SOOO much easier) at deployment time. This is where I spend over a week. Completely stalled out. </p><p>ChatGPT leads me into a world many know of but few love. <strong>CloudFormation Custom Resources.</strong> More on this later? No, it&#8217;s boring. I&#8217;ll wrap it up here.</p><p> I end up getting my stack in a stuck state for multiple hours at a time. There is nothing you can do if your stack is stuck. I even ended up paying for AWS Support to tell me so.</p><p>I abandon the idea. </p><p>After I&#8217;m done with my migraine inducing journey, I keep going with actual development. </p><p>I spend the next weekend updating the CloudFormation stack. Getting CodeBuild and CodePipeline Setup and dialing in the IAM permissions via Trial and Error. I paste all deployment errors into ChatGPT and make only its suggested changes. </p><p>This is infuriating for me. I&#8217;ve been using CloudFormation for years, and I have the issue right in front of me. I know the answer and I&#8217;m powerless to do anything about it. Yet I watch as we brute force our way thru solutions that are simple changes. </p><p>Here is a montage - there are at least 100 more messages like this. </p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!QPeZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c335e95-e0bc-4d24-a0e1-d33d3973d389_1104x150.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!QPeZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c335e95-e0bc-4d24-a0e1-d33d3973d389_1104x150.png 424w, https://substackcdn.com/image/fetch/$s_!QPeZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c335e95-e0bc-4d24-a0e1-d33d3973d389_1104x150.png 848w, https://substackcdn.com/image/fetch/$s_!QPeZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c335e95-e0bc-4d24-a0e1-d33d3973d389_1104x150.png 1272w, https://substackcdn.com/image/fetch/$s_!QPeZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c335e95-e0bc-4d24-a0e1-d33d3973d389_1104x150.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!QPeZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c335e95-e0bc-4d24-a0e1-d33d3973d389_1104x150.png" width="1104" height="150" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4c335e95-e0bc-4d24-a0e1-d33d3973d389_1104x150.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:150,&quot;width&quot;:1104,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:16460,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!QPeZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c335e95-e0bc-4d24-a0e1-d33d3973d389_1104x150.png 424w, https://substackcdn.com/image/fetch/$s_!QPeZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c335e95-e0bc-4d24-a0e1-d33d3973d389_1104x150.png 848w, https://substackcdn.com/image/fetch/$s_!QPeZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c335e95-e0bc-4d24-a0e1-d33d3973d389_1104x150.png 1272w, https://substackcdn.com/image/fetch/$s_!QPeZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c335e95-e0bc-4d24-a0e1-d33d3973d389_1104x150.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ocb4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0386e94a-d608-4554-bcc3-a724036f33ff_1328x254.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ocb4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0386e94a-d608-4554-bcc3-a724036f33ff_1328x254.png 424w, https://substackcdn.com/image/fetch/$s_!ocb4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0386e94a-d608-4554-bcc3-a724036f33ff_1328x254.png 848w, https://substackcdn.com/image/fetch/$s_!ocb4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0386e94a-d608-4554-bcc3-a724036f33ff_1328x254.png 1272w, https://substackcdn.com/image/fetch/$s_!ocb4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0386e94a-d608-4554-bcc3-a724036f33ff_1328x254.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ocb4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0386e94a-d608-4554-bcc3-a724036f33ff_1328x254.png" width="1328" height="254" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0386e94a-d608-4554-bcc3-a724036f33ff_1328x254.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:254,&quot;width&quot;:1328,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:62478,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ocb4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0386e94a-d608-4554-bcc3-a724036f33ff_1328x254.png 424w, https://substackcdn.com/image/fetch/$s_!ocb4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0386e94a-d608-4554-bcc3-a724036f33ff_1328x254.png 848w, https://substackcdn.com/image/fetch/$s_!ocb4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0386e94a-d608-4554-bcc3-a724036f33ff_1328x254.png 1272w, https://substackcdn.com/image/fetch/$s_!ocb4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0386e94a-d608-4554-bcc3-a724036f33ff_1328x254.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!FRmo!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc07a9ace-651f-40e1-b684-efef0e6e2203_1290x204.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!FRmo!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc07a9ace-651f-40e1-b684-efef0e6e2203_1290x204.png 424w, https://substackcdn.com/image/fetch/$s_!FRmo!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc07a9ace-651f-40e1-b684-efef0e6e2203_1290x204.png 848w, https://substackcdn.com/image/fetch/$s_!FRmo!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc07a9ace-651f-40e1-b684-efef0e6e2203_1290x204.png 1272w, https://substackcdn.com/image/fetch/$s_!FRmo!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc07a9ace-651f-40e1-b684-efef0e6e2203_1290x204.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!FRmo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc07a9ace-651f-40e1-b684-efef0e6e2203_1290x204.png" width="1290" height="204" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c07a9ace-651f-40e1-b684-efef0e6e2203_1290x204.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:204,&quot;width&quot;:1290,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:49202,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!FRmo!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc07a9ace-651f-40e1-b684-efef0e6e2203_1290x204.png 424w, https://substackcdn.com/image/fetch/$s_!FRmo!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc07a9ace-651f-40e1-b684-efef0e6e2203_1290x204.png 848w, https://substackcdn.com/image/fetch/$s_!FRmo!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc07a9ace-651f-40e1-b684-efef0e6e2203_1290x204.png 1272w, https://substackcdn.com/image/fetch/$s_!FRmo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc07a9ace-651f-40e1-b684-efef0e6e2203_1290x204.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gdJZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ca57f0a-12d8-4bf8-af7b-6fe9ce991b90_1316x264.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gdJZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ca57f0a-12d8-4bf8-af7b-6fe9ce991b90_1316x264.png 424w, https://substackcdn.com/image/fetch/$s_!gdJZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ca57f0a-12d8-4bf8-af7b-6fe9ce991b90_1316x264.png 848w, https://substackcdn.com/image/fetch/$s_!gdJZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ca57f0a-12d8-4bf8-af7b-6fe9ce991b90_1316x264.png 1272w, https://substackcdn.com/image/fetch/$s_!gdJZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ca57f0a-12d8-4bf8-af7b-6fe9ce991b90_1316x264.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gdJZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ca57f0a-12d8-4bf8-af7b-6fe9ce991b90_1316x264.png" width="1316" height="264" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6ca57f0a-12d8-4bf8-af7b-6fe9ce991b90_1316x264.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:264,&quot;width&quot;:1316,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:69213,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!gdJZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ca57f0a-12d8-4bf8-af7b-6fe9ce991b90_1316x264.png 424w, https://substackcdn.com/image/fetch/$s_!gdJZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ca57f0a-12d8-4bf8-af7b-6fe9ce991b90_1316x264.png 848w, https://substackcdn.com/image/fetch/$s_!gdJZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ca57f0a-12d8-4bf8-af7b-6fe9ce991b90_1316x264.png 1272w, https://substackcdn.com/image/fetch/$s_!gdJZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ca57f0a-12d8-4bf8-af7b-6fe9ce991b90_1316x264.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!BfEP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F598802aa-8eb9-42fb-bcb2-270b51fc7d78_1312x390.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!BfEP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F598802aa-8eb9-42fb-bcb2-270b51fc7d78_1312x390.png 424w, https://substackcdn.com/image/fetch/$s_!BfEP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F598802aa-8eb9-42fb-bcb2-270b51fc7d78_1312x390.png 848w, https://substackcdn.com/image/fetch/$s_!BfEP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F598802aa-8eb9-42fb-bcb2-270b51fc7d78_1312x390.png 1272w, https://substackcdn.com/image/fetch/$s_!BfEP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F598802aa-8eb9-42fb-bcb2-270b51fc7d78_1312x390.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!BfEP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F598802aa-8eb9-42fb-bcb2-270b51fc7d78_1312x390.png" width="1312" height="390" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/598802aa-8eb9-42fb-bcb2-270b51fc7d78_1312x390.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:390,&quot;width&quot;:1312,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:87561,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!BfEP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F598802aa-8eb9-42fb-bcb2-270b51fc7d78_1312x390.png 424w, https://substackcdn.com/image/fetch/$s_!BfEP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F598802aa-8eb9-42fb-bcb2-270b51fc7d78_1312x390.png 848w, https://substackcdn.com/image/fetch/$s_!BfEP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F598802aa-8eb9-42fb-bcb2-270b51fc7d78_1312x390.png 1272w, https://substackcdn.com/image/fetch/$s_!BfEP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F598802aa-8eb9-42fb-bcb2-270b51fc7d78_1312x390.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!nqDA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82fa1e8b-0354-42d2-bb48-e66c43eabc51_1384x1212.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nqDA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82fa1e8b-0354-42d2-bb48-e66c43eabc51_1384x1212.png 424w, https://substackcdn.com/image/fetch/$s_!nqDA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82fa1e8b-0354-42d2-bb48-e66c43eabc51_1384x1212.png 848w, https://substackcdn.com/image/fetch/$s_!nqDA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82fa1e8b-0354-42d2-bb48-e66c43eabc51_1384x1212.png 1272w, https://substackcdn.com/image/fetch/$s_!nqDA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82fa1e8b-0354-42d2-bb48-e66c43eabc51_1384x1212.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!nqDA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82fa1e8b-0354-42d2-bb48-e66c43eabc51_1384x1212.png" width="1384" height="1212" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/82fa1e8b-0354-42d2-bb48-e66c43eabc51_1384x1212.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1212,&quot;width&quot;:1384,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:238990,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!nqDA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82fa1e8b-0354-42d2-bb48-e66c43eabc51_1384x1212.png 424w, https://substackcdn.com/image/fetch/$s_!nqDA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82fa1e8b-0354-42d2-bb48-e66c43eabc51_1384x1212.png 848w, https://substackcdn.com/image/fetch/$s_!nqDA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82fa1e8b-0354-42d2-bb48-e66c43eabc51_1384x1212.png 1272w, https://substackcdn.com/image/fetch/$s_!nqDA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82fa1e8b-0354-42d2-bb48-e66c43eabc51_1384x1212.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!oc70!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c7eac4c-1e9c-4a76-b1e4-9672d827afff_702x172.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!oc70!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c7eac4c-1e9c-4a76-b1e4-9672d827afff_702x172.png 424w, https://substackcdn.com/image/fetch/$s_!oc70!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c7eac4c-1e9c-4a76-b1e4-9672d827afff_702x172.png 848w, https://substackcdn.com/image/fetch/$s_!oc70!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c7eac4c-1e9c-4a76-b1e4-9672d827afff_702x172.png 1272w, https://substackcdn.com/image/fetch/$s_!oc70!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c7eac4c-1e9c-4a76-b1e4-9672d827afff_702x172.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!oc70!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c7eac4c-1e9c-4a76-b1e4-9672d827afff_702x172.png" width="702" height="172" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7c7eac4c-1e9c-4a76-b1e4-9672d827afff_702x172.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:172,&quot;width&quot;:702,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:31607,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!oc70!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c7eac4c-1e9c-4a76-b1e4-9672d827afff_702x172.png 424w, https://substackcdn.com/image/fetch/$s_!oc70!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c7eac4c-1e9c-4a76-b1e4-9672d827afff_702x172.png 848w, https://substackcdn.com/image/fetch/$s_!oc70!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c7eac4c-1e9c-4a76-b1e4-9672d827afff_702x172.png 1272w, https://substackcdn.com/image/fetch/$s_!oc70!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c7eac4c-1e9c-4a76-b1e4-9672d827afff_702x172.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!jBlP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F038855ce-4ca6-4243-9b22-c801b7cebf90_1356x964.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jBlP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F038855ce-4ca6-4243-9b22-c801b7cebf90_1356x964.png 424w, https://substackcdn.com/image/fetch/$s_!jBlP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F038855ce-4ca6-4243-9b22-c801b7cebf90_1356x964.png 848w, https://substackcdn.com/image/fetch/$s_!jBlP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F038855ce-4ca6-4243-9b22-c801b7cebf90_1356x964.png 1272w, https://substackcdn.com/image/fetch/$s_!jBlP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F038855ce-4ca6-4243-9b22-c801b7cebf90_1356x964.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!jBlP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F038855ce-4ca6-4243-9b22-c801b7cebf90_1356x964.png" width="1356" height="964" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/038855ce-4ca6-4243-9b22-c801b7cebf90_1356x964.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:964,&quot;width&quot;:1356,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:159775,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!jBlP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F038855ce-4ca6-4243-9b22-c801b7cebf90_1356x964.png 424w, https://substackcdn.com/image/fetch/$s_!jBlP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F038855ce-4ca6-4243-9b22-c801b7cebf90_1356x964.png 848w, https://substackcdn.com/image/fetch/$s_!jBlP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F038855ce-4ca6-4243-9b22-c801b7cebf90_1356x964.png 1272w, https://substackcdn.com/image/fetch/$s_!jBlP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F038855ce-4ca6-4243-9b22-c801b7cebf90_1356x964.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!qXCf!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65dad39c-e7fa-4c8e-800c-d30c50adbbbe_1286x196.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!qXCf!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65dad39c-e7fa-4c8e-800c-d30c50adbbbe_1286x196.png 424w, https://substackcdn.com/image/fetch/$s_!qXCf!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65dad39c-e7fa-4c8e-800c-d30c50adbbbe_1286x196.png 848w, https://substackcdn.com/image/fetch/$s_!qXCf!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65dad39c-e7fa-4c8e-800c-d30c50adbbbe_1286x196.png 1272w, https://substackcdn.com/image/fetch/$s_!qXCf!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65dad39c-e7fa-4c8e-800c-d30c50adbbbe_1286x196.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!qXCf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65dad39c-e7fa-4c8e-800c-d30c50adbbbe_1286x196.png" width="1286" height="196" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/65dad39c-e7fa-4c8e-800c-d30c50adbbbe_1286x196.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:196,&quot;width&quot;:1286,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:43974,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!qXCf!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65dad39c-e7fa-4c8e-800c-d30c50adbbbe_1286x196.png 424w, https://substackcdn.com/image/fetch/$s_!qXCf!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65dad39c-e7fa-4c8e-800c-d30c50adbbbe_1286x196.png 848w, https://substackcdn.com/image/fetch/$s_!qXCf!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65dad39c-e7fa-4c8e-800c-d30c50adbbbe_1286x196.png 1272w, https://substackcdn.com/image/fetch/$s_!qXCf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65dad39c-e7fa-4c8e-800c-d30c50adbbbe_1286x196.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fBon!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F31a63a4b-1fc3-4a3f-a011-413a4f4840e7_1368x280.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fBon!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F31a63a4b-1fc3-4a3f-a011-413a4f4840e7_1368x280.png 424w, https://substackcdn.com/image/fetch/$s_!fBon!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F31a63a4b-1fc3-4a3f-a011-413a4f4840e7_1368x280.png 848w, https://substackcdn.com/image/fetch/$s_!fBon!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F31a63a4b-1fc3-4a3f-a011-413a4f4840e7_1368x280.png 1272w, https://substackcdn.com/image/fetch/$s_!fBon!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F31a63a4b-1fc3-4a3f-a011-413a4f4840e7_1368x280.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!fBon!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F31a63a4b-1fc3-4a3f-a011-413a4f4840e7_1368x280.png" width="1368" height="280" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/31a63a4b-1fc3-4a3f-a011-413a4f4840e7_1368x280.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:280,&quot;width&quot;:1368,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:51870,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!fBon!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F31a63a4b-1fc3-4a3f-a011-413a4f4840e7_1368x280.png 424w, https://substackcdn.com/image/fetch/$s_!fBon!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F31a63a4b-1fc3-4a3f-a011-413a4f4840e7_1368x280.png 848w, https://substackcdn.com/image/fetch/$s_!fBon!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F31a63a4b-1fc3-4a3f-a011-413a4f4840e7_1368x280.png 1272w, https://substackcdn.com/image/fetch/$s_!fBon!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F31a63a4b-1fc3-4a3f-a011-413a4f4840e7_1368x280.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!nlsZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8801db42-7db8-4ef9-ae68-7da4af103611_1242x218.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nlsZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8801db42-7db8-4ef9-ae68-7da4af103611_1242x218.png 424w, https://substackcdn.com/image/fetch/$s_!nlsZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8801db42-7db8-4ef9-ae68-7da4af103611_1242x218.png 848w, https://substackcdn.com/image/fetch/$s_!nlsZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8801db42-7db8-4ef9-ae68-7da4af103611_1242x218.png 1272w, https://substackcdn.com/image/fetch/$s_!nlsZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8801db42-7db8-4ef9-ae68-7da4af103611_1242x218.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!nlsZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8801db42-7db8-4ef9-ae68-7da4af103611_1242x218.png" width="1242" height="218" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8801db42-7db8-4ef9-ae68-7da4af103611_1242x218.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:218,&quot;width&quot;:1242,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:46966,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!nlsZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8801db42-7db8-4ef9-ae68-7da4af103611_1242x218.png 424w, https://substackcdn.com/image/fetch/$s_!nlsZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8801db42-7db8-4ef9-ae68-7da4af103611_1242x218.png 848w, https://substackcdn.com/image/fetch/$s_!nlsZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8801db42-7db8-4ef9-ae68-7da4af103611_1242x218.png 1272w, https://substackcdn.com/image/fetch/$s_!nlsZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8801db42-7db8-4ef9-ae68-7da4af103611_1242x218.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!eAMi!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64b4e631-f060-4cd4-9012-e498892116b2_1332x590.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!eAMi!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64b4e631-f060-4cd4-9012-e498892116b2_1332x590.png 424w, https://substackcdn.com/image/fetch/$s_!eAMi!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64b4e631-f060-4cd4-9012-e498892116b2_1332x590.png 848w, https://substackcdn.com/image/fetch/$s_!eAMi!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64b4e631-f060-4cd4-9012-e498892116b2_1332x590.png 1272w, https://substackcdn.com/image/fetch/$s_!eAMi!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64b4e631-f060-4cd4-9012-e498892116b2_1332x590.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!eAMi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64b4e631-f060-4cd4-9012-e498892116b2_1332x590.png" width="1332" height="590" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/64b4e631-f060-4cd4-9012-e498892116b2_1332x590.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:590,&quot;width&quot;:1332,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:148064,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!eAMi!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64b4e631-f060-4cd4-9012-e498892116b2_1332x590.png 424w, https://substackcdn.com/image/fetch/$s_!eAMi!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64b4e631-f060-4cd4-9012-e498892116b2_1332x590.png 848w, https://substackcdn.com/image/fetch/$s_!eAMi!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64b4e631-f060-4cd4-9012-e498892116b2_1332x590.png 1272w, https://substackcdn.com/image/fetch/$s_!eAMi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64b4e631-f060-4cd4-9012-e498892116b2_1332x590.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!kqmi!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F194b8168-83b3-4f9c-96d2-24620538716d_1344x360.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kqmi!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F194b8168-83b3-4f9c-96d2-24620538716d_1344x360.png 424w, https://substackcdn.com/image/fetch/$s_!kqmi!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F194b8168-83b3-4f9c-96d2-24620538716d_1344x360.png 848w, https://substackcdn.com/image/fetch/$s_!kqmi!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F194b8168-83b3-4f9c-96d2-24620538716d_1344x360.png 1272w, https://substackcdn.com/image/fetch/$s_!kqmi!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F194b8168-83b3-4f9c-96d2-24620538716d_1344x360.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!kqmi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F194b8168-83b3-4f9c-96d2-24620538716d_1344x360.png" width="1344" height="360" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/194b8168-83b3-4f9c-96d2-24620538716d_1344x360.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:360,&quot;width&quot;:1344,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:66255,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!kqmi!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F194b8168-83b3-4f9c-96d2-24620538716d_1344x360.png 424w, https://substackcdn.com/image/fetch/$s_!kqmi!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F194b8168-83b3-4f9c-96d2-24620538716d_1344x360.png 848w, https://substackcdn.com/image/fetch/$s_!kqmi!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F194b8168-83b3-4f9c-96d2-24620538716d_1344x360.png 1272w, https://substackcdn.com/image/fetch/$s_!kqmi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F194b8168-83b3-4f9c-96d2-24620538716d_1344x360.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!vQSn!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F962f66d3-66a6-42e4-b549-2cb2d16fe107_1312x428.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!vQSn!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F962f66d3-66a6-42e4-b549-2cb2d16fe107_1312x428.png 424w, https://substackcdn.com/image/fetch/$s_!vQSn!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F962f66d3-66a6-42e4-b549-2cb2d16fe107_1312x428.png 848w, https://substackcdn.com/image/fetch/$s_!vQSn!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F962f66d3-66a6-42e4-b549-2cb2d16fe107_1312x428.png 1272w, https://substackcdn.com/image/fetch/$s_!vQSn!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F962f66d3-66a6-42e4-b549-2cb2d16fe107_1312x428.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!vQSn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F962f66d3-66a6-42e4-b549-2cb2d16fe107_1312x428.png" width="1312" height="428" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/962f66d3-66a6-42e4-b549-2cb2d16fe107_1312x428.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:428,&quot;width&quot;:1312,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:70540,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!vQSn!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F962f66d3-66a6-42e4-b549-2cb2d16fe107_1312x428.png 424w, https://substackcdn.com/image/fetch/$s_!vQSn!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F962f66d3-66a6-42e4-b549-2cb2d16fe107_1312x428.png 848w, https://substackcdn.com/image/fetch/$s_!vQSn!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F962f66d3-66a6-42e4-b549-2cb2d16fe107_1312x428.png 1272w, https://substackcdn.com/image/fetch/$s_!vQSn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F962f66d3-66a6-42e4-b549-2cb2d16fe107_1312x428.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!MLBS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff616dc0a-cecc-4c26-9e05-516ac93aa589_1364x1334.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!MLBS!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff616dc0a-cecc-4c26-9e05-516ac93aa589_1364x1334.png 424w, https://substackcdn.com/image/fetch/$s_!MLBS!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff616dc0a-cecc-4c26-9e05-516ac93aa589_1364x1334.png 848w, https://substackcdn.com/image/fetch/$s_!MLBS!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff616dc0a-cecc-4c26-9e05-516ac93aa589_1364x1334.png 1272w, https://substackcdn.com/image/fetch/$s_!MLBS!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff616dc0a-cecc-4c26-9e05-516ac93aa589_1364x1334.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!MLBS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff616dc0a-cecc-4c26-9e05-516ac93aa589_1364x1334.png" width="1364" height="1334" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f616dc0a-cecc-4c26-9e05-516ac93aa589_1364x1334.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1334,&quot;width&quot;:1364,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:403235,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!MLBS!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff616dc0a-cecc-4c26-9e05-516ac93aa589_1364x1334.png 424w, https://substackcdn.com/image/fetch/$s_!MLBS!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff616dc0a-cecc-4c26-9e05-516ac93aa589_1364x1334.png 848w, https://substackcdn.com/image/fetch/$s_!MLBS!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff616dc0a-cecc-4c26-9e05-516ac93aa589_1364x1334.png 1272w, https://substackcdn.com/image/fetch/$s_!MLBS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff616dc0a-cecc-4c26-9e05-516ac93aa589_1364x1334.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!9yen!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f6aba96-20c0-43ba-8006-0ff3e3673588_1286x306.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9yen!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f6aba96-20c0-43ba-8006-0ff3e3673588_1286x306.png 424w, https://substackcdn.com/image/fetch/$s_!9yen!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f6aba96-20c0-43ba-8006-0ff3e3673588_1286x306.png 848w, https://substackcdn.com/image/fetch/$s_!9yen!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f6aba96-20c0-43ba-8006-0ff3e3673588_1286x306.png 1272w, https://substackcdn.com/image/fetch/$s_!9yen!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f6aba96-20c0-43ba-8006-0ff3e3673588_1286x306.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!9yen!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f6aba96-20c0-43ba-8006-0ff3e3673588_1286x306.png" width="1286" height="306" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1f6aba96-20c0-43ba-8006-0ff3e3673588_1286x306.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:306,&quot;width&quot;:1286,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:60672,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!9yen!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f6aba96-20c0-43ba-8006-0ff3e3673588_1286x306.png 424w, https://substackcdn.com/image/fetch/$s_!9yen!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f6aba96-20c0-43ba-8006-0ff3e3673588_1286x306.png 848w, https://substackcdn.com/image/fetch/$s_!9yen!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f6aba96-20c0-43ba-8006-0ff3e3673588_1286x306.png 1272w, https://substackcdn.com/image/fetch/$s_!9yen!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f6aba96-20c0-43ba-8006-0ff3e3673588_1286x306.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>That last one was particularly frustrating! There are over 100 more messages involved in getting the IaC setup properly. This took me over 2 weeks. </p><p></p><p>With a completed CloudFormation Stack deployed into the main account I also get to work at setting up a second account for my Staging environment.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!SlXM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F397d3f72-3639-42f9-b56f-d4e03214a60a_1334x366.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!SlXM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F397d3f72-3639-42f9-b56f-d4e03214a60a_1334x366.png 424w, https://substackcdn.com/image/fetch/$s_!SlXM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F397d3f72-3639-42f9-b56f-d4e03214a60a_1334x366.png 848w, https://substackcdn.com/image/fetch/$s_!SlXM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F397d3f72-3639-42f9-b56f-d4e03214a60a_1334x366.png 1272w, https://substackcdn.com/image/fetch/$s_!SlXM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F397d3f72-3639-42f9-b56f-d4e03214a60a_1334x366.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!SlXM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F397d3f72-3639-42f9-b56f-d4e03214a60a_1334x366.png" width="1334" height="366" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/397d3f72-3639-42f9-b56f-d4e03214a60a_1334x366.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:366,&quot;width&quot;:1334,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:84322,&quot;alt&quot;:&quot;I want to use a second git branch (code pipeline/code build) to deploy into a second AWS account for my staging environment, can you suggest some changes?  ChatGPT To deploy to a second AWS account for your staging environment using a separate Git branch, you'll need to make some changes to both your buildspec.yml and template.yml files, as well as set up the proper AWS infrastructure in the second account. Here's what you need to do:&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="I want to use a second git branch (code pipeline/code build) to deploy into a second AWS account for my staging environment, can you suggest some changes?  ChatGPT To deploy to a second AWS account for your staging environment using a separate Git branch, you'll need to make some changes to both your buildspec.yml and template.yml files, as well as set up the proper AWS infrastructure in the second account. Here's what you need to do:" title="I want to use a second git branch (code pipeline/code build) to deploy into a second AWS account for my staging environment, can you suggest some changes?  ChatGPT To deploy to a second AWS account for your staging environment using a separate Git branch, you'll need to make some changes to both your buildspec.yml and template.yml files, as well as set up the proper AWS infrastructure in the second account. Here's what you need to do:" srcset="https://substackcdn.com/image/fetch/$s_!SlXM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F397d3f72-3639-42f9-b56f-d4e03214a60a_1334x366.png 424w, https://substackcdn.com/image/fetch/$s_!SlXM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F397d3f72-3639-42f9-b56f-d4e03214a60a_1334x366.png 848w, https://substackcdn.com/image/fetch/$s_!SlXM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F397d3f72-3639-42f9-b56f-d4e03214a60a_1334x366.png 1272w, https://substackcdn.com/image/fetch/$s_!SlXM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F397d3f72-3639-42f9-b56f-d4e03214a60a_1334x366.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>ChatGPT makes a few <s>minor</s> changes to my page and we&#8217;re now looking like we have an MVP. The biggest change is a custom javascript function that can search <s>poorly</s> Wikipedia for the <s>most relevant </s>article of the current location. (more on this later)</p><p>We might as well teach our viewer something while they look for an excuse to drink a beer. Surprisingly this only takes <s>2</s> 12 ask&#8217;s for ChatGPT to get it right. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!nK52!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18a7bc52-e38d-43e8-95a8-c4a96e0a9823_1576x1878.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nK52!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18a7bc52-e38d-43e8-95a8-c4a96e0a9823_1576x1878.png 424w, https://substackcdn.com/image/fetch/$s_!nK52!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18a7bc52-e38d-43e8-95a8-c4a96e0a9823_1576x1878.png 848w, https://substackcdn.com/image/fetch/$s_!nK52!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18a7bc52-e38d-43e8-95a8-c4a96e0a9823_1576x1878.png 1272w, https://substackcdn.com/image/fetch/$s_!nK52!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18a7bc52-e38d-43e8-95a8-c4a96e0a9823_1576x1878.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!nK52!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18a7bc52-e38d-43e8-95a8-c4a96e0a9823_1576x1878.png" width="1456" height="1735" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/18a7bc52-e38d-43e8-95a8-c4a96e0a9823_1576x1878.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1735,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:468246,&quot;alt&quot;:&quot;is it possible to find a wikipedia article for a city based on its gps location?  15:46 Yes, it is possible to find a Wikipedia article for a city based on its GPS location. You can use the Wikipedia API along with the Geosearch feature to query articles based on geographical coordinates (latitude and longitude).  To use the Geosearch feature, you'll need to make an API request to Wikipedia with the following parameters:  action: The action you want to perform, in this case, 'query'. list: The type of query, which is 'geosearch' for finding articles based on location. format: The format of the response, usually 'json'. gscoord: The GPS coordinates (latitude and longitude) of the location. gsradius: The search radius in meters around the provided coordinates. gslimit: The maximum number of results to return. Here's an example API request for finding Wikipedia articles near the coordinates (latitude: 48.858844, longitude: 2.294351):  https://en.wikipedia.org/w/api.php?action=query&amp;list=geosearch&amp;format=json&amp;gscoord=48.858844%7C2.294351&amp;gsradius=10000&amp;gslimit=10 This request searches for articles within a 10,000-meter radius around the given coordinates and returns up to 10 results. You can adjust the radius and result limit as needed.  Once you get the results, you can extract the relevant information, such as the page ID or title, and use that to generate a link to the Wikipedia article or fetch additional information using the Wikipedia API.  15:46 You i disregarded the local time information for my index.html file - ill put the new file below, can you include a section of the page that displays the results of the wikipedia search?  15:48 I have added a new section to your HTML file that displays the results of the Wikipedia search based on the user's location. Here's the updated code:&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="is it possible to find a wikipedia article for a city based on its gps location?  15:46 Yes, it is possible to find a Wikipedia article for a city based on its GPS location. You can use the Wikipedia API along with the Geosearch feature to query articles based on geographical coordinates (latitude and longitude).  To use the Geosearch feature, you'll need to make an API request to Wikipedia with the following parameters:  action: The action you want to perform, in this case, 'query'. list: The type of query, which is 'geosearch' for finding articles based on location. format: The format of the response, usually 'json'. gscoord: The GPS coordinates (latitude and longitude) of the location. gsradius: The search radius in meters around the provided coordinates. gslimit: The maximum number of results to return. Here's an example API request for finding Wikipedia articles near the coordinates (latitude: 48.858844, longitude: 2.294351):  https://en.wikipedia.org/w/api.php?action=query&amp;list=geosearch&amp;format=json&amp;gscoord=48.858844%7C2.294351&amp;gsradius=10000&amp;gslimit=10 This request searches for articles within a 10,000-meter radius around the given coordinates and returns up to 10 results. You can adjust the radius and result limit as needed.  Once you get the results, you can extract the relevant information, such as the page ID or title, and use that to generate a link to the Wikipedia article or fetch additional information using the Wikipedia API.  15:46 You i disregarded the local time information for my index.html file - ill put the new file below, can you include a section of the page that displays the results of the wikipedia search?  15:48 I have added a new section to your HTML file that displays the results of the Wikipedia search based on the user's location. Here's the updated code:" title="is it possible to find a wikipedia article for a city based on its gps location?  15:46 Yes, it is possible to find a Wikipedia article for a city based on its GPS location. You can use the Wikipedia API along with the Geosearch feature to query articles based on geographical coordinates (latitude and longitude).  To use the Geosearch feature, you'll need to make an API request to Wikipedia with the following parameters:  action: The action you want to perform, in this case, 'query'. list: The type of query, which is 'geosearch' for finding articles based on location. format: The format of the response, usually 'json'. gscoord: The GPS coordinates (latitude and longitude) of the location. gsradius: The search radius in meters around the provided coordinates. gslimit: The maximum number of results to return. Here's an example API request for finding Wikipedia articles near the coordinates (latitude: 48.858844, longitude: 2.294351):  https://en.wikipedia.org/w/api.php?action=query&amp;list=geosearch&amp;format=json&amp;gscoord=48.858844%7C2.294351&amp;gsradius=10000&amp;gslimit=10 This request searches for articles within a 10,000-meter radius around the given coordinates and returns up to 10 results. You can adjust the radius and result limit as needed.  Once you get the results, you can extract the relevant information, such as the page ID or title, and use that to generate a link to the Wikipedia article or fetch additional information using the Wikipedia API.  15:46 You i disregarded the local time information for my index.html file - ill put the new file below, can you include a section of the page that displays the results of the wikipedia search?  15:48 I have added a new section to your HTML file that displays the results of the Wikipedia search based on the user's location. Here's the updated code:" srcset="https://substackcdn.com/image/fetch/$s_!nK52!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18a7bc52-e38d-43e8-95a8-c4a96e0a9823_1576x1878.png 424w, https://substackcdn.com/image/fetch/$s_!nK52!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18a7bc52-e38d-43e8-95a8-c4a96e0a9823_1576x1878.png 848w, https://substackcdn.com/image/fetch/$s_!nK52!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18a7bc52-e38d-43e8-95a8-c4a96e0a9823_1576x1878.png 1272w, https://substackcdn.com/image/fetch/$s_!nK52!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18a7bc52-e38d-43e8-95a8-c4a96e0a9823_1576x1878.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>You can still view this version of the page here: <a href="https://findyourfivepm.com/index-old.html">https://findyourfivepm.com/index-old.html</a></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!9nxe!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05ee2775-c80b-4eb4-98e3-ea53fc3a62fd_2998x2630.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9nxe!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05ee2775-c80b-4eb4-98e3-ea53fc3a62fd_2998x2630.png 424w, https://substackcdn.com/image/fetch/$s_!9nxe!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05ee2775-c80b-4eb4-98e3-ea53fc3a62fd_2998x2630.png 848w, https://substackcdn.com/image/fetch/$s_!9nxe!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05ee2775-c80b-4eb4-98e3-ea53fc3a62fd_2998x2630.png 1272w, https://substackcdn.com/image/fetch/$s_!9nxe!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05ee2775-c80b-4eb4-98e3-ea53fc3a62fd_2998x2630.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!9nxe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05ee2775-c80b-4eb4-98e3-ea53fc3a62fd_2998x2630.png" width="1456" height="1277" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/05ee2775-c80b-4eb4-98e3-ea53fc3a62fd_2998x2630.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1277,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1244684,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!9nxe!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05ee2775-c80b-4eb4-98e3-ea53fc3a62fd_2998x2630.png 424w, https://substackcdn.com/image/fetch/$s_!9nxe!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05ee2775-c80b-4eb4-98e3-ea53fc3a62fd_2998x2630.png 848w, https://substackcdn.com/image/fetch/$s_!9nxe!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05ee2775-c80b-4eb4-98e3-ea53fc3a62fd_2998x2630.png 1272w, https://substackcdn.com/image/fetch/$s_!9nxe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05ee2775-c80b-4eb4-98e3-ea53fc3a62fd_2998x2630.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Fun fact - Rikitea is the subject of my first GitHub Issue in this project. During sometimes of the year, it&#8217;s actually the only place in the world with a population over 500 observing 5pm! I thought this was a bug, or shitty data, but it&#8217;s actually a real phenomenon. </p><p>They have the world&#8217;s loneliest time zone at UTC-9. You can read more about that here: <a href="https://findyourfivepm.com/blog/rikitea-the-sometimes-exclusive-celebrant-of-five-pm-at-utc-9.html">https://findyourfivepm.com/blog/rikitea-the-sometimes-exclusive-celebrant-of-five-pm-at-utc-9.html</a></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!sb-S!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feefaecb0-a74a-4f4d-bd0f-8ef14e12a836_1061x852.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!sb-S!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feefaecb0-a74a-4f4d-bd0f-8ef14e12a836_1061x852.png 424w, https://substackcdn.com/image/fetch/$s_!sb-S!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feefaecb0-a74a-4f4d-bd0f-8ef14e12a836_1061x852.png 848w, https://substackcdn.com/image/fetch/$s_!sb-S!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feefaecb0-a74a-4f4d-bd0f-8ef14e12a836_1061x852.png 1272w, https://substackcdn.com/image/fetch/$s_!sb-S!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feefaecb0-a74a-4f4d-bd0f-8ef14e12a836_1061x852.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!sb-S!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feefaecb0-a74a-4f4d-bd0f-8ef14e12a836_1061x852.png" width="1061" height="852" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/eefaecb0-a74a-4f4d-bd0f-8ef14e12a836_1061x852.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:852,&quot;width&quot;:1061,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:165547,&quot;alt&quot;:&quot;Pacific/Gambier #1 Open jeeshofone opened this issue on Apr 14 &#183; 4 comments Comments @jeeshofone jeeshofone commented on Apr 14 When its 12:13pm in Sydney the only timezone shown is Pacific/Gambier Screenshot 2023-04-14 at 12 13 59 pm  @jeeshofone jeeshofone self-assigned this on Apr 14 @jeeshofone Author jeeshofone commented on Apr 15 I think this is the UTC-9 issue  https://en.wikipedia.org/wiki/UTC%E2%88%9209:00&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Pacific/Gambier #1 Open jeeshofone opened this issue on Apr 14 &#183; 4 comments Comments @jeeshofone jeeshofone commented on Apr 14 When its 12:13pm in Sydney the only timezone shown is Pacific/Gambier Screenshot 2023-04-14 at 12 13 59 pm  @jeeshofone jeeshofone self-assigned this on Apr 14 @jeeshofone Author jeeshofone commented on Apr 15 I think this is the UTC-9 issue  https://en.wikipedia.org/wiki/UTC%E2%88%9209:00" title="Pacific/Gambier #1 Open jeeshofone opened this issue on Apr 14 &#183; 4 comments Comments @jeeshofone jeeshofone commented on Apr 14 When its 12:13pm in Sydney the only timezone shown is Pacific/Gambier Screenshot 2023-04-14 at 12 13 59 pm  @jeeshofone jeeshofone self-assigned this on Apr 14 @jeeshofone Author jeeshofone commented on Apr 15 I think this is the UTC-9 issue  https://en.wikipedia.org/wiki/UTC%E2%88%9209:00" srcset="https://substackcdn.com/image/fetch/$s_!sb-S!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feefaecb0-a74a-4f4d-bd0f-8ef14e12a836_1061x852.png 424w, https://substackcdn.com/image/fetch/$s_!sb-S!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feefaecb0-a74a-4f4d-bd0f-8ef14e12a836_1061x852.png 848w, https://substackcdn.com/image/fetch/$s_!sb-S!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feefaecb0-a74a-4f4d-bd0f-8ef14e12a836_1061x852.png 1272w, https://substackcdn.com/image/fetch/$s_!sb-S!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feefaecb0-a74a-4f4d-bd0f-8ef14e12a836_1061x852.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!REDB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb71f2073-afd2-4686-9c2f-0a7b750a3f0e_993x282.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!REDB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb71f2073-afd2-4686-9c2f-0a7b750a3f0e_993x282.png 424w, https://substackcdn.com/image/fetch/$s_!REDB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb71f2073-afd2-4686-9c2f-0a7b750a3f0e_993x282.png 848w, https://substackcdn.com/image/fetch/$s_!REDB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb71f2073-afd2-4686-9c2f-0a7b750a3f0e_993x282.png 1272w, https://substackcdn.com/image/fetch/$s_!REDB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb71f2073-afd2-4686-9c2f-0a7b750a3f0e_993x282.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!REDB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb71f2073-afd2-4686-9c2f-0a7b750a3f0e_993x282.png" width="993" height="282" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b71f2073-afd2-4686-9c2f-0a7b750a3f0e_993x282.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:282,&quot;width&quot;:993,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:41009,&quot;alt&quot;:&quot; This is likely to be a bigger issue. I want to put together a mapping of how many cities are in each UTC offset. This will be our testing and and output of the hydrate lambda  @jeeshofone Author jeeshofone commented last month This is literally the only place in this time zone for parts of the year 2023-09-24_5pm_report-2.csv&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt=" This is likely to be a bigger issue. I want to put together a mapping of how many cities are in each UTC offset. This will be our testing and and output of the hydrate lambda  @jeeshofone Author jeeshofone commented last month This is literally the only place in this time zone for parts of the year 2023-09-24_5pm_report-2.csv" title=" This is likely to be a bigger issue. I want to put together a mapping of how many cities are in each UTC offset. This will be our testing and and output of the hydrate lambda  @jeeshofone Author jeeshofone commented last month This is literally the only place in this time zone for parts of the year 2023-09-24_5pm_report-2.csv" srcset="https://substackcdn.com/image/fetch/$s_!REDB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb71f2073-afd2-4686-9c2f-0a7b750a3f0e_993x282.png 424w, https://substackcdn.com/image/fetch/$s_!REDB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb71f2073-afd2-4686-9c2f-0a7b750a3f0e_993x282.png 848w, https://substackcdn.com/image/fetch/$s_!REDB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb71f2073-afd2-4686-9c2f-0a7b750a3f0e_993x282.png 1272w, https://substackcdn.com/image/fetch/$s_!REDB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb71f2073-afd2-4686-9c2f-0a7b750a3f0e_993x282.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>I should probably close my GitHub Issue&#8230; </p><h2>Current Status</h2><p>I have now created:</p><ol><li><p>A full CloudFormation Stack deploying automatically in 2 AWS accounts, Production and Staging</p></li><li><p>CityFinder Lambda Serving the API Request to get the Current City at 5pm</p></li><li><p>A DynamoDB table with over 198,000 cities and their locations</p></li><li><p>A Hydrate Lambda that gets data from <a href="http://www.geonames.org">http://www.geonames.org</a> and hydrates the DynamoDB table</p></li><li><p>An API-Gatway to interface the CityFinder Lambda. </p></li><li><p>A Basic HTML front end that allows me to visualize the results. </p></li><li><p>All relevant IAM Roles and Permissions</p></li><li><p>Custom Domain Names for the service with CloudFront serving SSL certificates and API-Gateway serving Cities and in the production environment using CORS and SSL. </p></li></ol><p></p><p>It's now time to polish this up a bit. I am using the &#8220;free&#8221; version of OpenStreet Maps. I can&#8217;t use this in production at scale, it&#8217;s against the terms of service and my users <s>if I ever get any</s> will get rate-limited. I also found that after spending a lot of time working with ChatGPT that it failed to get any better at web page creation. Organizing visual elements and making something appealing for a user to look at is well beyond its current capabilities. </p><p>It&#8217;s time to take our MVP to the next level.</p><p>See you in Part 3.</p><h2>Manifest</h2><p><a href="https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-0">Part 0 - Introduction</a><br><a href="https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-1">Part 1 - Failing Fast (Building with prompts)</a><br>Part 2 - MVP and Deployments *<strong>You</strong> are <em>Here</em> &#128129;&#8205;&#9792;&#65039;<br><a href="https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-3">Part 3 - MVPolish</a><br><a href="https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-4">Part 4 - So what.</a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-2?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-2?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.123cloud.st/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.123cloud.st/subscribe?"><span>Subscribe now</span></a></p><p>I&#8217;m <em>sure</em> you want to see each and every prompt; but there are hundreds if not thousands of prompts and I couldn&#8217;t possibly paste them here&#8230;. oh, ChatGPT has link sharing - as a special offer for paid subscribers, you can access the enthralling conversations below.</p>
      <p>
          <a href="https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-2">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[The sun never sets on 5pm - Part 1]]></title><description><![CDATA[Failing Fast and Building Real Applications with Prompts]]></description><link>https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-1</link><guid isPermaLink="false">https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-1</guid><dc:creator><![CDATA[Will Laws]]></dc:creator><pubDate>Tue, 24 Oct 2023 19:24:11 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/e25f427f-6fde-4505-9db8-b09daeb7cc5d_4340x2874.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2>Manifest</h2><p><a href="https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-0">Part 0 - Introduction</a><br>Part 1 - Failing Fast (Building with prompts) *<strong>You</strong> are <em>Here</em> &#128129;&#8205;&#9792;&#65039;<br><a href="https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-2">Part 2 - MVP and Deployments</a><br><a href="https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-3">Part 3 - MVPolish</a><br><a href="https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-4">Part 4 - So what.</a></p><p></p><p><em>be sure to read <strong>Part 0</strong> for the &#8220;why&#8221; </em></p><h1>Getting Started</h1><p><em>(For those who prefer <strong>not</strong> to read the text in the images, rest assured, I'll continue to provide a <strong>summary</strong> of the progress <strong>after</strong> each visual update.)</em></p><p></p><p>My initial goal is to make a lambda function that will use a timezone database (which I did not specify any details about), compare the current time to the database and return the location, longitude and latitude of the result. I first try to ask GPT-4 to do this like I was writing comments in a python file.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!XGsS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3dd9298-50d1-4f72-9357-10e2dac91861_641x715.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!XGsS!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3dd9298-50d1-4f72-9357-10e2dac91861_641x715.png 424w, https://substackcdn.com/image/fetch/$s_!XGsS!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3dd9298-50d1-4f72-9357-10e2dac91861_641x715.png 848w, https://substackcdn.com/image/fetch/$s_!XGsS!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3dd9298-50d1-4f72-9357-10e2dac91861_641x715.png 1272w, https://substackcdn.com/image/fetch/$s_!XGsS!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3dd9298-50d1-4f72-9357-10e2dac91861_641x715.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!XGsS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3dd9298-50d1-4f72-9357-10e2dac91861_641x715.png" width="641" height="715" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d3dd9298-50d1-4f72-9357-10e2dac91861_641x715.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:715,&quot;width&quot;:641,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:101645,&quot;alt&quot;:&quot;# this is a python file that finds a place where it is currently between 5pm and 5:59pm local time and returns the latitude and longitude of that place.  # It uses the timezone database to find the current timezone and then uses the timezone to find the current time. It then uses the timezone to find the latitude and longitude of the place.  # It then returns the latitude and longitude of the place. # this will run as a lambda function  ChatGPT To create a Python file that finds a place where it is currently between 5 PM and 5:59 PM local time and returns the latitude and longitude of that place, you can use the 'pytz' library to work with time zones and the 'geopy' library to get latitude and longitude.  First, make sure you have installed the required libraries:  bash Copy code pip install pytz geopy Now, create a Python script (e.g., find_location.py) with the following code:&quot;,&quot;title&quot;:&quot;# this is a python file that finds a place where it is currently between 5pm and 5:59pm local time and returns the latitude and longitude of that place.  # It uses the timezone database to find the current timezone and then uses the timezone to find the current time. It then uses the timezone to find the latitude and longitude of the place.  # It then returns the latitude and longitude of the place. # this will run as a lambda function  ChatGPT To create a Python file that finds a place where it is currently between 5 PM and 5:59 PM local time and returns the latitude and longitude of that place, you can use the 'pytz' library to work with time zones and the 'geopy' library to get latitude and longitude.  First, make sure you have installed the required libraries:  bash Copy code pip install pytz geopy Now, create a Python script (e.g., find_location.py) with the following code:&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="# this is a python file that finds a place where it is currently between 5pm and 5:59pm local time and returns the latitude and longitude of that place.  # It uses the timezone database to find the current timezone and then uses the timezone to find the current time. It then uses the timezone to find the latitude and longitude of the place.  # It then returns the latitude and longitude of the place. # this will run as a lambda function  ChatGPT To create a Python file that finds a place where it is currently between 5 PM and 5:59 PM local time and returns the latitude and longitude of that place, you can use the 'pytz' library to work with time zones and the 'geopy' library to get latitude and longitude.  First, make sure you have installed the required libraries:  bash Copy code pip install pytz geopy Now, create a Python script (e.g., find_location.py) with the following code:" title="# this is a python file that finds a place where it is currently between 5pm and 5:59pm local time and returns the latitude and longitude of that place.  # It uses the timezone database to find the current timezone and then uses the timezone to find the current time. It then uses the timezone to find the latitude and longitude of the place.  # It then returns the latitude and longitude of the place. # this will run as a lambda function  ChatGPT To create a Python file that finds a place where it is currently between 5 PM and 5:59 PM local time and returns the latitude and longitude of that place, you can use the 'pytz' library to work with time zones and the 'geopy' library to get latitude and longitude.  First, make sure you have installed the required libraries:  bash Copy code pip install pytz geopy Now, create a Python script (e.g., find_location.py) with the following code:" srcset="https://substackcdn.com/image/fetch/$s_!XGsS!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3dd9298-50d1-4f72-9357-10e2dac91861_641x715.png 424w, https://substackcdn.com/image/fetch/$s_!XGsS!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3dd9298-50d1-4f72-9357-10e2dac91861_641x715.png 848w, https://substackcdn.com/image/fetch/$s_!XGsS!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3dd9298-50d1-4f72-9357-10e2dac91861_641x715.png 1272w, https://substackcdn.com/image/fetch/$s_!XGsS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3dd9298-50d1-4f72-9357-10e2dac91861_641x715.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The first foray</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!xzgT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3db5773-d91b-4d7b-a77e-b37032fe4ce0_641x1629.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!xzgT!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3db5773-d91b-4d7b-a77e-b37032fe4ce0_641x1629.png 424w, https://substackcdn.com/image/fetch/$s_!xzgT!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3db5773-d91b-4d7b-a77e-b37032fe4ce0_641x1629.png 848w, https://substackcdn.com/image/fetch/$s_!xzgT!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3db5773-d91b-4d7b-a77e-b37032fe4ce0_641x1629.png 1272w, https://substackcdn.com/image/fetch/$s_!xzgT!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3db5773-d91b-4d7b-a77e-b37032fe4ce0_641x1629.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!xzgT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3db5773-d91b-4d7b-a77e-b37032fe4ce0_641x1629.png" width="641" height="1629" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f3db5773-d91b-4d7b-a77e-b37032fe4ce0_641x1629.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1629,&quot;width&quot;:641,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:194859,&quot;alt&quot;:&quot;import datetime import pytz from geopy.geocoders import Nominatim  def get_location_with_time_between_5_and_6():     geolocator = Nominatim(user_agent=\&quot;myGeocoder\&quot;)      current_utc_time = datetime.datetime.utcnow()     for tz in pytz.all_timezones:         try:             local_time = current_utc_time.astimezone(pytz.timezone(tz))             if local_time.hour == 17:  # Check if the local time is between 5 PM and 5:59 PM                 location = geolocator.timezone(tz)                 return {                     \&quot;latitude\&quot;: location.latitude,                     \&quot;longitude\&quot;: location.longitude,                     \&quot;timezone\&quot;: tz,                 }         except Exception as e:             pass      return None  if __name__ == \&quot;__main__\&quot;:     location_data = get_location_with_time_between_5_and_6()     if location_data:         print(f\&quot;Latitude: {location_data['latitude']}, Longitude: {location_data['longitude']}, Timezone: {location_data['timezone']}\&quot;)     else:         print(\&quot;No location found where the time is between 5 PM and 5:59 PM.\&quot;) To use this script as an AWS Lambda function, you'll need to create a deployment package with the script and its dependencies. Here's how to do that:  Create a new directory for the package, e.g., find_location_package. Copy the find_location.py script into the new directory. Install the required libraries within the package directory: bash Copy code pip install pytz geopy -t find_location_package Zip the contents of the package directory: bash Copy code cd find_location_package zip -r ../find_location_package.zip . Upload the find_location_package.zip file to your AWS Lambda function. Set the Lambda function's handler to find_location.get_location_with_time_between_5_and_6. Now you should be able to run the Lambda function and get the latitude and longitude of a location where it's currently between 5 PM and 5:59 PM local time.&quot;,&quot;title&quot;:&quot;import datetime import pytz from geopy.geocoders import Nominatim  def get_location_with_time_between_5_and_6():     geolocator = Nominatim(user_agent=\&quot;myGeocoder\&quot;)      current_utc_time = datetime.datetime.utcnow()     for tz in pytz.all_timezones:         try:             local_time = current_utc_time.astimezone(pytz.timezone(tz))             if local_time.hour == 17:  # Check if the local time is between 5 PM and 5:59 PM                 location = geolocator.timezone(tz)                 return {                     \&quot;latitude\&quot;: location.latitude,                     \&quot;longitude\&quot;: location.longitude,                     \&quot;timezone\&quot;: tz,                 }         except Exception as e:             pass      return None  if __name__ == \&quot;__main__\&quot;:     location_data = get_location_with_time_between_5_and_6()     if location_data:         print(f\&quot;Latitude: {location_data['latitude']}, Longitude: {location_data['longitude']}, Timezone: {location_data['timezone']}\&quot;)     else:         print(\&quot;No location found where the time is between 5 PM and 5:59 PM.\&quot;) To use this script as an AWS Lambda function, you'll need to create a deployment package with the script and its dependencies. Here's how to do that:  Create a new directory for the package, e.g., find_location_package. Copy the find_location.py script into the new directory. Install the required libraries within the package directory: bash Copy code pip install pytz geopy -t find_location_package Zip the contents of the package directory: bash Copy code cd find_location_package zip -r ../find_location_package.zip . Upload the find_location_package.zip file to your AWS Lambda function. Set the Lambda function's handler to find_location.get_location_with_time_between_5_and_6. Now you should be able to run the Lambda function and get the latitude and longitude of a location where it's currently between 5 PM and 5:59 PM local time.&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="import datetime import pytz from geopy.geocoders import Nominatim  def get_location_with_time_between_5_and_6():     geolocator = Nominatim(user_agent=&quot;myGeocoder&quot;)      current_utc_time = datetime.datetime.utcnow()     for tz in pytz.all_timezones:         try:             local_time = current_utc_time.astimezone(pytz.timezone(tz))             if local_time.hour == 17:  # Check if the local time is between 5 PM and 5:59 PM                 location = geolocator.timezone(tz)                 return {                     &quot;latitude&quot;: location.latitude,                     &quot;longitude&quot;: location.longitude,                     &quot;timezone&quot;: tz,                 }         except Exception as e:             pass      return None  if __name__ == &quot;__main__&quot;:     location_data = get_location_with_time_between_5_and_6()     if location_data:         print(f&quot;Latitude: {location_data['latitude']}, Longitude: {location_data['longitude']}, Timezone: {location_data['timezone']}&quot;)     else:         print(&quot;No location found where the time is between 5 PM and 5:59 PM.&quot;) To use this script as an AWS Lambda function, you'll need to create a deployment package with the script and its dependencies. Here's how to do that:  Create a new directory for the package, e.g., find_location_package. Copy the find_location.py script into the new directory. Install the required libraries within the package directory: bash Copy code pip install pytz geopy -t find_location_package Zip the contents of the package directory: bash Copy code cd find_location_package zip -r ../find_location_package.zip . Upload the find_location_package.zip file to your AWS Lambda function. Set the Lambda function's handler to find_location.get_location_with_time_between_5_and_6. Now you should be able to run the Lambda function and get the latitude and longitude of a location where it's currently between 5 PM and 5:59 PM local time." title="import datetime import pytz from geopy.geocoders import Nominatim  def get_location_with_time_between_5_and_6():     geolocator = Nominatim(user_agent=&quot;myGeocoder&quot;)      current_utc_time = datetime.datetime.utcnow()     for tz in pytz.all_timezones:         try:             local_time = current_utc_time.astimezone(pytz.timezone(tz))             if local_time.hour == 17:  # Check if the local time is between 5 PM and 5:59 PM                 location = geolocator.timezone(tz)                 return {                     &quot;latitude&quot;: location.latitude,                     &quot;longitude&quot;: location.longitude,                     &quot;timezone&quot;: tz,                 }         except Exception as e:             pass      return None  if __name__ == &quot;__main__&quot;:     location_data = get_location_with_time_between_5_and_6()     if location_data:         print(f&quot;Latitude: {location_data['latitude']}, Longitude: {location_data['longitude']}, Timezone: {location_data['timezone']}&quot;)     else:         print(&quot;No location found where the time is between 5 PM and 5:59 PM.&quot;) To use this script as an AWS Lambda function, you'll need to create a deployment package with the script and its dependencies. Here's how to do that:  Create a new directory for the package, e.g., find_location_package. Copy the find_location.py script into the new directory. Install the required libraries within the package directory: bash Copy code pip install pytz geopy -t find_location_package Zip the contents of the package directory: bash Copy code cd find_location_package zip -r ../find_location_package.zip . Upload the find_location_package.zip file to your AWS Lambda function. Set the Lambda function's handler to find_location.get_location_with_time_between_5_and_6. Now you should be able to run the Lambda function and get the latitude and longitude of a location where it's currently between 5 PM and 5:59 PM local time." srcset="https://substackcdn.com/image/fetch/$s_!xzgT!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3db5773-d91b-4d7b-a77e-b37032fe4ce0_641x1629.png 424w, https://substackcdn.com/image/fetch/$s_!xzgT!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3db5773-d91b-4d7b-a77e-b37032fe4ce0_641x1629.png 848w, https://substackcdn.com/image/fetch/$s_!xzgT!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3db5773-d91b-4d7b-a77e-b37032fe4ce0_641x1629.png 1272w, https://substackcdn.com/image/fetch/$s_!xzgT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3db5773-d91b-4d7b-a77e-b37032fe4ce0_641x1629.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h2><s>First</s> Fail Fast</h2><p>Ah, our initial query is also a pivotal realization in our AI-powered odyssey. Indeed, approaching tasks with LLMs like GPT-4 requires a different mindset. Asking too much in one go is a common pitfall, and it's one that I've just encountered firsthand.</p><p>Helpfully, ChatGPT has used <code>nominatim</code> which is a <a href="https://nominatim.org">nice</a> library - however, its purpose is to find places by their name or address and turn them into GPS Coordinates like &#8220;New York&#8221; &#8594; 40&#176;42&#8242;46&#8243;N 74&#176;00&#8242;22&#8243;W.  It can also take a longitude and latitude and turn them into the nearest address like <a href="https://www.google.com/maps/@-36.8236851,139.8629042,3a,75y,115.14h,90t/data=!3m7!1e1!3m5!1sEJTGPC5_cTt3D0BIDCPz-w!2e0!6shttps:%2F%2Fstreetviewpixels-pa.googleapis.com%2Fv1%2Fthumbnail%3Fpanoid%3DEJTGPC5_cTt3D0BIDCPz-w%26cb_client%3Dmaps_sv.tactile.gps%26w%3D203%26h%3D100%26yaw%3D120.384476%26pitch%3D0%26thumbfov%3D100!7i16384!8i8192?hl=en&amp;entry=ttu">36&#176;49&#8242;25.6&#8243;S 139&#176;51&#8242;47.5&#8243;E</a> &#8594; 17 Princes Hwy, Kingston SE SA 5275 Australia.  </p><p>I want to turn the <strong>time</strong> into a <strong>place</strong> and I don&#8217;t know <em>where</em> that place is or <em>what</em> its address is. </p><p>To attempt this - ChatGPT has taken the current time, iterated over all the timezones provided by the <code>pytz</code> library (converting to UTC), finds the (doesn&#8217;t handle the case were there are multiple &#8220;named&#8221; timezones where its 5pm) singular timezone where its 5pm and then <strong>finds the singular longitude and latitude of the </strong><em><strong>timezone</strong></em><strong>. </strong>Can you even do that? <br><br><em>I&#8217;ve obviously not explained myself well.</em><strong><br></strong></p><p>So, the key is to break tasks into bite-sized, ordered steps. This approach <s>mitigates</s> reduces the chance of GPT-4 'hallucinating' - an AI's tendency to generate outputs that are coherent but detached from reality or the provided data. Let's recalibrate and proceed with this refined approach.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!vL62!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c5646c2-b032-4f0e-a508-984a6fc64c36_625x324.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!vL62!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c5646c2-b032-4f0e-a508-984a6fc64c36_625x324.png 424w, https://substackcdn.com/image/fetch/$s_!vL62!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c5646c2-b032-4f0e-a508-984a6fc64c36_625x324.png 848w, https://substackcdn.com/image/fetch/$s_!vL62!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c5646c2-b032-4f0e-a508-984a6fc64c36_625x324.png 1272w, https://substackcdn.com/image/fetch/$s_!vL62!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c5646c2-b032-4f0e-a508-984a6fc64c36_625x324.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!vL62!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c5646c2-b032-4f0e-a508-984a6fc64c36_625x324.png" width="625" height="324" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8c5646c2-b032-4f0e-a508-984a6fc64c36_625x324.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:324,&quot;width&quot;:625,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:52491,&quot;alt&quot;:&quot;i want the lambda function to be fronted by api-gateway and to programmatically return the result for an api  ChatGPT To use AWS Lambda with API Gateway, you'll need to make a few changes to the code and set up the API Gateway in the AWS Console.  First, modify the find_location.py script to use the AWS Lambda handler format and return the API Gateway-compatible response:&quot;,&quot;title&quot;:&quot;i want the lambda function to be fronted by api-gateway and to programmatically return the result for an api  ChatGPT To use AWS Lambda with API Gateway, you'll need to make a few changes to the code and set up the API Gateway in the AWS Console.  First, modify the find_location.py script to use the AWS Lambda handler format and return the API Gateway-compatible response:&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="i want the lambda function to be fronted by api-gateway and to programmatically return the result for an api  ChatGPT To use AWS Lambda with API Gateway, you'll need to make a few changes to the code and set up the API Gateway in the AWS Console.  First, modify the find_location.py script to use the AWS Lambda handler format and return the API Gateway-compatible response:" title="i want the lambda function to be fronted by api-gateway and to programmatically return the result for an api  ChatGPT To use AWS Lambda with API Gateway, you'll need to make a few changes to the code and set up the API Gateway in the AWS Console.  First, modify the find_location.py script to use the AWS Lambda handler format and return the API Gateway-compatible response:" srcset="https://substackcdn.com/image/fetch/$s_!vL62!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c5646c2-b032-4f0e-a508-984a6fc64c36_625x324.png 424w, https://substackcdn.com/image/fetch/$s_!vL62!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c5646c2-b032-4f0e-a508-984a6fc64c36_625x324.png 848w, https://substackcdn.com/image/fetch/$s_!vL62!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c5646c2-b032-4f0e-a508-984a6fc64c36_625x324.png 1272w, https://substackcdn.com/image/fetch/$s_!vL62!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c5646c2-b032-4f0e-a508-984a6fc64c36_625x324.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!OZv8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F958a8703-fd98-44f4-b950-e93b03632edf_640x231.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!OZv8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F958a8703-fd98-44f4-b950-e93b03632edf_640x231.png 424w, https://substackcdn.com/image/fetch/$s_!OZv8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F958a8703-fd98-44f4-b950-e93b03632edf_640x231.png 848w, https://substackcdn.com/image/fetch/$s_!OZv8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F958a8703-fd98-44f4-b950-e93b03632edf_640x231.png 1272w, https://substackcdn.com/image/fetch/$s_!OZv8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F958a8703-fd98-44f4-b950-e93b03632edf_640x231.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!OZv8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F958a8703-fd98-44f4-b950-e93b03632edf_640x231.png" width="640" height="231" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/958a8703-fd98-44f4-b950-e93b03632edf_640x231.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:231,&quot;width&quot;:640,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:38294,&quot;alt&quot;:&quot;I want to also return the name of the city   ChatGPT To return the name of the city, you can use the reverse method from the geopy.geocoders library, which returns the address information for a given latitude and longitude. Update the find_location.py script as follows:&quot;,&quot;title&quot;:&quot;I want to also return the name of the city   ChatGPT To return the name of the city, you can use the reverse method from the geopy.geocoders library, which returns the address information for a given latitude and longitude. Update the find_location.py script as follows:&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="I want to also return the name of the city   ChatGPT To return the name of the city, you can use the reverse method from the geopy.geocoders library, which returns the address information for a given latitude and longitude. Update the find_location.py script as follows:" title="I want to also return the name of the city   ChatGPT To return the name of the city, you can use the reverse method from the geopy.geocoders library, which returns the address information for a given latitude and longitude. Update the find_location.py script as follows:" srcset="https://substackcdn.com/image/fetch/$s_!OZv8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F958a8703-fd98-44f4-b950-e93b03632edf_640x231.png 424w, https://substackcdn.com/image/fetch/$s_!OZv8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F958a8703-fd98-44f4-b950-e93b03632edf_640x231.png 848w, https://substackcdn.com/image/fetch/$s_!OZv8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F958a8703-fd98-44f4-b950-e93b03632edf_640x231.png 1272w, https://substackcdn.com/image/fetch/$s_!OZv8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F958a8703-fd98-44f4-b950-e93b03632edf_640x231.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!qEtG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bfe299c-7873-4fab-b507-18dcc14ea1cc_636x869.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!qEtG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bfe299c-7873-4fab-b507-18dcc14ea1cc_636x869.png 424w, https://substackcdn.com/image/fetch/$s_!qEtG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bfe299c-7873-4fab-b507-18dcc14ea1cc_636x869.png 848w, https://substackcdn.com/image/fetch/$s_!qEtG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bfe299c-7873-4fab-b507-18dcc14ea1cc_636x869.png 1272w, https://substackcdn.com/image/fetch/$s_!qEtG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bfe299c-7873-4fab-b507-18dcc14ea1cc_636x869.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!qEtG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bfe299c-7873-4fab-b507-18dcc14ea1cc_636x869.png" width="636" height="869" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2bfe299c-7873-4fab-b507-18dcc14ea1cc_636x869.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:869,&quot;width&quot;:636,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:154773,&quot;alt&quot;:&quot;how do i run a test in the lambda console for this?  ChatGPT To test your Lambda function in the AWS Management Console, follow these steps:  Sign in to the AWS Management Console. Navigate to the AWS Lambda Console. Choose the Lambda function you've created for the location finder script. On the function's configuration page, click the Test button in the upper right corner. A \&quot;Configure test event\&quot; dialog will appear. Since your Lambda function doesn't require any specific input, you can create a new test event with any event template. Select the Hello World template from the \&quot;Event template\&quot; dropdown list. Provide a name for the test event (e.g., \&quot;EmptyEvent\&quot;) and click Create. With the new test event selected, click the Test button again to run the Lambda function with the test event as input. After the Lambda function executes, the \&quot;Execution result\&quot; panel will appear below the function code, displaying the result, including the response, request ID, and other information. Since your Lambda function doesn't rely on the input event, the test event's content doesn't matter. It will still execute the function and return the latitude, longitude, timezone, and city name of a location where it's currently between 5 PM and 5:59 PM local time.&quot;,&quot;title&quot;:&quot;how do i run a test in the lambda console for this?  ChatGPT To test your Lambda function in the AWS Management Console, follow these steps:  Sign in to the AWS Management Console. Navigate to the AWS Lambda Console. Choose the Lambda function you've created for the location finder script. On the function's configuration page, click the Test button in the upper right corner. A \&quot;Configure test event\&quot; dialog will appear. Since your Lambda function doesn't require any specific input, you can create a new test event with any event template. Select the Hello World template from the \&quot;Event template\&quot; dropdown list. Provide a name for the test event (e.g., \&quot;EmptyEvent\&quot;) and click Create. With the new test event selected, click the Test button again to run the Lambda function with the test event as input. After the Lambda function executes, the \&quot;Execution result\&quot; panel will appear below the function code, displaying the result, including the response, request ID, and other information. Since your Lambda function doesn't rely on the input event, the test event's content doesn't matter. It will still execute the function and return the latitude, longitude, timezone, and city name of a location where it's currently between 5 PM and 5:59 PM local time.&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="how do i run a test in the lambda console for this?  ChatGPT To test your Lambda function in the AWS Management Console, follow these steps:  Sign in to the AWS Management Console. Navigate to the AWS Lambda Console. Choose the Lambda function you've created for the location finder script. On the function's configuration page, click the Test button in the upper right corner. A &quot;Configure test event&quot; dialog will appear. Since your Lambda function doesn't require any specific input, you can create a new test event with any event template. Select the Hello World template from the &quot;Event template&quot; dropdown list. Provide a name for the test event (e.g., &quot;EmptyEvent&quot;) and click Create. With the new test event selected, click the Test button again to run the Lambda function with the test event as input. After the Lambda function executes, the &quot;Execution result&quot; panel will appear below the function code, displaying the result, including the response, request ID, and other information. Since your Lambda function doesn't rely on the input event, the test event's content doesn't matter. It will still execute the function and return the latitude, longitude, timezone, and city name of a location where it's currently between 5 PM and 5:59 PM local time." title="how do i run a test in the lambda console for this?  ChatGPT To test your Lambda function in the AWS Management Console, follow these steps:  Sign in to the AWS Management Console. Navigate to the AWS Lambda Console. Choose the Lambda function you've created for the location finder script. On the function's configuration page, click the Test button in the upper right corner. A &quot;Configure test event&quot; dialog will appear. Since your Lambda function doesn't require any specific input, you can create a new test event with any event template. Select the Hello World template from the &quot;Event template&quot; dropdown list. Provide a name for the test event (e.g., &quot;EmptyEvent&quot;) and click Create. With the new test event selected, click the Test button again to run the Lambda function with the test event as input. After the Lambda function executes, the &quot;Execution result&quot; panel will appear below the function code, displaying the result, including the response, request ID, and other information. Since your Lambda function doesn't rely on the input event, the test event's content doesn't matter. It will still execute the function and return the latitude, longitude, timezone, and city name of a location where it's currently between 5 PM and 5:59 PM local time." srcset="https://substackcdn.com/image/fetch/$s_!qEtG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bfe299c-7873-4fab-b507-18dcc14ea1cc_636x869.png 424w, https://substackcdn.com/image/fetch/$s_!qEtG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bfe299c-7873-4fab-b507-18dcc14ea1cc_636x869.png 848w, https://substackcdn.com/image/fetch/$s_!qEtG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bfe299c-7873-4fab-b507-18dcc14ea1cc_636x869.png 1272w, https://substackcdn.com/image/fetch/$s_!qEtG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bfe299c-7873-4fab-b507-18dcc14ea1cc_636x869.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h2>Fixing the first error</h2><p>Remember - <strong>I can&#8217;t test this code, </strong>yet, I know it's wrong. I just told you it's wrong too - but I must push on since I need to give ChatGPT the error the code generates and allow it to make changes. </p><p>I quickly get an error - after those initial questions we have the following code for the inaugural lambda function:</p><pre><code><code>import datetime
import pytz
from geopy.geocoders import Nominatim
import json

def get_location_with_time_between_5_and_6():
    geolocator = Nominatim(user_agent="myGeocoder")

    current_utc_time = datetime.datetime.utcnow()
    for tz in pytz.all_timezones:
        try:
            local_time = current_utc_time.astimezone(pytz.timezone(tz))
            if local_time.hour == 17:  # Check if the local time is between 5 PM and 5:59 PM
                location = geolocator.timezone(tz)
                city_info = geolocator.reverse((location.latitude, location.longitude), language='en')
                city = city_info.raw.get('address', {}).get('city', '')
                return {
                    "latitude": location.latitude,
                    "longitude": location.longitude,
                    "timezone": tz,
                    "city": city
                }
        except Exception as e:
            pass

    return None

def lambda_handler(event, context):
    location_data = get_location_with_time_between_5_and_6()

    if location_data:
        response_body = {
            "latitude": location_data["latitude"],
            "longitude": location_data["longitude"],
            "timezone": location_data["timezone"],
            "city": location_data["city"],
        }
        status_code = 200
    else:
        response_body = {"error": "No location found where the time is between 5 PM and 5:59 PM."}
        status_code = 404

    return {
        "statusCode": status_code,
        "headers": {"Content-Type": "application/json"},
        "body": json.dumps(response_body),
    }
</code></code></pre><p>Finally something I can pass back to Chat GPT to iterate on - I passed the error into the prompt and the soon to be <em>classic</em> response &#8220;My apologies for the confusion&#8230;&#8221;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!N8nB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Febab620a-95e8-46b8-9e89-8982b2dcd189_641x1166.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!N8nB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Febab620a-95e8-46b8-9e89-8982b2dcd189_641x1166.png 424w, https://substackcdn.com/image/fetch/$s_!N8nB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Febab620a-95e8-46b8-9e89-8982b2dcd189_641x1166.png 848w, https://substackcdn.com/image/fetch/$s_!N8nB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Febab620a-95e8-46b8-9e89-8982b2dcd189_641x1166.png 1272w, https://substackcdn.com/image/fetch/$s_!N8nB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Febab620a-95e8-46b8-9e89-8982b2dcd189_641x1166.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!N8nB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Febab620a-95e8-46b8-9e89-8982b2dcd189_641x1166.png" width="641" height="1166" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ebab620a-95e8-46b8-9e89-8982b2dcd189_641x1166.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1166,&quot;width&quot;:641,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:182773,&quot;alt&quot;:&quot;I got this error:  Test Event Name test  Response {   \&quot;errorMessage\&quot;: \&quot;get_location_with_time_between_5_and_6() takes 0 positional arguments but 2 were given\&quot;,   \&quot;errorType\&quot;: \&quot;TypeError\&quot;,   \&quot;requestId\&quot;: \&quot;3bc1f15a-5ba9-47ed-8e4a-63b4ae410d90\&quot;,   \&quot;stackTrace\&quot;: [     \&quot;  File \\\&quot;/var/runtime/awslambdaric/bootstrap.py\\\&quot;, line 149, in handle_event_request\\n    response = request_handler(event, lambda_context)\\n\&quot;   ] }  ChatGPT My apologies for the confusion. The error occurred because the Lambda function expects the lambda_handler to accept two arguments, event and context. However, the get_location_with_time_between_5_and_6() function was defined to take no arguments. I mistakenly used the get_location_with_time_between_5_and_6() function as the handler in my previous responses.  Please update the Lambda function's handler in the AWS Lambda Console to find_location.lambda_handler. This should resolve the error.  To update the handler, follow these steps:  Sign in to the AWS Management Console. Navigate to the AWS Lambda Console. Choose the Lambda function you've created for the location finder script. In the \&quot;Function code\&quot; panel, find the \&quot;Handler\&quot; input field. Update the handler value to find_location.lambda_handler. Click the Deploy button in the upper right corner to save the changes. Now, you can re-run the test in the Lambda console, and it should work without any issues.&quot;,&quot;title&quot;:&quot;I got this error:  Test Event Name test  Response {   \&quot;errorMessage\&quot;: \&quot;get_location_with_time_between_5_and_6() takes 0 positional arguments but 2 were given\&quot;,   \&quot;errorType\&quot;: \&quot;TypeError\&quot;,   \&quot;requestId\&quot;: \&quot;3bc1f15a-5ba9-47ed-8e4a-63b4ae410d90\&quot;,   \&quot;stackTrace\&quot;: [     \&quot;  File \\\&quot;/var/runtime/awslambdaric/bootstrap.py\\\&quot;, line 149, in handle_event_request\\n    response = request_handler(event, lambda_context)\\n\&quot;   ] }  ChatGPT My apologies for the confusion. The error occurred because the Lambda function expects the lambda_handler to accept two arguments, event and context. However, the get_location_with_time_between_5_and_6() function was defined to take no arguments. I mistakenly used the get_location_with_time_between_5_and_6() function as the handler in my previous responses.  Please update the Lambda function's handler in the AWS Lambda Console to find_location.lambda_handler. This should resolve the error.  To update the handler, follow these steps:  Sign in to the AWS Management Console. Navigate to the AWS Lambda Console. Choose the Lambda function you've created for the location finder script. In the \&quot;Function code\&quot; panel, find the \&quot;Handler\&quot; input field. Update the handler value to find_location.lambda_handler. Click the Deploy button in the upper right corner to save the changes. Now, you can re-run the test in the Lambda console, and it should work without any issues.&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="I got this error:  Test Event Name test  Response {   &quot;errorMessage&quot;: &quot;get_location_with_time_between_5_and_6() takes 0 positional arguments but 2 were given&quot;,   &quot;errorType&quot;: &quot;TypeError&quot;,   &quot;requestId&quot;: &quot;3bc1f15a-5ba9-47ed-8e4a-63b4ae410d90&quot;,   &quot;stackTrace&quot;: [     &quot;  File \&quot;/var/runtime/awslambdaric/bootstrap.py\&quot;, line 149, in handle_event_request\n    response = request_handler(event, lambda_context)\n&quot;   ] }  ChatGPT My apologies for the confusion. The error occurred because the Lambda function expects the lambda_handler to accept two arguments, event and context. However, the get_location_with_time_between_5_and_6() function was defined to take no arguments. I mistakenly used the get_location_with_time_between_5_and_6() function as the handler in my previous responses.  Please update the Lambda function's handler in the AWS Lambda Console to find_location.lambda_handler. This should resolve the error.  To update the handler, follow these steps:  Sign in to the AWS Management Console. Navigate to the AWS Lambda Console. Choose the Lambda function you've created for the location finder script. In the &quot;Function code&quot; panel, find the &quot;Handler&quot; input field. Update the handler value to find_location.lambda_handler. Click the Deploy button in the upper right corner to save the changes. Now, you can re-run the test in the Lambda console, and it should work without any issues." title="I got this error:  Test Event Name test  Response {   &quot;errorMessage&quot;: &quot;get_location_with_time_between_5_and_6() takes 0 positional arguments but 2 were given&quot;,   &quot;errorType&quot;: &quot;TypeError&quot;,   &quot;requestId&quot;: &quot;3bc1f15a-5ba9-47ed-8e4a-63b4ae410d90&quot;,   &quot;stackTrace&quot;: [     &quot;  File \&quot;/var/runtime/awslambdaric/bootstrap.py\&quot;, line 149, in handle_event_request\n    response = request_handler(event, lambda_context)\n&quot;   ] }  ChatGPT My apologies for the confusion. The error occurred because the Lambda function expects the lambda_handler to accept two arguments, event and context. However, the get_location_with_time_between_5_and_6() function was defined to take no arguments. I mistakenly used the get_location_with_time_between_5_and_6() function as the handler in my previous responses.  Please update the Lambda function's handler in the AWS Lambda Console to find_location.lambda_handler. This should resolve the error.  To update the handler, follow these steps:  Sign in to the AWS Management Console. Navigate to the AWS Lambda Console. Choose the Lambda function you've created for the location finder script. In the &quot;Function code&quot; panel, find the &quot;Handler&quot; input field. Update the handler value to find_location.lambda_handler. Click the Deploy button in the upper right corner to save the changes. Now, you can re-run the test in the Lambda console, and it should work without any issues." srcset="https://substackcdn.com/image/fetch/$s_!N8nB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Febab620a-95e8-46b8-9e89-8982b2dcd189_641x1166.png 424w, https://substackcdn.com/image/fetch/$s_!N8nB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Febab620a-95e8-46b8-9e89-8982b2dcd189_641x1166.png 848w, https://substackcdn.com/image/fetch/$s_!N8nB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Febab620a-95e8-46b8-9e89-8982b2dcd189_641x1166.png 1272w, https://substackcdn.com/image/fetch/$s_!N8nB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Febab620a-95e8-46b8-9e89-8982b2dcd189_641x1166.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!pPzp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F997dc4f4-14b1-4301-ac12-f0aa813cc1b8_400x215.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!pPzp!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F997dc4f4-14b1-4301-ac12-f0aa813cc1b8_400x215.gif 424w, https://substackcdn.com/image/fetch/$s_!pPzp!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F997dc4f4-14b1-4301-ac12-f0aa813cc1b8_400x215.gif 848w, https://substackcdn.com/image/fetch/$s_!pPzp!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F997dc4f4-14b1-4301-ac12-f0aa813cc1b8_400x215.gif 1272w, https://substackcdn.com/image/fetch/$s_!pPzp!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F997dc4f4-14b1-4301-ac12-f0aa813cc1b8_400x215.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!pPzp!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F997dc4f4-14b1-4301-ac12-f0aa813cc1b8_400x215.gif" width="498" height="267.675" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/997dc4f4-14b1-4301-ac12-f0aa813cc1b8_400x215.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:215,&quot;width&quot;:400,&quot;resizeWidth&quot;:498,&quot;bytes&quot;:769843,&quot;alt&quot;:&quot;This could be a really long night.&quot;,&quot;title&quot;:&quot;This could be a really long night.&quot;,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="This could be a really long night." title="This could be a really long night." srcset="https://substackcdn.com/image/fetch/$s_!pPzp!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F997dc4f4-14b1-4301-ac12-f0aa813cc1b8_400x215.gif 424w, https://substackcdn.com/image/fetch/$s_!pPzp!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F997dc4f4-14b1-4301-ac12-f0aa813cc1b8_400x215.gif 848w, https://substackcdn.com/image/fetch/$s_!pPzp!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F997dc4f4-14b1-4301-ac12-f0aa813cc1b8_400x215.gif 1272w, https://substackcdn.com/image/fetch/$s_!pPzp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F997dc4f4-14b1-4301-ac12-f0aa813cc1b8_400x215.gif 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">The Santa Clause (1993)</figcaption></figure></div><p>If you&#8217;re familiar with Lambda, you know that the<code> lambda_handler</code> function looks like this in python:</p><pre><code><code>def lambda_handler(event, context):</code></code></pre><p>It has been shown the door. </p><p>In its place, we're charting a less-traveled path - defining a custom lambda handler function name.</p><p>This decision, while it certainly dials up the complexity quotient, might seem like an exercise in <strong>masochism</strong>. Especially when we're <strong>also keeping a function named 'lambda_handler'</strong> in the code and not using it as the lambda handler, setting up a <em><strong>veritable obstacle course for future readability.</strong></em> </p><p>But sometimes, in the pursuit of innovation, conventional wisdom is tossed to the wind, and we are made to navigate the <strong><a href="https://www.merriam-webster.com/dictionary/labyrinthine">labyrinthine</a></strong> <s>I hope you&#8217;re studying for the SAT</s> intricacies of code. This is one of those times?</p><p></p><p>I update the lambda function to use the <code>find_location.lambda_handler</code>, as <s>poorly</s> prescribed, and move on.</p><p></p><p>Now, with two 'lambda_handlers' we push ahead. Changing gears, I contemplate simplifying our function. I've planned on using a DynamoDB table to store the list of cities and timezones, but the data source is still unclear. Instead of the DynamoDB table, could a Python library be the answer? I just need latitude, longitude, name, and timezone. Let's delve into Python's rich ecosystem and see if it already has what we need.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!q5Zh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd6d8696-fe45-4429-8d9a-776300a1c8ac_641x1672.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!q5Zh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd6d8696-fe45-4429-8d9a-776300a1c8ac_641x1672.png 424w, https://substackcdn.com/image/fetch/$s_!q5Zh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd6d8696-fe45-4429-8d9a-776300a1c8ac_641x1672.png 848w, https://substackcdn.com/image/fetch/$s_!q5Zh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd6d8696-fe45-4429-8d9a-776300a1c8ac_641x1672.png 1272w, https://substackcdn.com/image/fetch/$s_!q5Zh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd6d8696-fe45-4429-8d9a-776300a1c8ac_641x1672.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!q5Zh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd6d8696-fe45-4429-8d9a-776300a1c8ac_641x1672.png" width="641" height="1672" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bd6d8696-fe45-4429-8d9a-776300a1c8ac_641x1672.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1672,&quot;width&quot;:641,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:225135,&quot;alt&quot;:&quot;is there a python library that has a huge list of cities and which timezones they are in?  ChatGPT  2 / 2  Yes, there's a Python library called timezonefinder that allows you to find the timezone for     User how do i do the reverse? I want to know a list of cities in a timezone  ChatGPT To get a list of cities in a specific timezone, you can use the cities package. First, you need to install it:  bash Copy code pip install cities Then, you can use the following code to get a list of cities in a specific timezone:  python Copy code from cities import data import pytz  def get_cities_in_timezone(target_timezone):     cities_in_timezone = []      for city_id, city_data in data.CITIES.items():         city_timezone = city_data.get('timezone')         if city_timezone == target_timezone:             city_name = city_data.get('name')             cities_in_timezone.append(city_name)      return cities_in_timezone  if __name__ == \&quot;__main__\&quot;:     timezone = \&quot;America/New_York\&quot;     cities_list = get_cities_in_timezone(timezone)     print(f\&quot;Cities in {timezone}:\&quot;)     for city in cities_list:         print(city) In this example, the get_cities_in_timezone function takes a target timezone as an argument and returns a list of cities in that timezone. The cities package provides a dictionary of cities and their related information, including the timezone.  Please note that the cities package might not have a comprehensive list of all cities in a timezone, but it should cover most major cities. If you require more exhaustive city data, you can consider using the GeoNames database, which provides extensive geographical data, including city names and timezones. You can download the database, parse it, and filter the results based on the timezone.&quot;,&quot;title&quot;:&quot;is there a python library that has a huge list of cities and which timezones they are in?  ChatGPT  2 / 2  Yes, there's a Python library called timezonefinder that allows you to find the timezone for     User how do i do the reverse? I want to know a list of cities in a timezone  ChatGPT To get a list of cities in a specific timezone, you can use the cities package. First, you need to install it:  bash Copy code pip install cities Then, you can use the following code to get a list of cities in a specific timezone:  python Copy code from cities import data import pytz  def get_cities_in_timezone(target_timezone):     cities_in_timezone = []      for city_id, city_data in data.CITIES.items():         city_timezone = city_data.get('timezone')         if city_timezone == target_timezone:             city_name = city_data.get('name')             cities_in_timezone.append(city_name)      return cities_in_timezone  if __name__ == \&quot;__main__\&quot;:     timezone = \&quot;America/New_York\&quot;     cities_list = get_cities_in_timezone(timezone)     print(f\&quot;Cities in {timezone}:\&quot;)     for city in cities_list:         print(city) In this example, the get_cities_in_timezone function takes a target timezone as an argument and returns a list of cities in that timezone. The cities package provides a dictionary of cities and their related information, including the timezone.  Please note that the cities package might not have a comprehensive list of all cities in a timezone, but it should cover most major cities. If you require more exhaustive city data, you can consider using the GeoNames database, which provides extensive geographical data, including city names and timezones. You can download the database, parse it, and filter the results based on the timezone.&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="is there a python library that has a huge list of cities and which timezones they are in?  ChatGPT  2 / 2  Yes, there's a Python library called timezonefinder that allows you to find the timezone for     User how do i do the reverse? I want to know a list of cities in a timezone  ChatGPT To get a list of cities in a specific timezone, you can use the cities package. First, you need to install it:  bash Copy code pip install cities Then, you can use the following code to get a list of cities in a specific timezone:  python Copy code from cities import data import pytz  def get_cities_in_timezone(target_timezone):     cities_in_timezone = []      for city_id, city_data in data.CITIES.items():         city_timezone = city_data.get('timezone')         if city_timezone == target_timezone:             city_name = city_data.get('name')             cities_in_timezone.append(city_name)      return cities_in_timezone  if __name__ == &quot;__main__&quot;:     timezone = &quot;America/New_York&quot;     cities_list = get_cities_in_timezone(timezone)     print(f&quot;Cities in {timezone}:&quot;)     for city in cities_list:         print(city) In this example, the get_cities_in_timezone function takes a target timezone as an argument and returns a list of cities in that timezone. The cities package provides a dictionary of cities and their related information, including the timezone.  Please note that the cities package might not have a comprehensive list of all cities in a timezone, but it should cover most major cities. If you require more exhaustive city data, you can consider using the GeoNames database, which provides extensive geographical data, including city names and timezones. You can download the database, parse it, and filter the results based on the timezone." title="is there a python library that has a huge list of cities and which timezones they are in?  ChatGPT  2 / 2  Yes, there's a Python library called timezonefinder that allows you to find the timezone for     User how do i do the reverse? I want to know a list of cities in a timezone  ChatGPT To get a list of cities in a specific timezone, you can use the cities package. First, you need to install it:  bash Copy code pip install cities Then, you can use the following code to get a list of cities in a specific timezone:  python Copy code from cities import data import pytz  def get_cities_in_timezone(target_timezone):     cities_in_timezone = []      for city_id, city_data in data.CITIES.items():         city_timezone = city_data.get('timezone')         if city_timezone == target_timezone:             city_name = city_data.get('name')             cities_in_timezone.append(city_name)      return cities_in_timezone  if __name__ == &quot;__main__&quot;:     timezone = &quot;America/New_York&quot;     cities_list = get_cities_in_timezone(timezone)     print(f&quot;Cities in {timezone}:&quot;)     for city in cities_list:         print(city) In this example, the get_cities_in_timezone function takes a target timezone as an argument and returns a list of cities in that timezone. The cities package provides a dictionary of cities and their related information, including the timezone.  Please note that the cities package might not have a comprehensive list of all cities in a timezone, but it should cover most major cities. If you require more exhaustive city data, you can consider using the GeoNames database, which provides extensive geographical data, including city names and timezones. You can download the database, parse it, and filter the results based on the timezone." srcset="https://substackcdn.com/image/fetch/$s_!q5Zh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd6d8696-fe45-4429-8d9a-776300a1c8ac_641x1672.png 424w, https://substackcdn.com/image/fetch/$s_!q5Zh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd6d8696-fe45-4429-8d9a-776300a1c8ac_641x1672.png 848w, https://substackcdn.com/image/fetch/$s_!q5Zh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd6d8696-fe45-4429-8d9a-776300a1c8ac_641x1672.png 1272w, https://substackcdn.com/image/fetch/$s_!q5Zh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd6d8696-fe45-4429-8d9a-776300a1c8ac_641x1672.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>My lucky day. A pre-built library that does exactly what I need. I&#8217;m overjoyed with enthusiasm as I have GPT-4 update my lambda to use this newly discovered library. <s>Why hadn&#8217;t it been suggested to me previously? </s></p><p>In this example, the <code>get_cities_in_timezone</code> function takes a target timezone as an argument and returns a list of cities in that timezone. The <code>cities</code> package provides a dictionary of cities and their related information, including the timezone.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!HDrh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29d6f1dc-513b-456e-8a09-4bf1bef07914_639x275.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!HDrh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29d6f1dc-513b-456e-8a09-4bf1bef07914_639x275.png 424w, https://substackcdn.com/image/fetch/$s_!HDrh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29d6f1dc-513b-456e-8a09-4bf1bef07914_639x275.png 848w, https://substackcdn.com/image/fetch/$s_!HDrh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29d6f1dc-513b-456e-8a09-4bf1bef07914_639x275.png 1272w, https://substackcdn.com/image/fetch/$s_!HDrh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29d6f1dc-513b-456e-8a09-4bf1bef07914_639x275.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!HDrh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29d6f1dc-513b-456e-8a09-4bf1bef07914_639x275.png" width="639" height="275" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/29d6f1dc-513b-456e-8a09-4bf1bef07914_639x275.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:275,&quot;width&quot;:639,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:46482,&quot;alt&quot;:&quot;now have it randomly select a single city from that list and return the latitude and longitude of the selected city, as well as the timezone and city name  ChatGPT To randomly select a single city from the list and return the latitude and longitude of the selected city along with the timezone and city name, you can update the find_location.py script as follows:&quot;,&quot;title&quot;:&quot;now have it randomly select a single city from that list and return the latitude and longitude of the selected city, as well as the timezone and city name  ChatGPT To randomly select a single city from the list and return the latitude and longitude of the selected city along with the timezone and city name, you can update the find_location.py script as follows:&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="now have it randomly select a single city from that list and return the latitude and longitude of the selected city, as well as the timezone and city name  ChatGPT To randomly select a single city from the list and return the latitude and longitude of the selected city along with the timezone and city name, you can update the find_location.py script as follows:" title="now have it randomly select a single city from that list and return the latitude and longitude of the selected city, as well as the timezone and city name  ChatGPT To randomly select a single city from the list and return the latitude and longitude of the selected city along with the timezone and city name, you can update the find_location.py script as follows:" srcset="https://substackcdn.com/image/fetch/$s_!HDrh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29d6f1dc-513b-456e-8a09-4bf1bef07914_639x275.png 424w, https://substackcdn.com/image/fetch/$s_!HDrh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29d6f1dc-513b-456e-8a09-4bf1bef07914_639x275.png 848w, https://substackcdn.com/image/fetch/$s_!HDrh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29d6f1dc-513b-456e-8a09-4bf1bef07914_639x275.png 1272w, https://substackcdn.com/image/fetch/$s_!HDrh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29d6f1dc-513b-456e-8a09-4bf1bef07914_639x275.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>I have it update the script to randomly select a city from the list and also return the longitude and latitude.</p><p>Another much longer function emerges. I test for the second time.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CBN_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F98a3a256-0787-411f-af24-c17c93d47058_628x455.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CBN_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F98a3a256-0787-411f-af24-c17c93d47058_628x455.png 424w, https://substackcdn.com/image/fetch/$s_!CBN_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F98a3a256-0787-411f-af24-c17c93d47058_628x455.png 848w, https://substackcdn.com/image/fetch/$s_!CBN_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F98a3a256-0787-411f-af24-c17c93d47058_628x455.png 1272w, https://substackcdn.com/image/fetch/$s_!CBN_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F98a3a256-0787-411f-af24-c17c93d47058_628x455.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CBN_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F98a3a256-0787-411f-af24-c17c93d47058_628x455.png" width="628" height="455" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/98a3a256-0787-411f-af24-c17c93d47058_628x455.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:455,&quot;width&quot;:628,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:78721,&quot;alt&quot;:&quot;i got this error \&quot;{   \&quot;errorMessage\&quot;: \&quot;Unable to import module 'find_location': No module named 'cities'\&quot;,   \&quot;errorType\&quot;: \&quot;Runtime.ImportModuleError\&quot;,   \&quot;requestId\&quot;: \&quot;216b6ced-11a7-4686-b158-54bb7d1e25f7\&quot;,   \&quot;stackTrace\&quot;: [] }\&quot;  ChatGPT I apologize for the confusion. It seems that the cities package is not compatible with AWS Lambda. Instead, you can use the citytimezones package, which contains timezone information for major cities worldwide.  First, replace the cities package with citytimezones in your Python script. Update your find_location.py script as follows:&quot;,&quot;title&quot;:&quot;i got this error \&quot;{   \&quot;errorMessage\&quot;: \&quot;Unable to import module 'find_location': No module named 'cities'\&quot;,   \&quot;errorType\&quot;: \&quot;Runtime.ImportModuleError\&quot;,   \&quot;requestId\&quot;: \&quot;216b6ced-11a7-4686-b158-54bb7d1e25f7\&quot;,   \&quot;stackTrace\&quot;: [] }\&quot;  ChatGPT I apologize for the confusion. It seems that the cities package is not compatible with AWS Lambda. Instead, you can use the citytimezones package, which contains timezone information for major cities worldwide.  First, replace the cities package with citytimezones in your Python script. Update your find_location.py script as follows:&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="i got this error &quot;{   &quot;errorMessage&quot;: &quot;Unable to import module 'find_location': No module named 'cities'&quot;,   &quot;errorType&quot;: &quot;Runtime.ImportModuleError&quot;,   &quot;requestId&quot;: &quot;216b6ced-11a7-4686-b158-54bb7d1e25f7&quot;,   &quot;stackTrace&quot;: [] }&quot;  ChatGPT I apologize for the confusion. It seems that the cities package is not compatible with AWS Lambda. Instead, you can use the citytimezones package, which contains timezone information for major cities worldwide.  First, replace the cities package with citytimezones in your Python script. Update your find_location.py script as follows:" title="i got this error &quot;{   &quot;errorMessage&quot;: &quot;Unable to import module 'find_location': No module named 'cities'&quot;,   &quot;errorType&quot;: &quot;Runtime.ImportModuleError&quot;,   &quot;requestId&quot;: &quot;216b6ced-11a7-4686-b158-54bb7d1e25f7&quot;,   &quot;stackTrace&quot;: [] }&quot;  ChatGPT I apologize for the confusion. It seems that the cities package is not compatible with AWS Lambda. Instead, you can use the citytimezones package, which contains timezone information for major cities worldwide.  First, replace the cities package with citytimezones in your Python script. Update your find_location.py script as follows:" srcset="https://substackcdn.com/image/fetch/$s_!CBN_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F98a3a256-0787-411f-af24-c17c93d47058_628x455.png 424w, https://substackcdn.com/image/fetch/$s_!CBN_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F98a3a256-0787-411f-af24-c17c93d47058_628x455.png 848w, https://substackcdn.com/image/fetch/$s_!CBN_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F98a3a256-0787-411f-af24-c17c93d47058_628x455.png 1272w, https://substackcdn.com/image/fetch/$s_!CBN_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F98a3a256-0787-411f-af24-c17c93d47058_628x455.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>My test can&#8217;t find the <code>cities</code> module. ChatGPT claims that I&#8217;m facing <strong>compatibility</strong> issues between a Python package and Lambda? </p><p>That's unusual. </p><p>I've also spared you from reading <s>quite</s> a few interactions in which GPT-4 assisted me in packaging a zip file for Lambda deployment. It guided me through creating a virtual environment and installing a few packages - <code>pytz</code>, <code>cities</code>, and <code>geopy</code>. </p><p><s>Even with the best tools at our disposal,</s> We still encounter stumbling blocks. It's all part of the journey, reminding us that problem-solving is an integral part of any coding expedition - being human or AI for that matter. <br><br>I&#8217;m pretty sure the problem is that there is no such thing as <code>cities</code> or <code>citytimezones</code> packages - <s>but I&#8217;m not allowed to say that.</s>  </p><h2>I break my first rule and strike gold</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!S78f!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c3bed0a-97f4-489c-b61d-7c9e4c1a7619_645x441.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!S78f!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c3bed0a-97f4-489c-b61d-7c9e4c1a7619_645x441.png 424w, https://substackcdn.com/image/fetch/$s_!S78f!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c3bed0a-97f4-489c-b61d-7c9e4c1a7619_645x441.png 848w, https://substackcdn.com/image/fetch/$s_!S78f!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c3bed0a-97f4-489c-b61d-7c9e4c1a7619_645x441.png 1272w, https://substackcdn.com/image/fetch/$s_!S78f!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c3bed0a-97f4-489c-b61d-7c9e4c1a7619_645x441.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!S78f!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c3bed0a-97f4-489c-b61d-7c9e4c1a7619_645x441.png" width="645" height="441" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6c3bed0a-97f4-489c-b61d-7c9e4c1a7619_645x441.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:441,&quot;width&quot;:645,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:75284,&quot;alt&quot;:&quot;i don't think there is a package in python called \&quot;citytimezones\&quot;  ChatGPT I apologize for the confusion, and you're right. There isn't a package called citytimezones. My mistake.  An alternative solution is to use the GeoNames database. It provides a file containing cities and their timezones. You can download the cities1000.zip file from here, which contains cities with a population of 1,000 or more. Unzip the file to obtain cities1000.txt.  Next, create a Python script to parse the file and generate a JSON file with city names, timezones, and coordinates. Name the script parse_geonames.py:&quot;,&quot;title&quot;:&quot;i don't think there is a package in python called \&quot;citytimezones\&quot;  ChatGPT I apologize for the confusion, and you're right. There isn't a package called citytimezones. My mistake.  An alternative solution is to use the GeoNames database. It provides a file containing cities and their timezones. You can download the cities1000.zip file from here, which contains cities with a population of 1,000 or more. Unzip the file to obtain cities1000.txt.  Next, create a Python script to parse the file and generate a JSON file with city names, timezones, and coordinates. Name the script parse_geonames.py:&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="i don't think there is a package in python called &quot;citytimezones&quot;  ChatGPT I apologize for the confusion, and you're right. There isn't a package called citytimezones. My mistake.  An alternative solution is to use the GeoNames database. It provides a file containing cities and their timezones. You can download the cities1000.zip file from here, which contains cities with a population of 1,000 or more. Unzip the file to obtain cities1000.txt.  Next, create a Python script to parse the file and generate a JSON file with city names, timezones, and coordinates. Name the script parse_geonames.py:" title="i don't think there is a package in python called &quot;citytimezones&quot;  ChatGPT I apologize for the confusion, and you're right. There isn't a package called citytimezones. My mistake.  An alternative solution is to use the GeoNames database. It provides a file containing cities and their timezones. You can download the cities1000.zip file from here, which contains cities with a population of 1,000 or more. Unzip the file to obtain cities1000.txt.  Next, create a Python script to parse the file and generate a JSON file with city names, timezones, and coordinates. Name the script parse_geonames.py:" srcset="https://substackcdn.com/image/fetch/$s_!S78f!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c3bed0a-97f4-489c-b61d-7c9e4c1a7619_645x441.png 424w, https://substackcdn.com/image/fetch/$s_!S78f!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c3bed0a-97f4-489c-b61d-7c9e4c1a7619_645x441.png 848w, https://substackcdn.com/image/fetch/$s_!S78f!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c3bed0a-97f4-489c-b61d-7c9e4c1a7619_645x441.png 1272w, https://substackcdn.com/image/fetch/$s_!S78f!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c3bed0a-97f4-489c-b61d-7c9e4c1a7619_645x441.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>I had to break the rule. </p><p>I was stuck for at least 30 min and could not discover a way forward here without being suggestive. I hated doing this, but I <s>needed</s> wanted progress.</p><p>Instead ChatGPT suggests that we use the GeoNames Database! They curate lists of cities and timezones! </p><p>I check and the<a href="http://geonames.org"> GeoNames Database</a> is real! The provided URL works and this dataset has exactly what I need. </p><p><br>What&#8217;s more is that the output of the script <code>parse_geoname.py</code> is actually pretty good - <em>Spoiler alert: by the end of the project I&#8217;m still using some of this code.</em></p><p>GPT-4 then suggests that I update my code for the lambda to use the resulting json file and query it.  After 3 errors it starts returning something; although its slow (due to locally processing a rather large json file, but I&#8217;m not supposed to know this) typically 8-10 seconds to get an answer. I ask it how I can understand which parts are slow. It suggests I print the time it takes after each section to discover this from the logs:</p><pre><code><code>print(f"Time taken to load cities: {time.time() - start_time:.2f} seconds")</code></code></pre><p><strong>I&#8217;m going to speed this part up a bit as there are a lot of prompts, back and forth&#8217;s and otherwise boring <s>yet helpful</s> interactions</strong>, over the course of this project I asked <em><strong>443</strong> <strong>questions</strong> in this chat alone</em>! There&#8217;s not enough time and let&#8217;s be honest, you&#8217;re not interested enough to read all of those messages (if you are a paid subscriber you can read the whole chat log in the paid content section at the end of this post.)</p><ul><li><p>I ask if an AWS service can do this instead of time</p><ul><li><p>Suggests X-Ray</p></li></ul></li><li><p>I ask to implement X-Ray</p><ul><li><p>Implements X-Ray in the lambda</p></li></ul></li><li><p>I give it the logs from x-ray and CodeGuru Profile (which it implemented too)</p><ul><li><p>It determines which areas in the functions take the longest (but outputs fictitious times)</p></li></ul></li><li><p>I ask if I can use DynamoDB to store the json instead - <em>There I go again breaking the rules</em></p><ul><li><p>Yes you can</p></li></ul></li><li><p>Write a script that can do that</p><ul><li><p>Outputs Script !! using a Lambda Function!</p></li><li><p>Script uses Provisioned Capacity <em>(more expensive than I&#8217;m willing to tolerate for a test so I ask it to use </em><code>PAY_PER_REQUEST</code>,<em> I know, I know, I&#8217;m bad)</em></p></li><li><p>The Lambda function takes 10 minutes to run at the largest Lambda Size &#129397;</p></li></ul></li><li><p>8 different questions about why the table isn&#8217;t populating</p><ul><li><p>7 different wrong answers</p></li><li><p>&#8220;stop using floats&#8221; - ChatGPT - this works.</p></li></ul></li><li><p>2 questions about failed hydration</p><ul><li><p>track duplicate cities (there are none &#128521; but I decide not to tell it this)</p></li></ul></li><li><p>22 questions to update the Lambda to use the DynamoDB table instead of the json file</p><ul><li><p>working now!</p></li></ul></li></ul><p>I remind it another <strong>10 times</strong> I don&#8217;t want provisioned capacity and we have to fix the float issue again and again until it works (it kept either reverting the code or not implementing strings in the right places). And it&#8217;s still slow, maybe 10seconds? (Its slow because we&#8217;re doing table scans instead of using a GSI in our DynamoDB table)</p><p>Here is the code for the lambda at this stage:</p><pre><code><code>def lambda_handler(event, context):
    all_timezones = pytz.all_timezones

    five_pm_timezones = [
        timezone for timezone in all_timezones
        if 17 &lt;= datetime.now(pytz.timezone(timezone)).hour &lt; 18
    ]

    random_timezone = random.choice(five_pm_timezones)

    try:
        response = table.scan(
            FilterExpression=Key('timezone').eq(random_timezone)
        )
    except ClientError as e:
        print(e.response['Error']['Message'])
        return {
            'statusCode': 500,
            'body': 'An error occurred while fetching data from DynamoDB.'
        }

    if not response['Items']:
        return {
            'statusCode': 404,
            'body': f'No cities found in timezone: {random_timezone}'
        }

    random_city = random.choice(response['Items'])

    local_time = datetime.now(pytz.timezone(random_city['timezone'])).strftime('%Y-%m-%d %H:%M:%S')

    return {
        'statusCode': 200,
        'body': {
            'city': random_city['city_name'],
            'local_time': local_time,
            'latitude': random_city['latitude'],
            'longitude': random_city['longitude'],
            'timezone': random_city['timezone']
        }
    }
</code></code></pre><h2>Here's a step-by-step explanation of what it does:</h2><ol><li><p><strong>Initialize </strong><code>all_timezones</code><strong>:</strong> It takes all the time zones available through the <code>pytz</code> library and stores them in the <code>all_timezones</code> list.</p><pre><code>all_timezones = pytz.all_timezones</code></pre></li><li><p><strong>Find 5 PM Timezones:</strong> It filters <code>all_timezones</code> to create a new list, <code>five_pm_timezones</code>, containing only the timezones where the current local time is between 5 PM and 6 PM.</p><pre><code>five_pm_timezones = [
    timezone for timezone in all_timezones
    if 17 &lt;= datetime.now(pytz.timezone(timezone)).hour &lt; 18
]
</code></pre></li><li><p><strong>Random Timezone Selection:</strong> It randomly selects one timezone from <code>five_pm_timezones</code>.</p><pre><code>random_timezone = random.choice(five_pm_timezones)</code></pre></li><li><p><strong>Query DynamoDB:</strong> It queries an AWS DynamoDB table using the <code>table.scan</code> method, filtering records where the 'timezone' key matches the <code>random_timezone</code>.</p></li></ol><pre><code><code>try:
    response = table.scan(
        FilterExpression=Key('timezone').eq(random_timezone)
    )
except ClientError as e:
    # Error handling for DynamoDB client error
</code></code></pre><ol start="5"><li><p><strong>Handle Errors:</strong> If there is a client error with DynamoDB, it prints the error message and returns a response with status code 500.</p></li><li><p><strong>Check Response:</strong> It checks if the query returned any items (<code>response['Items']</code>). If not, it returns a response with status code 404 and a message saying no cities were found in the <code>random_timezone</code>.</p></li></ol><pre><code>if not response['Items']:
    return {
        'statusCode': 404,
        'body': f'No cities found in timezone: {random_timezone}'
    }</code></pre><ol start="7"><li><p><strong>Random City Selection:</strong> If there are cities found in the <code>random_timezone</code>, it randomly picks one.</p></li></ol><pre><code>random_city = random.choice(response['Items'])</code></pre><ol start="8"><li><p><strong>Local Time:</strong> It finds the local time in the timezone of the randomly picked city and formats it.</p></li></ol><pre><code>local_time = datetime.now(pytz.timezone(random_city['timezone'])).strftime('%Y-%m-%d %H:%M:%S')</code></pre><ol start="8"><li><p><strong>Return Data:</strong> Finally, it returns the response with status code 200 and the details of the randomly picked city, including its name, local time, latitude, longitude, and timezone.</p><pre><code>return {
    'statusCode': 200,
    'body': {
        'city': random_city['city_name'],
        'local_time': local_time,
        'latitude': random_city['latitude'],
        'longitude': random_city['longitude'],
        'timezone': random_city['timezone']
    }
}</code></pre></li></ol><h2>IT&#8217;S WORKING!</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!g8_O!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ec37e20-93e8-42b2-bfb9-0878348d074b_572x357.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!g8_O!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ec37e20-93e8-42b2-bfb9-0878348d074b_572x357.png 424w, https://substackcdn.com/image/fetch/$s_!g8_O!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ec37e20-93e8-42b2-bfb9-0878348d074b_572x357.png 848w, https://substackcdn.com/image/fetch/$s_!g8_O!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ec37e20-93e8-42b2-bfb9-0878348d074b_572x357.png 1272w, https://substackcdn.com/image/fetch/$s_!g8_O!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ec37e20-93e8-42b2-bfb9-0878348d074b_572x357.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!g8_O!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ec37e20-93e8-42b2-bfb9-0878348d074b_572x357.png" width="572" height="357" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6ec37e20-93e8-42b2-bfb9-0878348d074b_572x357.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:357,&quot;width&quot;:572,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:52995,&quot;alt&quot;:&quot;ok the find_location(the one that gives us an output like this {   \&quot;statusCode\&quot;: 200,   \&quot;body\&quot;: {     \&quot;city\&quot;: \&quot;Waitangi\&quot;,     \&quot;local_time\&quot;: \&quot;2023-03-26 17:12:12\&quot;,     \&quot;latitude\&quot;: -43.95353,     \&quot;longitude\&quot;: -176.55973,     \&quot;timezone\&quot;: \&quot;Pacific/Chatham\&quot;   } })  lambda is working well now. I want to put api-gateway infront of the lambda so i can have a static webpage show this information with a map showing the location and the current time there&quot;,&quot;title&quot;:&quot;ok the find_location(the one that gives us an output like this {   \&quot;statusCode\&quot;: 200,   \&quot;body\&quot;: {     \&quot;city\&quot;: \&quot;Waitangi\&quot;,     \&quot;local_time\&quot;: \&quot;2023-03-26 17:12:12\&quot;,     \&quot;latitude\&quot;: -43.95353,     \&quot;longitude\&quot;: -176.55973,     \&quot;timezone\&quot;: \&quot;Pacific/Chatham\&quot;   } })  lambda is working well now. I want to put api-gateway infront of the lambda so i can have a static webpage show this information with a map showing the location and the current time there&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="ok the find_location(the one that gives us an output like this {   &quot;statusCode&quot;: 200,   &quot;body&quot;: {     &quot;city&quot;: &quot;Waitangi&quot;,     &quot;local_time&quot;: &quot;2023-03-26 17:12:12&quot;,     &quot;latitude&quot;: -43.95353,     &quot;longitude&quot;: -176.55973,     &quot;timezone&quot;: &quot;Pacific/Chatham&quot;   } })  lambda is working well now. I want to put api-gateway infront of the lambda so i can have a static webpage show this information with a map showing the location and the current time there" title="ok the find_location(the one that gives us an output like this {   &quot;statusCode&quot;: 200,   &quot;body&quot;: {     &quot;city&quot;: &quot;Waitangi&quot;,     &quot;local_time&quot;: &quot;2023-03-26 17:12:12&quot;,     &quot;latitude&quot;: -43.95353,     &quot;longitude&quot;: -176.55973,     &quot;timezone&quot;: &quot;Pacific/Chatham&quot;   } })  lambda is working well now. I want to put api-gateway infront of the lambda so i can have a static webpage show this information with a map showing the location and the current time there" srcset="https://substackcdn.com/image/fetch/$s_!g8_O!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ec37e20-93e8-42b2-bfb9-0878348d074b_572x357.png 424w, https://substackcdn.com/image/fetch/$s_!g8_O!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ec37e20-93e8-42b2-bfb9-0878348d074b_572x357.png 848w, https://substackcdn.com/image/fetch/$s_!g8_O!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ec37e20-93e8-42b2-bfb9-0878348d074b_572x357.png 1272w, https://substackcdn.com/image/fetch/$s_!g8_O!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ec37e20-93e8-42b2-bfb9-0878348d074b_572x357.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">I broke down and asked for two things at once, the current message cap(25/3hr) is getting to me.</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!IJ9O!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa68b7dca-3bee-47e8-b4b1-fd258156a76c_480x208.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!IJ9O!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa68b7dca-3bee-47e8-b4b1-fd258156a76c_480x208.gif 424w, https://substackcdn.com/image/fetch/$s_!IJ9O!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa68b7dca-3bee-47e8-b4b1-fd258156a76c_480x208.gif 848w, https://substackcdn.com/image/fetch/$s_!IJ9O!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa68b7dca-3bee-47e8-b4b1-fd258156a76c_480x208.gif 1272w, https://substackcdn.com/image/fetch/$s_!IJ9O!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa68b7dca-3bee-47e8-b4b1-fd258156a76c_480x208.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!IJ9O!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa68b7dca-3bee-47e8-b4b1-fd258156a76c_480x208.gif" width="480" height="208" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a68b7dca-3bee-47e8-b4b1-fd258156a76c_480x208.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:208,&quot;width&quot;:480,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2780355,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!IJ9O!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa68b7dca-3bee-47e8-b4b1-fd258156a76c_480x208.gif 424w, https://substackcdn.com/image/fetch/$s_!IJ9O!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa68b7dca-3bee-47e8-b4b1-fd258156a76c_480x208.gif 848w, https://substackcdn.com/image/fetch/$s_!IJ9O!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa68b7dca-3bee-47e8-b4b1-fd258156a76c_480x208.gif 1272w, https://substackcdn.com/image/fetch/$s_!IJ9O!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa68b7dca-3bee-47e8-b4b1-fd258156a76c_480x208.gif 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>We now have a Lambda function, and a DynamoDB instance returning a random place in the world where it is between 5:00 PM and 5:59:59 PM- now to build the first version of the front end and make some IaC.</p><p><em>To get to this point I&#8217;ve only reviewed 1/7 of my chat logs with you.</em></p><p>In the <em>next</em> part I&#8217;ll tackle my MVP and Infrastructure as code. </p><h2><br>Manifest</h2><p><a href="https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-0">Part 0 - Introduction</a><br>Part 1 - Failing Fast (Building with prompts) *<strong>You</strong> are <em>Here</em> &#128129;&#8205;&#9792;&#65039;<br><a href="https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-2">Part 2 - MVP and Deployments</a><br><a href="https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-3">Part 3 - MVPolish</a><br><a href="https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-4">Part 4 - So what.</a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-1?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-1?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.123cloud.st/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.123cloud.st/subscribe?"><span>Subscribe now</span></a></p><p></p><p>I&#8217;m <em>sure</em> you want to see each and every prompt; but there are hundreds if not thousands of prompts and I couldn&#8217;t possibly paste them here&#8230;. oh, ChatGPT has link sharing - as a special offer for paid subscribers, you can access the enthralling conversation below</p>
      <p>
          <a href="https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-1">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[The sun never sets on 5pm - Part 0]]></title><description><![CDATA[My journey in coding an AWS serverless application with only ChatGPT 4 - Using Lambda, DynamoDB, CloudFormation, API-Gateway, S3, IAM, CodeBuild, CodePipeline, CloudFront, and Amazon Location Services]]></description><link>https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-0</link><guid isPermaLink="false">https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-0</guid><dc:creator><![CDATA[Will Laws]]></dc:creator><pubDate>Sat, 21 Oct 2023 03:32:02 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!-KE2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ce404e8-a815-458a-a686-3f2cb918189b.heic" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Finding ourselves nestled in a familiar caf&#233; on a lazy Saturday morning, my wife and I engage in lively chatter about the enticing notion of passive income. It's a concept that, much like our hot coffee on this laid-back weekend, warms us up to a whole world of possibilities.</p><p>We entertain ideas of owning a carwash, then steering an ATM empire, before leaping onto the digital stage - creating a website. As our ideas crystallize, we add constraints: a lightning-quick launch within a weekend, no collection of user data, and a smooth user experience without any pesky logins. And most importantly - drop shipping.</p><p>Our brainstorming produces a flurry of concepts, some whimsical, others borderline genius. </p><p>A humorous calculator that never quite gets it right, with advertisement driven financials. </p><p>A one-click solution for baby-shower registries that could bring relief to countless confused friends and relatives. </p><p>An emergency  haven, "OopsIForgotMothersDay.com", designed for those who have inadvertently let Mother's Day sneak up on them.</p><p><strong>And finally</strong>, we land on the <em>best</em> idea so far: a site that tells you where, at this very moment, it's 5pm. Because no matter where you find yourself, it's comforting to know there's always a place where it's time to kick back and relax.</p><p></p><p>The vision is refreshingly straightforward - a single webpage presenting a map. On this map, an <s>infectious</s> wave of beer emojis will cascade across the screen, infusing an element of lighthearted humor into a <s>predominantly</s> informational site.</p><p>An accompanying section of the page introduces you to each location, courtesy of <s>handpicked</s> automated Wikipedia excerpts. It's a snapshot into the life and culture of the place where it's currently happy hour. You become a virtual globe trotter, one beer emoji at a time.</p><p>Rounding out the features is a slick e-commerce integration, offering branded merchandise. Drop-shipped with minimal fuss and a modest markup, these trinkets and keepsakes add a physical touch to the digital experience, and offer a way to keep the lights on. It's an inviting blend of education, entertainment, and commerce - a small slice of the globe served up on a silver web platter, with a side of fun.</p><p>As we get home from our boozy morning and I disappear into my office, I&#8217;ve got a secret mission for this very real idea. I&#8217;m not going to build it. </p><p>ChatGPT is. &#127871;</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.123cloud.st/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.123cloud.st/subscribe?"><span>Subscribe now</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-0?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-0?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><p>My <s>covert</s> operation emerges from the swirling fog of speculation surrounding Large Language Models (LLMs). The rumors are rife, painted with broad, audacious strokes. </p><p>Will they usurp our jobs? </p><p>Take charge of our taxes? </p><div class="pullquote"><p>&#8220;Will the revered art galleries of tomorrow be crammed with synthetic, prompt-generated artworks, a testament to the idle creativity of teenagers who've harnessed the perfect prompt for their NFT marketplaces, thereby securing a lifetime free from work?&#8221; <strong><br><br></strong>&#8212;<strong>Will Laws</strong></p></div><p>As these whispers continue, my mission is to penetrate the murkiness and discern the true capabilities of these LLMs. More specifically, can I employ one to build a production-quality website with<s>out</s> minimal <s>manual</s> human intervention?</p><p>I'm more than equipped to construct this website without ChatGPT and to make it interesting I'm imposing this self-restraint.</p><p><strong>I am not permitted to suggest answers</strong>. </p><p>Every line of generated code must be executed 'as is', and the inevitable bugs (of which there will be plenty) must be handed back to the model for rectification. </p><p>It's the model's call on how to proceed, crafting its own solutions to the hurdles it <s>stumbles upon</s> creates for itself. This is an experiment in AI problem-solving, an exploration of the model's ability to <s>learn and</s> improve <s>from</s> on its own errors. </p><p>I am going to insist on a few things. </p><ul><li><p>Use AWS</p></li><li><p>Use Serverless wherever possible</p></li></ul><p>My architecture for this endeavour will be entirely serverless:</p><ul><li><p>DynamoDB for the NoSQL database</p></li><li><p>Lambda for running the serverless &#8220;computations&#8221;</p></li><li><p>API Gateway to handle the REST requests</p></li></ul><p>In addition, I&#8217;ll employ Infrastructure as Code (IaC) and automated pipelines for seamless deployment and robust infrastructure management.</p><p>Again, <strong>I am not permitted to suggest answers</strong>. Let the mission commence.</p><div class="pullquote"><p>&#8220;Nobody phrases it this way, but I think that artificial intelligence is almost a humanities discipline. It&#8217;s really an attempt to understand human intelligence and human cognition.&#8221;</p><p><strong>&#8212;Sebastian Thrun</strong></p></div><h4>As a Sneak Peak to the end of this series - here is our end-state architecture.</h4><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-KE2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ce404e8-a815-458a-a686-3f2cb918189b.heic" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-KE2!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ce404e8-a815-458a-a686-3f2cb918189b.heic 424w, https://substackcdn.com/image/fetch/$s_!-KE2!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ce404e8-a815-458a-a686-3f2cb918189b.heic 848w, https://substackcdn.com/image/fetch/$s_!-KE2!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ce404e8-a815-458a-a686-3f2cb918189b.heic 1272w, https://substackcdn.com/image/fetch/$s_!-KE2!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ce404e8-a815-458a-a686-3f2cb918189b.heic 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-KE2!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ce404e8-a815-458a-a686-3f2cb918189b.heic" width="1200" height="794.5054945054945" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5ce404e8-a815-458a-a686-3f2cb918189b.heic&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:964,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:245180,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/heic&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!-KE2!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ce404e8-a815-458a-a686-3f2cb918189b.heic 424w, https://substackcdn.com/image/fetch/$s_!-KE2!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ce404e8-a815-458a-a686-3f2cb918189b.heic 848w, https://substackcdn.com/image/fetch/$s_!-KE2!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ce404e8-a815-458a-a686-3f2cb918189b.heic 1272w, https://substackcdn.com/image/fetch/$s_!-KE2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ce404e8-a815-458a-a686-3f2cb918189b.heic 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Don&#8217;t Worry, I&#8217;ll explain it all as I go.</figcaption></figure></div><p></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.123cloud.st/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.123cloud.st/subscribe?"><span>Subscribe now</span></a></p><h2>Manifest</h2><p><a href="https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-0">Part 0 - Introduction *</a><strong><a href="https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-0">You</a></strong><a href="https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-0"> are </a><em><a href="https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-0">Here</a></em><a href="https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-0"> &#128129;&#8205;&#9792;&#65039;</a><br><a href="https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-1">Part 1 - Failing Fast (Building with prompts)</a><br><a href="https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-2">Part 2 - MVP and Deployments</a><br><a href="https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-3">Part 3 - MVPolish</a><br><a href="https://www.123cloud.st/p/the-sun-never-sets-on-5pm-part-4">Part 4 - So what.</a></p>]]></content:encoded></item><item><title><![CDATA[Blue/Green Deployments: The New Norm for MySQL Upgrades and Schema Changes]]></title><description><![CDATA[MySQL 5.7 Upgrades Got You Seeing Red? It's Time to Think Blue/Green!]]></description><link>https://www.123cloud.st/p/bluegreen-deployments-the-new-norm</link><guid isPermaLink="false">https://www.123cloud.st/p/bluegreen-deployments-the-new-norm</guid><dc:creator><![CDATA[Will Laws]]></dc:creator><pubDate>Sun, 27 Aug 2023 06:26:28 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47ddddf8-e61a-43f7-bf8f-daaf2a838180_2424x2304.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><em><strong><a href="https://xkcd.com/1179/">Last updated 2023-09-26</a></strong></em></p><p>If you&#8217;ve ever made schema changes on large tables you know that these changes can take some time, use a lot of cpu and often cause production outages. Some schema changes will impact production workloads for the duration of the change as well. </p><p>I&#8217;m going to demonstrate how to use AWS RDS for MySQL&#8217;s Blue/Green feature to make a schema change, migrate from 5.7.43 &#8594; 8.0.34 and keep the availability as high as possible. I&#8217;ve recently helped several businesses evaluate their 5.7&#8594;8.0 upgrade paths as the EOL for 5.7 on RDS is <s>mid-September 2023</s> approaching quickly on <s>December 2023</s> February 29th 2024.  I&#8217;ve recommended and tested this style of migration successfully over the last few months and I wanted to raise awareness for the success that I&#8217;ve been able bring to others. Please note, if you&#8217;re using MySQL in AWS, you should really be looking into Aurora MySQL instead of RDS MySQL. The flexibility, durability and resiliency options in Aurora far out weigh what&#8217;s possible in RDS and given proper architecture and design patterns for your data, you&#8217;re most likely to have a better experience - check out my Session at the AWS ANZ Summit 2023 for more information about how Aurora works under the hood to keep resiliency at its best: </p><div id="youtube2--lIq_lq1_Yg" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;-lIq_lq1_Yg&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/-lIq_lq1_Yg?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.123cloud.st/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share&quot;,&quot;text&quot;:&quot;Share One Twenty Three Cloud Street&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.123cloud.st/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share One Twenty Three Cloud Street</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.123cloud.st/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.123cloud.st/subscribe?"><span>Subscribe now</span></a></p><h2>Building the Testing Environment</h2><p>Lets start with my initial configuration.</p><p>I&#8217;m beginning with a MySQL database on version 5.7.43 with a instance identifier &#8220;old-busted&#8221;. It&#8217;s a very respectable db.t3.micro <em>(Hey I&#8217;m frugal, but this will work on any instance family and size) </em>with 20GB of GP2 storage (say frugal one more time and I swear..). I&#8217;m going to use the default parameter group and name the database &#8220;testing&#8221; with a default user of admin and a password <s>so weak that a Commodore 64 could brute force it in less than a minute</s> that I had my password manager create. While that RDS MySQL instance is creating, lets spin up an EC2 instance.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!notd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b6ac31a-fe83-46aa-bea8-26c5fe5e6de1_2390x370.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!notd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b6ac31a-fe83-46aa-bea8-26c5fe5e6de1_2390x370.png 424w, https://substackcdn.com/image/fetch/$s_!notd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b6ac31a-fe83-46aa-bea8-26c5fe5e6de1_2390x370.png 848w, https://substackcdn.com/image/fetch/$s_!notd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b6ac31a-fe83-46aa-bea8-26c5fe5e6de1_2390x370.png 1272w, https://substackcdn.com/image/fetch/$s_!notd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b6ac31a-fe83-46aa-bea8-26c5fe5e6de1_2390x370.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!notd!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b6ac31a-fe83-46aa-bea8-26c5fe5e6de1_2390x370.png" width="1200" height="185.43956043956044" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6b6ac31a-fe83-46aa-bea8-26c5fe5e6de1_2390x370.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:225,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:109753,&quot;alt&quot;:&quot; old-busted Creating Instance\tMySQL Community\tap-southeast-2b\tdb.t3.micro&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt=" old-busted Creating Instance&#9;MySQL Community&#9;ap-southeast-2b&#9;db.t3.micro" title=" old-busted Creating Instance&#9;MySQL Community&#9;ap-southeast-2b&#9;db.t3.micro" srcset="https://substackcdn.com/image/fetch/$s_!notd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b6ac31a-fe83-46aa-bea8-26c5fe5e6de1_2390x370.png 424w, https://substackcdn.com/image/fetch/$s_!notd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b6ac31a-fe83-46aa-bea8-26c5fe5e6de1_2390x370.png 848w, https://substackcdn.com/image/fetch/$s_!notd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b6ac31a-fe83-46aa-bea8-26c5fe5e6de1_2390x370.png 1272w, https://substackcdn.com/image/fetch/$s_!notd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b6ac31a-fe83-46aa-bea8-26c5fe5e6de1_2390x370.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p> </p><p>Again, we&#8217;re going with Free Tier eligible instances and I&#8217;ve made the executive decision to use Graviton - so t4g.small, 30GB GP2 storage, a new Key Pair and a locked down security group to my home IP. I&#8217;m going simple here and put a public IPv4 address directly on the host. Please don&#8217;t do this in production - there are much better ways.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!WFxn!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d3d7d2e-7c68-41d3-b9e9-c630cef997a8_1976x158.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!WFxn!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d3d7d2e-7c68-41d3-b9e9-c630cef997a8_1976x158.png 424w, https://substackcdn.com/image/fetch/$s_!WFxn!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d3d7d2e-7c68-41d3-b9e9-c630cef997a8_1976x158.png 848w, https://substackcdn.com/image/fetch/$s_!WFxn!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d3d7d2e-7c68-41d3-b9e9-c630cef997a8_1976x158.png 1272w, https://substackcdn.com/image/fetch/$s_!WFxn!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d3d7d2e-7c68-41d3-b9e9-c630cef997a8_1976x158.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!WFxn!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d3d7d2e-7c68-41d3-b9e9-c630cef997a8_1976x158.png" width="1200" height="95.6043956043956" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4d3d7d2e-7c68-41d3-b9e9-c630cef997a8_1976x158.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:116,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:44185,&quot;alt&quot;:&quot;Neuralyzer i-0a0257add2765ad63\t Running t4g.small\tInitializing\t No alarms ap-southeast-2a&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="Neuralyzer i-0a0257add2765ad63&#9; Running t4g.small&#9;Initializing&#9; No alarms ap-southeast-2a" title="Neuralyzer i-0a0257add2765ad63&#9; Running t4g.small&#9;Initializing&#9; No alarms ap-southeast-2a" srcset="https://substackcdn.com/image/fetch/$s_!WFxn!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d3d7d2e-7c68-41d3-b9e9-c630cef997a8_1976x158.png 424w, https://substackcdn.com/image/fetch/$s_!WFxn!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d3d7d2e-7c68-41d3-b9e9-c630cef997a8_1976x158.png 848w, https://substackcdn.com/image/fetch/$s_!WFxn!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d3d7d2e-7c68-41d3-b9e9-c630cef997a8_1976x158.png 1272w, https://substackcdn.com/image/fetch/$s_!WFxn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d3d7d2e-7c68-41d3-b9e9-c630cef997a8_1976x158.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Now I just install a few of my favorite packages&#8230;</p><div class="preformatted-block" data-component-name="PreformattedTextBlockToDOM"><label class="hide-text" contenteditable="false">Text within this block will maintain its original spacing when published</label><pre class="text">Tmux on terminals, htop's dynamic views, 
Python scripts running, a coder's best news, 
Packages in Linux, tied up with string, 
These are a few of my favorite things.

MySQL in databases, Node.js in servers, 
Swift Git commits, no room for reverses, 
Docker containers like birds on the wing, 
These are a few of my favorite things.

SSH key pairings and Nginx's might, 
Bash scripting under the soft server light, 
Vim and Emacs, the joy that they bring, 
These are a few of my favorite things.</pre></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!BBj6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ec34219-8541-4ab2-bb67-6a06e635308f_572x203.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!BBj6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ec34219-8541-4ab2-bb67-6a06e635308f_572x203.png 424w, https://substackcdn.com/image/fetch/$s_!BBj6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ec34219-8541-4ab2-bb67-6a06e635308f_572x203.png 848w, https://substackcdn.com/image/fetch/$s_!BBj6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ec34219-8541-4ab2-bb67-6a06e635308f_572x203.png 1272w, https://substackcdn.com/image/fetch/$s_!BBj6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ec34219-8541-4ab2-bb67-6a06e635308f_572x203.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!BBj6!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ec34219-8541-4ab2-bb67-6a06e635308f_572x203.png" width="1200" height="425.87412587412587" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2ec34219-8541-4ab2-bb67-6a06e635308f_572x203.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:203,&quot;width&quot;:572,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:31160,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!BBj6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ec34219-8541-4ab2-bb67-6a06e635308f_572x203.png 424w, https://substackcdn.com/image/fetch/$s_!BBj6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ec34219-8541-4ab2-bb67-6a06e635308f_572x203.png 848w, https://substackcdn.com/image/fetch/$s_!BBj6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ec34219-8541-4ab2-bb67-6a06e635308f_572x203.png 1272w, https://substackcdn.com/image/fetch/$s_!BBj6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ec34219-8541-4ab2-bb67-6a06e635308f_572x203.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Home sweet home</p><p> Lets check the connection to the RDS MySQL instance (after remembering to update the database security group to include our EC2 instance which we definitely didn&#8217;t forget to do..)<br></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3u8Y!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e47a6c1-4ff5-4106-b723-62a0547127ed_1032x949.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3u8Y!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e47a6c1-4ff5-4106-b723-62a0547127ed_1032x949.png 424w, https://substackcdn.com/image/fetch/$s_!3u8Y!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e47a6c1-4ff5-4106-b723-62a0547127ed_1032x949.png 848w, https://substackcdn.com/image/fetch/$s_!3u8Y!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e47a6c1-4ff5-4106-b723-62a0547127ed_1032x949.png 1272w, https://substackcdn.com/image/fetch/$s_!3u8Y!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e47a6c1-4ff5-4106-b723-62a0547127ed_1032x949.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3u8Y!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e47a6c1-4ff5-4106-b723-62a0547127ed_1032x949.png" width="1200" height="1103.4883720930231" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0e47a6c1-4ff5-4106-b723-62a0547127ed_1032x949.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:949,&quot;width&quot;:1032,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:241644,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!3u8Y!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e47a6c1-4ff5-4106-b723-62a0547127ed_1032x949.png 424w, https://substackcdn.com/image/fetch/$s_!3u8Y!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e47a6c1-4ff5-4106-b723-62a0547127ed_1032x949.png 848w, https://substackcdn.com/image/fetch/$s_!3u8Y!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e47a6c1-4ff5-4106-b723-62a0547127ed_1032x949.png 1272w, https://substackcdn.com/image/fetch/$s_!3u8Y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e47a6c1-4ff5-4106-b723-62a0547127ed_1032x949.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Simple - we&#8217;re in. Now lets setup our simulation.</p><pre><code>from faker import Faker
from multiprocessing import Process
import mysql.connector
import time

fake = Faker()

def create_insert_commands(start, end, process_number):
    # Establish a new connection for each process
    cnx = mysql.connector.connect(user='yourusername', password='yourpassword', host='localhost', database='testing')
    cursor = cnx.cursor()

    invite_data = []  # List to hold the data for all invites

    for i in range(start, end):
        name = fake.name().replace("'", "\\'")  # Generate a fake name
        user = fake.user_name()  # Generate a fake user name
        invite_data.append((name, user))

        # Perform the bulk insert every 10000 records
        if i % 10000 == 0:
            cursor.executemany("INSERT INTO invitations (invite_name, invite_user) VALUES (%s, %s)", invite_data)
            cnx.commit()
            print(f"Process {process_number}: Inserted records up to {i}")
            invite_data = []  # Clear the invite_data list

    # Insert any remaining data
    if invite_data:
        cursor.executemany("INSERT INTO invitations (invite_name, invite_user) VALUES (%s, %s)", invite_data)
        cnx.commit()
        print(f"Process {process_number}: Finished inserting records")

    cursor.close()
    cnx.close()

def main():
    total_records = 3919483539
    processes = 1
    records_per_process = total_records // processes

    for i in range(processes):
        start = i * records_per_process
        if i == processes - 1:  # If it's the last process, make sure it goes all the way up to total_records
            end = total_records
        else:
            end = start + records_per_process
        process = Process(target=create_insert_commands, args=(start, end, i))
        process.start()

if __name__ == "__main__":
    main()
</code></pre><p>(sudo yum install mysql-devel python3.9-devel ; sudo yum groupinstall "Development Tools" ; pip install faker; pip instal mysql-connector-python; pip install pymysql) </p><p>This is a quick script designed to create a problem for us. We want a simple table with fake data like this:</p><pre><code>CREATE TABLE invitations (
    invite_number INT AUTO_INCREMENT,
    invite_name VARCHAR(255),
    invite_user VARCHAR(255),
    PRIMARY KEY (invite_number)
);

mysql&gt; describe invitations;
+---------------+--------------+------+-----+---------+----------------+
| Field         | Type         | Null | Key | Default | Extra          |
+---------------+--------------+------+-----+---------+----------------+
| invite_number | int(11)      | NO   | PRI | NULL    | auto_increment |
| invite_name   | varchar(255) | YES  |     | NULL    |                |
| invite_user   | varchar(255) | YES  |     | NULL    |                |
+---------------+--------------+------+-----+---------+----------------+
3 rows in set (0.00 sec)</code></pre><p>The problem we could create with a table like this is to &#8220;run out of int&#8217;s&#8221; and want to switch to &#8220;bigint&#8221; (you should be using DynamoDB for this use case most likely). </p><p>Lets use the fake-data.py script I showed you earlier and give our table some data.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!DBsJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01bc1fc2-c0ab-465f-9aa5-121dfbf4ba2a_1032x949.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!DBsJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01bc1fc2-c0ab-465f-9aa5-121dfbf4ba2a_1032x949.png 424w, https://substackcdn.com/image/fetch/$s_!DBsJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01bc1fc2-c0ab-465f-9aa5-121dfbf4ba2a_1032x949.png 848w, https://substackcdn.com/image/fetch/$s_!DBsJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01bc1fc2-c0ab-465f-9aa5-121dfbf4ba2a_1032x949.png 1272w, https://substackcdn.com/image/fetch/$s_!DBsJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01bc1fc2-c0ab-465f-9aa5-121dfbf4ba2a_1032x949.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!DBsJ!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01bc1fc2-c0ab-465f-9aa5-121dfbf4ba2a_1032x949.png" width="1200" height="1103.4883720930231" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/01bc1fc2-c0ab-465f-9aa5-121dfbf4ba2a_1032x949.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:949,&quot;width&quot;:1032,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:202334,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!DBsJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01bc1fc2-c0ab-465f-9aa5-121dfbf4ba2a_1032x949.png 424w, https://substackcdn.com/image/fetch/$s_!DBsJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01bc1fc2-c0ab-465f-9aa5-121dfbf4ba2a_1032x949.png 848w, https://substackcdn.com/image/fetch/$s_!DBsJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01bc1fc2-c0ab-465f-9aa5-121dfbf4ba2a_1032x949.png 1272w, https://substackcdn.com/image/fetch/$s_!DBsJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01bc1fc2-c0ab-465f-9aa5-121dfbf4ba2a_1032x949.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>(We don&#8217;t actually need to cause the table to run out of integers to finish testing this; its just more fun with some data involved and simulated writes/reads)</p><p></p><p>Now lets have another script test our connection for us.<br><br></p><pre><code>import pymysql
import time
import logging

logging.basicConfig(level=logging.INFO)

def connect_to_db():
    try:
        # Change the parameters based on your MySQL configurations
        connection = pymysql.connect(host='yourrdsinstance',
                                     user='admin',
                                     password='password',
                                     db='testing',
                                     charset='utf8mb4',
                                     cursorclass=pymysql.cursors.DictCursor)
        return connection
    except pymysql.MySQLError as e:
        logging.error(f"Error while connecting to MySQL: {e}")
        return None

def fetch_latest_row(connection):
    try:
        with connection.cursor() as cursor:
            sql_query = "SELECT * FROM invitations ORDER BY invite_number DESC LIMIT 1"
            cursor.execute(sql_query)
            latest_row = cursor.fetchone()
            connection.commit() 
            return latest_row
    except pymysql.MySQLError as e:
        logging.error(f"Error while fetching data from MySQL: {e}")
        return None

if __name__ == "__main__":
    connection = connect_to_db()
    disconnection_time = None

    while True:
        if connection:
            latest_row = fetch_latest_row(connection)
            if latest_row:
                logging.info(f"Latest row data: {latest_row}")
                if disconnection_time:
                    reconnection_time = time.time()
                    elapsed_time = reconnection_time - disconnection_time
                    logging.info(f"Database reconnected. Connection was lost for {elapsed_time:.2f} seconds.")
                    disconnection_time = None
            else:
                logging.warning("Failed to fetch latest row. Trying to reconnect.")
                connection.close()
                connection = None
                disconnection_time = time.time()
        else:
            logging.warning("Connection to database failed. Trying to reconnect.")
            connection = connect_to_db()
            if not disconnection_time:
                disconnection_time = time.time()

        # Sleep for 1 second before the next iteration
        time.sleep(1)</code></pre><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!C1t1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7ffeee1-7447-4405-92fb-573522d43511_1032x932.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!C1t1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7ffeee1-7447-4405-92fb-573522d43511_1032x932.png 424w, https://substackcdn.com/image/fetch/$s_!C1t1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7ffeee1-7447-4405-92fb-573522d43511_1032x932.png 848w, https://substackcdn.com/image/fetch/$s_!C1t1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7ffeee1-7447-4405-92fb-573522d43511_1032x932.png 1272w, https://substackcdn.com/image/fetch/$s_!C1t1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7ffeee1-7447-4405-92fb-573522d43511_1032x932.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!C1t1!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7ffeee1-7447-4405-92fb-573522d43511_1032x932.png" width="1200" height="1083.7209302325582" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d7ffeee1-7447-4405-92fb-573522d43511_1032x932.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:932,&quot;width&quot;:1032,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:282548,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!C1t1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7ffeee1-7447-4405-92fb-573522d43511_1032x932.png 424w, https://substackcdn.com/image/fetch/$s_!C1t1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7ffeee1-7447-4405-92fb-573522d43511_1032x932.png 848w, https://substackcdn.com/image/fetch/$s_!C1t1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7ffeee1-7447-4405-92fb-573522d43511_1032x932.png 1272w, https://substackcdn.com/image/fetch/$s_!C1t1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7ffeee1-7447-4405-92fb-573522d43511_1032x932.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>There we go - now we&#8217;re able to monitor the RDS Instance. Let&#8217;s test the outage of the instance by having the DB reboot. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!bona!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f170fa8-f631-4c19-bb92-9599d07afad4_1708x452.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bona!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f170fa8-f631-4c19-bb92-9599d07afad4_1708x452.png 424w, https://substackcdn.com/image/fetch/$s_!bona!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f170fa8-f631-4c19-bb92-9599d07afad4_1708x452.png 848w, https://substackcdn.com/image/fetch/$s_!bona!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f170fa8-f631-4c19-bb92-9599d07afad4_1708x452.png 1272w, https://substackcdn.com/image/fetch/$s_!bona!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f170fa8-f631-4c19-bb92-9599d07afad4_1708x452.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bona!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f170fa8-f631-4c19-bb92-9599d07afad4_1708x452.png" width="1200" height="317.3076923076923" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9f170fa8-f631-4c19-bb92-9599d07afad4_1708x452.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:385,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:102745,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!bona!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f170fa8-f631-4c19-bb92-9599d07afad4_1708x452.png 424w, https://substackcdn.com/image/fetch/$s_!bona!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f170fa8-f631-4c19-bb92-9599d07afad4_1708x452.png 848w, https://substackcdn.com/image/fetch/$s_!bona!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f170fa8-f631-4c19-bb92-9599d07afad4_1708x452.png 1272w, https://substackcdn.com/image/fetch/$s_!bona!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f170fa8-f631-4c19-bb92-9599d07afad4_1708x452.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!7Vu2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5beda28d-f78f-4d1b-b0c9-733a305ce761_1032x932.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!7Vu2!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5beda28d-f78f-4d1b-b0c9-733a305ce761_1032x932.png 424w, https://substackcdn.com/image/fetch/$s_!7Vu2!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5beda28d-f78f-4d1b-b0c9-733a305ce761_1032x932.png 848w, https://substackcdn.com/image/fetch/$s_!7Vu2!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5beda28d-f78f-4d1b-b0c9-733a305ce761_1032x932.png 1272w, https://substackcdn.com/image/fetch/$s_!7Vu2!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5beda28d-f78f-4d1b-b0c9-733a305ce761_1032x932.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!7Vu2!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5beda28d-f78f-4d1b-b0c9-733a305ce761_1032x932.png" width="1200" height="1083.7209302325582" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5beda28d-f78f-4d1b-b0c9-733a305ce761_1032x932.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:932,&quot;width&quot;:1032,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:275539,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!7Vu2!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5beda28d-f78f-4d1b-b0c9-733a305ce761_1032x932.png 424w, https://substackcdn.com/image/fetch/$s_!7Vu2!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5beda28d-f78f-4d1b-b0c9-733a305ce761_1032x932.png 848w, https://substackcdn.com/image/fetch/$s_!7Vu2!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5beda28d-f78f-4d1b-b0c9-733a305ce761_1032x932.png 1272w, https://substackcdn.com/image/fetch/$s_!7Vu2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5beda28d-f78f-4d1b-b0c9-733a305ce761_1032x932.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Our DB monitoring script shows that we lost the connection for about 9 seconds ( I did need to start the fake-data.py script again) not bad for a reboot. </p><p></p><h2>Creating the Blue/Green Deployment</h2><p>Now lets make a Blue/Green Deployment. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!OuEx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b87afea-9299-4877-bc7c-8f3e3aac82a3_1786x696.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!OuEx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b87afea-9299-4877-bc7c-8f3e3aac82a3_1786x696.png 424w, https://substackcdn.com/image/fetch/$s_!OuEx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b87afea-9299-4877-bc7c-8f3e3aac82a3_1786x696.png 848w, https://substackcdn.com/image/fetch/$s_!OuEx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b87afea-9299-4877-bc7c-8f3e3aac82a3_1786x696.png 1272w, https://substackcdn.com/image/fetch/$s_!OuEx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b87afea-9299-4877-bc7c-8f3e3aac82a3_1786x696.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!OuEx!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b87afea-9299-4877-bc7c-8f3e3aac82a3_1786x696.png" width="1200" height="467.3076923076923" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6b87afea-9299-4877-bc7c-8f3e3aac82a3_1786x696.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:567,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:143808,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!OuEx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b87afea-9299-4877-bc7c-8f3e3aac82a3_1786x696.png 424w, https://substackcdn.com/image/fetch/$s_!OuEx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b87afea-9299-4877-bc7c-8f3e3aac82a3_1786x696.png 848w, https://substackcdn.com/image/fetch/$s_!OuEx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b87afea-9299-4877-bc7c-8f3e3aac82a3_1786x696.png 1272w, https://substackcdn.com/image/fetch/$s_!OuEx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b87afea-9299-4877-bc7c-8f3e3aac82a3_1786x696.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>We&#8217;ll click create and select MySQL 8.0.34</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!sOyb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f9223b5-dda7-4476-9155-ad8ebc4261aa_1456x2094.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!sOyb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f9223b5-dda7-4476-9155-ad8ebc4261aa_1456x2094.png 424w, https://substackcdn.com/image/fetch/$s_!sOyb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f9223b5-dda7-4476-9155-ad8ebc4261aa_1456x2094.png 848w, https://substackcdn.com/image/fetch/$s_!sOyb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f9223b5-dda7-4476-9155-ad8ebc4261aa_1456x2094.png 1272w, https://substackcdn.com/image/fetch/$s_!sOyb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f9223b5-dda7-4476-9155-ad8ebc4261aa_1456x2094.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!sOyb!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f9223b5-dda7-4476-9155-ad8ebc4261aa_1456x2094.png" width="1200" height="1725.8241758241759" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6f9223b5-dda7-4476-9155-ad8ebc4261aa_1456x2094.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:2094,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:397900,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!sOyb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f9223b5-dda7-4476-9155-ad8ebc4261aa_1456x2094.png 424w, https://substackcdn.com/image/fetch/$s_!sOyb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f9223b5-dda7-4476-9155-ad8ebc4261aa_1456x2094.png 848w, https://substackcdn.com/image/fetch/$s_!sOyb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f9223b5-dda7-4476-9155-ad8ebc4261aa_1456x2094.png 1272w, https://substackcdn.com/image/fetch/$s_!sOyb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f9223b5-dda7-4476-9155-ad8ebc4261aa_1456x2094.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Then we&#8217;ll just create the staging environment and wait for it to provision.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!MaJp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6de9181d-31d0-44a4-89e0-ae6dc5f18b2a_2512x664.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!MaJp!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6de9181d-31d0-44a4-89e0-ae6dc5f18b2a_2512x664.png 424w, https://substackcdn.com/image/fetch/$s_!MaJp!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6de9181d-31d0-44a4-89e0-ae6dc5f18b2a_2512x664.png 848w, https://substackcdn.com/image/fetch/$s_!MaJp!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6de9181d-31d0-44a4-89e0-ae6dc5f18b2a_2512x664.png 1272w, https://substackcdn.com/image/fetch/$s_!MaJp!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6de9181d-31d0-44a4-89e0-ae6dc5f18b2a_2512x664.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!MaJp!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6de9181d-31d0-44a4-89e0-ae6dc5f18b2a_2512x664.png" width="1200" height="317.3076923076923" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6de9181d-31d0-44a4-89e0-ae6dc5f18b2a_2512x664.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:385,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:163560,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!MaJp!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6de9181d-31d0-44a4-89e0-ae6dc5f18b2a_2512x664.png 424w, https://substackcdn.com/image/fetch/$s_!MaJp!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6de9181d-31d0-44a4-89e0-ae6dc5f18b2a_2512x664.png 848w, https://substackcdn.com/image/fetch/$s_!MaJp!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6de9181d-31d0-44a4-89e0-ae6dc5f18b2a_2512x664.png 1272w, https://substackcdn.com/image/fetch/$s_!MaJp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6de9181d-31d0-44a4-89e0-ae6dc5f18b2a_2512x664.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>If we had read replicas on old-busted, this will also create new read-replicas in the green side of the &#8220;new-hotness&#8221; deployment. When we fail over in a blue green deployment in RDS we get to keep our old endpoint names and use our new databases. However we leave our Green environment is what will become our new production &#8220;Blue&#8221; environment after the switch over.</p><p></p><p>While we&#8217;re waiting, let&#8217;s create the parameter group for the Green Instance. I&#8217;ll go to the &#8220;new-hotness&#8221; Blue/Green Deployment and find our Green instance then find the parameter group.</p><p>Oh. I don&#8217;t have the default mysql-8 parameter group in my parameter group page. Cause I&#8217;ve never had a mysql 8 instance in this account before. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!49RL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ca5ee09-ba83-4b5e-9e91-bd279b905663_1234x1652.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!49RL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ca5ee09-ba83-4b5e-9e91-bd279b905663_1234x1652.png 424w, https://substackcdn.com/image/fetch/$s_!49RL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ca5ee09-ba83-4b5e-9e91-bd279b905663_1234x1652.png 848w, https://substackcdn.com/image/fetch/$s_!49RL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ca5ee09-ba83-4b5e-9e91-bd279b905663_1234x1652.png 1272w, https://substackcdn.com/image/fetch/$s_!49RL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ca5ee09-ba83-4b5e-9e91-bd279b905663_1234x1652.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!49RL!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ca5ee09-ba83-4b5e-9e91-bd279b905663_1234x1652.png" width="1200" height="1606.482982171799" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1ca5ee09-ba83-4b5e-9e91-bd279b905663_1234x1652.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:1652,&quot;width&quot;:1234,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:246538,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!49RL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ca5ee09-ba83-4b5e-9e91-bd279b905663_1234x1652.png 424w, https://substackcdn.com/image/fetch/$s_!49RL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ca5ee09-ba83-4b5e-9e91-bd279b905663_1234x1652.png 848w, https://substackcdn.com/image/fetch/$s_!49RL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ca5ee09-ba83-4b5e-9e91-bd279b905663_1234x1652.png 1272w, https://substackcdn.com/image/fetch/$s_!49RL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ca5ee09-ba83-4b5e-9e91-bd279b905663_1234x1652.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The Green instance will actually start off as a 5.7 instance and then perform an upgrade adding the default:mysql8-0 options and parameter groups! Fun!</p><p></p><p>Once the 8-0 parameter group is created we need to make a copy of it and then change a single (dangerous) setting. </p><p>We&#8217;ll start by creating a parameter group like below:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!sXmE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd79fbb71-f120-42a8-9b07-04b7951f3faf_1430x1100.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!sXmE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd79fbb71-f120-42a8-9b07-04b7951f3faf_1430x1100.png 424w, https://substackcdn.com/image/fetch/$s_!sXmE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd79fbb71-f120-42a8-9b07-04b7951f3faf_1430x1100.png 848w, https://substackcdn.com/image/fetch/$s_!sXmE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd79fbb71-f120-42a8-9b07-04b7951f3faf_1430x1100.png 1272w, https://substackcdn.com/image/fetch/$s_!sXmE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd79fbb71-f120-42a8-9b07-04b7951f3faf_1430x1100.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!sXmE!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd79fbb71-f120-42a8-9b07-04b7951f3faf_1430x1100.png" width="1200" height="923.0769230769231" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d79fbb71-f120-42a8-9b07-04b7951f3faf_1430x1100.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:1100,&quot;width&quot;:1430,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:137016,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!sXmE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd79fbb71-f120-42a8-9b07-04b7951f3faf_1430x1100.png 424w, https://substackcdn.com/image/fetch/$s_!sXmE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd79fbb71-f120-42a8-9b07-04b7951f3faf_1430x1100.png 848w, https://substackcdn.com/image/fetch/$s_!sXmE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd79fbb71-f120-42a8-9b07-04b7951f3faf_1430x1100.png 1272w, https://substackcdn.com/image/fetch/$s_!sXmE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd79fbb71-f120-42a8-9b07-04b7951f3faf_1430x1100.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Then we&#8217;ll edit the parameter group, we want to change the parameter &#8220;read_only&#8221; from &#8220;{TrueIfReplica}&#8221; to &#8220;0&#8221;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!U_0_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45004056-4792-4ffc-b0a5-192904f835fe_2438x942.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!U_0_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45004056-4792-4ffc-b0a5-192904f835fe_2438x942.png 424w, https://substackcdn.com/image/fetch/$s_!U_0_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45004056-4792-4ffc-b0a5-192904f835fe_2438x942.png 848w, https://substackcdn.com/image/fetch/$s_!U_0_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45004056-4792-4ffc-b0a5-192904f835fe_2438x942.png 1272w, https://substackcdn.com/image/fetch/$s_!U_0_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45004056-4792-4ffc-b0a5-192904f835fe_2438x942.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!U_0_!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45004056-4792-4ffc-b0a5-192904f835fe_2438x942.png" width="1200" height="464.010989010989" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/45004056-4792-4ffc-b0a5-192904f835fe_2438x942.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:563,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:174667,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!U_0_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45004056-4792-4ffc-b0a5-192904f835fe_2438x942.png 424w, https://substackcdn.com/image/fetch/$s_!U_0_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45004056-4792-4ffc-b0a5-192904f835fe_2438x942.png 848w, https://substackcdn.com/image/fetch/$s_!U_0_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45004056-4792-4ffc-b0a5-192904f835fe_2438x942.png 1272w, https://substackcdn.com/image/fetch/$s_!U_0_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45004056-4792-4ffc-b0a5-192904f835fe_2438x942.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zfBS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f2a4a23-e7a6-4459-bd32-e6d208d55c2b_1728x582.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zfBS!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f2a4a23-e7a6-4459-bd32-e6d208d55c2b_1728x582.png 424w, https://substackcdn.com/image/fetch/$s_!zfBS!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f2a4a23-e7a6-4459-bd32-e6d208d55c2b_1728x582.png 848w, https://substackcdn.com/image/fetch/$s_!zfBS!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f2a4a23-e7a6-4459-bd32-e6d208d55c2b_1728x582.png 1272w, https://substackcdn.com/image/fetch/$s_!zfBS!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f2a4a23-e7a6-4459-bd32-e6d208d55c2b_1728x582.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zfBS!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f2a4a23-e7a6-4459-bd32-e6d208d55c2b_1728x582.png" width="1200" height="403.84615384615387" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4f2a4a23-e7a6-4459-bd32-e6d208d55c2b_1728x582.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:490,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:82434,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!zfBS!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f2a4a23-e7a6-4459-bd32-e6d208d55c2b_1728x582.png 424w, https://substackcdn.com/image/fetch/$s_!zfBS!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f2a4a23-e7a6-4459-bd32-e6d208d55c2b_1728x582.png 848w, https://substackcdn.com/image/fetch/$s_!zfBS!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f2a4a23-e7a6-4459-bd32-e6d208d55c2b_1728x582.png 1272w, https://substackcdn.com/image/fetch/$s_!zfBS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f2a4a23-e7a6-4459-bd32-e6d208d55c2b_1728x582.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This will allow us to make changes in the Green instance. Please Please know that if you make incompatible changes in the green instance, you will stop replication and you&#8217;ll need to sort out the issues before you can make replication work again!</p><p>Now that the Blue Green Deployment is created. I&#8217;ll assign our new parameter group to the Green instance by modifying it and assigning the custom-green-mysql80 group. Changes to the green database are kept when promoting to blue; however, changes to green do not propagate to blue before the promotion. </p><p>Let's wait for the Green instance to finish modifying and take a look at the Deployment itself. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!R8I7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47ddddf8-e61a-43f7-bf8f-daaf2a838180_2424x2304.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!R8I7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47ddddf8-e61a-43f7-bf8f-daaf2a838180_2424x2304.png 424w, https://substackcdn.com/image/fetch/$s_!R8I7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47ddddf8-e61a-43f7-bf8f-daaf2a838180_2424x2304.png 848w, https://substackcdn.com/image/fetch/$s_!R8I7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47ddddf8-e61a-43f7-bf8f-daaf2a838180_2424x2304.png 1272w, https://substackcdn.com/image/fetch/$s_!R8I7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47ddddf8-e61a-43f7-bf8f-daaf2a838180_2424x2304.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!R8I7!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47ddddf8-e61a-43f7-bf8f-daaf2a838180_2424x2304.png" width="1200" height="1140.6593406593406" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/47ddddf8-e61a-43f7-bf8f-daaf2a838180_2424x2304.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:1384,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:570751,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!R8I7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47ddddf8-e61a-43f7-bf8f-daaf2a838180_2424x2304.png 424w, https://substackcdn.com/image/fetch/$s_!R8I7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47ddddf8-e61a-43f7-bf8f-daaf2a838180_2424x2304.png 848w, https://substackcdn.com/image/fetch/$s_!R8I7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47ddddf8-e61a-43f7-bf8f-daaf2a838180_2424x2304.png 1272w, https://substackcdn.com/image/fetch/$s_!R8I7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47ddddf8-e61a-43f7-bf8f-daaf2a838180_2424x2304.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>We can see a side by side comparison of our Blue &#8220;Active Production&#8221; Instance and our Green &#8220;Staged Production&#8221; Instance. (These databases are offline at the time of publishing, don&#8217;t bother trying to DDOS my t3.micro instances at those Endpoints)</p><p>We can also see some stats about the instance in the Blue/Green Deployment:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wZVq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62e49e8c-ed8c-4863-b844-3f4599725942_2418x436.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wZVq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62e49e8c-ed8c-4863-b844-3f4599725942_2418x436.png 424w, https://substackcdn.com/image/fetch/$s_!wZVq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62e49e8c-ed8c-4863-b844-3f4599725942_2418x436.png 848w, https://substackcdn.com/image/fetch/$s_!wZVq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62e49e8c-ed8c-4863-b844-3f4599725942_2418x436.png 1272w, https://substackcdn.com/image/fetch/$s_!wZVq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62e49e8c-ed8c-4863-b844-3f4599725942_2418x436.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wZVq!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62e49e8c-ed8c-4863-b844-3f4599725942_2418x436.png" width="1200" height="216.75824175824175" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/62e49e8c-ed8c-4863-b844-3f4599725942_2418x436.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:263,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:88611,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!wZVq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62e49e8c-ed8c-4863-b844-3f4599725942_2418x436.png 424w, https://substackcdn.com/image/fetch/$s_!wZVq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62e49e8c-ed8c-4863-b844-3f4599725942_2418x436.png 848w, https://substackcdn.com/image/fetch/$s_!wZVq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62e49e8c-ed8c-4863-b844-3f4599725942_2418x436.png 1272w, https://substackcdn.com/image/fetch/$s_!wZVq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62e49e8c-ed8c-4863-b844-3f4599725942_2418x436.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Now that our instances are available and replicating, let&#8217;s connect to the green instance and make our schema change! After we definitely remember to reboot the instance first to apply the parameter group changes&#8230;.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!yQPg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36616ddc-6bf0-4887-9d0c-7f4bf6c21657_538x114.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!yQPg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36616ddc-6bf0-4887-9d0c-7f4bf6c21657_538x114.png 424w, https://substackcdn.com/image/fetch/$s_!yQPg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36616ddc-6bf0-4887-9d0c-7f4bf6c21657_538x114.png 848w, https://substackcdn.com/image/fetch/$s_!yQPg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36616ddc-6bf0-4887-9d0c-7f4bf6c21657_538x114.png 1272w, https://substackcdn.com/image/fetch/$s_!yQPg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36616ddc-6bf0-4887-9d0c-7f4bf6c21657_538x114.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!yQPg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36616ddc-6bf0-4887-9d0c-7f4bf6c21657_538x114.png" width="538" height="114" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/36616ddc-6bf0-4887-9d0c-7f4bf6c21657_538x114.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:114,&quot;width&quot;:538,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:17913,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!yQPg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36616ddc-6bf0-4887-9d0c-7f4bf6c21657_538x114.png 424w, https://substackcdn.com/image/fetch/$s_!yQPg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36616ddc-6bf0-4887-9d0c-7f4bf6c21657_538x114.png 848w, https://substackcdn.com/image/fetch/$s_!yQPg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36616ddc-6bf0-4887-9d0c-7f4bf6c21657_538x114.png 1272w, https://substackcdn.com/image/fetch/$s_!yQPg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36616ddc-6bf0-4887-9d0c-7f4bf6c21657_538x114.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!tVij!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32fa7fda-3860-42d3-b582-653e6912a5cd_1414x564.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!tVij!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32fa7fda-3860-42d3-b582-653e6912a5cd_1414x564.png 424w, https://substackcdn.com/image/fetch/$s_!tVij!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32fa7fda-3860-42d3-b582-653e6912a5cd_1414x564.png 848w, https://substackcdn.com/image/fetch/$s_!tVij!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32fa7fda-3860-42d3-b582-653e6912a5cd_1414x564.png 1272w, https://substackcdn.com/image/fetch/$s_!tVij!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32fa7fda-3860-42d3-b582-653e6912a5cd_1414x564.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!tVij!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32fa7fda-3860-42d3-b582-653e6912a5cd_1414x564.png" width="1414" height="564" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/32fa7fda-3860-42d3-b582-653e6912a5cd_1414x564.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:564,&quot;width&quot;:1414,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:58754,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!tVij!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32fa7fda-3860-42d3-b582-653e6912a5cd_1414x564.png 424w, https://substackcdn.com/image/fetch/$s_!tVij!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32fa7fda-3860-42d3-b582-653e6912a5cd_1414x564.png 848w, https://substackcdn.com/image/fetch/$s_!tVij!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32fa7fda-3860-42d3-b582-653e6912a5cd_1414x564.png 1272w, https://substackcdn.com/image/fetch/$s_!tVij!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32fa7fda-3860-42d3-b582-653e6912a5cd_1414x564.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Replication will kick back in after the reboot, don&#8217;t worry!</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!iD65!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F187dadc5-2065-412f-b2f4-9202fd5e675b_1032x1459.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!iD65!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F187dadc5-2065-412f-b2f4-9202fd5e675b_1032x1459.png 424w, https://substackcdn.com/image/fetch/$s_!iD65!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F187dadc5-2065-412f-b2f4-9202fd5e675b_1032x1459.png 848w, https://substackcdn.com/image/fetch/$s_!iD65!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F187dadc5-2065-412f-b2f4-9202fd5e675b_1032x1459.png 1272w, https://substackcdn.com/image/fetch/$s_!iD65!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F187dadc5-2065-412f-b2f4-9202fd5e675b_1032x1459.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!iD65!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F187dadc5-2065-412f-b2f4-9202fd5e675b_1032x1459.png" width="1200" height="1696.5116279069769" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/187dadc5-2065-412f-b2f4-9202fd5e675b_1032x1459.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:1459,&quot;width&quot;:1032,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:437306,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!iD65!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F187dadc5-2065-412f-b2f4-9202fd5e675b_1032x1459.png 424w, https://substackcdn.com/image/fetch/$s_!iD65!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F187dadc5-2065-412f-b2f4-9202fd5e675b_1032x1459.png 848w, https://substackcdn.com/image/fetch/$s_!iD65!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F187dadc5-2065-412f-b2f4-9202fd5e675b_1032x1459.png 1272w, https://substackcdn.com/image/fetch/$s_!iD65!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F187dadc5-2065-412f-b2f4-9202fd5e675b_1032x1459.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Top Left = Blue Instance, Top Right = Green Instance, Middle Top = htop, Middle Bottom = fake-data.py (note, number shown is how many rows it has written this session, not max row count), Bottom Bottom = db-monitor.py monitoring the &#8220;Blue&#8221; endpoint</figcaption></figure></div><pre><code>mysql&gt; use testing;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql&gt; describe invitations;
+---------------+--------------+------+-----+---------+----------------+
| Field         | Type         | Null | Key | Default | Extra          |
+---------------+--------------+------+-----+---------+----------------+
| invite_number | int          | NO   | PRI | NULL    | auto_increment |
| invite_name   | varchar(255) | YES  |     | NULL    |                |
| invite_user   | varchar(255) | YES  |     | NULL    |                |
+---------------+--------------+------+-----+---------+----------------+
3 rows in set (0.03 sec)

mysql&gt;ALTER TABLE invitations MODIFY invite_number BIGINT NOT NULL AUTO_INCREMENT;
Query OK, 11100002 rows affected (50.63 sec)
Records: 11100002  Duplicates: 0  Warnings: 0

mysql&gt; describe invitations;
+---------------+--------------+------+-----+---------+----------------+
| Field         | Type         | Null | Key | Default | Extra          |
+---------------+--------------+------+-----+---------+----------------+
| invite_number | bigint       | NO   | PRI | NULL    | auto_increment |
| invite_name   | varchar(255) | YES  |     | NULL    |                |
| invite_user   | varchar(255) | YES  |     | NULL    |                |
+---------------+--------------+------+-----+---------+----------------+
3 rows in set (0.06 sec)</code></pre><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!9ixc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7660e00-1a73-4d03-9753-6039f115c4f4_2428x2054.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9ixc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7660e00-1a73-4d03-9753-6039f115c4f4_2428x2054.png 424w, https://substackcdn.com/image/fetch/$s_!9ixc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7660e00-1a73-4d03-9753-6039f115c4f4_2428x2054.png 848w, https://substackcdn.com/image/fetch/$s_!9ixc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7660e00-1a73-4d03-9753-6039f115c4f4_2428x2054.png 1272w, https://substackcdn.com/image/fetch/$s_!9ixc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7660e00-1a73-4d03-9753-6039f115c4f4_2428x2054.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!9ixc!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7660e00-1a73-4d03-9753-6039f115c4f4_2428x2054.png" width="1200" height="1015.3846153846154" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a7660e00-1a73-4d03-9753-6039f115c4f4_2428x2054.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:1232,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:526044,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!9ixc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7660e00-1a73-4d03-9753-6039f115c4f4_2428x2054.png 424w, https://substackcdn.com/image/fetch/$s_!9ixc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7660e00-1a73-4d03-9753-6039f115c4f4_2428x2054.png 848w, https://substackcdn.com/image/fetch/$s_!9ixc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7660e00-1a73-4d03-9753-6039f115c4f4_2428x2054.png 1272w, https://substackcdn.com/image/fetch/$s_!9ixc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7660e00-1a73-4d03-9753-6039f115c4f4_2428x2054.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>We can see that our Green instance has completed our schema change and is on mysql 8.0! We also induced some replica lag while the schema change was taking place. The amount of replica lag will depend on how big your tables are. If its going to take DAYS to do your schema change here, be wary of how much disk you have available and when you plan your fail over, the replica lag must be near 0 for a switch over to happen. </p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!tpVf!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc99a9037-9abc-48ab-9cbd-ef621c042312_1066x210.png" data-component-name="Image2ToDOM"><div class="image2-inset image2-full-screen"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!tpVf!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc99a9037-9abc-48ab-9cbd-ef621c042312_1066x210.png 424w, https://substackcdn.com/image/fetch/$s_!tpVf!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc99a9037-9abc-48ab-9cbd-ef621c042312_1066x210.png 848w, https://substackcdn.com/image/fetch/$s_!tpVf!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc99a9037-9abc-48ab-9cbd-ef621c042312_1066x210.png 1272w, https://substackcdn.com/image/fetch/$s_!tpVf!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc99a9037-9abc-48ab-9cbd-ef621c042312_1066x210.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!tpVf!,w_5760,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc99a9037-9abc-48ab-9cbd-ef621c042312_1066x210.png" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c99a9037-9abc-48ab-9cbd-ef621c042312_1066x210.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;full&quot;,&quot;height&quot;:210,&quot;width&quot;:1066,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:42332,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-fullscreen" alt="" srcset="https://substackcdn.com/image/fetch/$s_!tpVf!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc99a9037-9abc-48ab-9cbd-ef621c042312_1066x210.png 424w, https://substackcdn.com/image/fetch/$s_!tpVf!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc99a9037-9abc-48ab-9cbd-ef621c042312_1066x210.png 848w, https://substackcdn.com/image/fetch/$s_!tpVf!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc99a9037-9abc-48ab-9cbd-ef621c042312_1066x210.png 1272w, https://substackcdn.com/image/fetch/$s_!tpVf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc99a9037-9abc-48ab-9cbd-ef621c042312_1066x210.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Blue Instance(left) showing type &#8220;int&#8221; and Green Instance(right) showing type &#8220;bigint&#8221;</figcaption></figure></div><p>We should switch to the desired parameter group (the default 8.0 group in this case before our switchover takes place. We wouldn&#8217;t want any future read replicas having &#8220;write&#8221; permissions!</p><p>Our Blue instance and Green instance now have our desired changes.</p><p> Let&#8217;s proceed with the switch over and observe the downtime. </p><h2>Understanding the Switchover</h2><p>A few things happen before and during the switch over, you can read all about them here:<a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/blue-green-deployments-switching.html"> https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/blue-green-deployments-switching.html</a> but I&#8217;ll put a summary in below.<br></p><p><strong>Key Features:</strong></p><ol><li><p><strong>Timeout Setting</strong>: You can set a switchover timeout ranging from 30 seconds to one hour. The default is 300 seconds. If the switchover exceeds this limit, all changes are rolled back.</p></li><li><p><strong>Guardrails</strong>: Before initiating a switchover, RDS performs a series of checks on both the blue and green environments to ensure their readiness. These include checks on replication health, replication lag, and active writes. Any discrepancies will halt the switchover.</p></li><li><p><strong>Switchover Actions</strong>: During the switchover, RDS runs guardrail checks, stops new write operations, drops and disallows new connections, waits for replication to sync, and renames DB instances and endpoints in both environments.</p></li><li><p><strong>Post-Switchover</strong>: After a successful switchover, the new production environment allows write operations while the old one allows only read operations until rebooted.</p></li><li><p><strong>Event Monitoring</strong>: Amazon EventBridge can be used to monitor the status of a switchover.</p></li><li><p><strong>Tagging</strong>: Tags configured in the blue environment are transferred to the green environment post-switchover.</p></li><li><p><strong>Rollback</strong>: If the switchover is halted for any reason, all changes are reverted to maintain the integrity of both environments.</p></li></ol><p><strong>Best Practices</strong>:</p><ul><li><p>Thoroughly test resources in the green environment.</p></li><li><p>Monitor CloudWatch metrics.</p></li><li><p>Identify low-traffic periods for the switchover.</p></li><li><p>Ensure DB instances in both environments are healthy and available.</p></li><li><p>Keep DNS cache TTL to a maximum of five seconds.</p></li><li><p>Complete data loading before switchover.</p></li></ul><p>Note: Modifications to DB instances are not allowed during a switchover.</p><h2>Performing the Switchover</h2><p>To perform the switchover we need to select our Blue/Green Deployment in the console and then select &#8220;Switch Over&#8221; from the actions menu. I have my monitoring script running and I am still inserting records into the table on the Blue endpoint. </p><p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Mlx2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a0815ff-20eb-4fc4-934e-e7e1ae3b0586_2442x706.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Mlx2!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a0815ff-20eb-4fc4-934e-e7e1ae3b0586_2442x706.png 424w, https://substackcdn.com/image/fetch/$s_!Mlx2!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a0815ff-20eb-4fc4-934e-e7e1ae3b0586_2442x706.png 848w, https://substackcdn.com/image/fetch/$s_!Mlx2!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a0815ff-20eb-4fc4-934e-e7e1ae3b0586_2442x706.png 1272w, https://substackcdn.com/image/fetch/$s_!Mlx2!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a0815ff-20eb-4fc4-934e-e7e1ae3b0586_2442x706.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Mlx2!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a0815ff-20eb-4fc4-934e-e7e1ae3b0586_2442x706.png" width="1200" height="346.97802197802196" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8a0815ff-20eb-4fc4-934e-e7e1ae3b0586_2442x706.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:421,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:170858,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Mlx2!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a0815ff-20eb-4fc4-934e-e7e1ae3b0586_2442x706.png 424w, https://substackcdn.com/image/fetch/$s_!Mlx2!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a0815ff-20eb-4fc4-934e-e7e1ae3b0586_2442x706.png 848w, https://substackcdn.com/image/fetch/$s_!Mlx2!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a0815ff-20eb-4fc4-934e-e7e1ae3b0586_2442x706.png 1272w, https://substackcdn.com/image/fetch/$s_!Mlx2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a0815ff-20eb-4fc4-934e-e7e1ae3b0586_2442x706.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!qNv6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf535b34-bfb5-4a72-981f-1801b31f6cee_1438x1854.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!qNv6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf535b34-bfb5-4a72-981f-1801b31f6cee_1438x1854.png 424w, https://substackcdn.com/image/fetch/$s_!qNv6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf535b34-bfb5-4a72-981f-1801b31f6cee_1438x1854.png 848w, https://substackcdn.com/image/fetch/$s_!qNv6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf535b34-bfb5-4a72-981f-1801b31f6cee_1438x1854.png 1272w, https://substackcdn.com/image/fetch/$s_!qNv6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf535b34-bfb5-4a72-981f-1801b31f6cee_1438x1854.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!qNv6!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf535b34-bfb5-4a72-981f-1801b31f6cee_1438x1854.png" width="1200" height="1547.1488178025036" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bf535b34-bfb5-4a72-981f-1801b31f6cee_1438x1854.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:1854,&quot;width&quot;:1438,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:245241,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!qNv6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf535b34-bfb5-4a72-981f-1801b31f6cee_1438x1854.png 424w, https://substackcdn.com/image/fetch/$s_!qNv6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf535b34-bfb5-4a72-981f-1801b31f6cee_1438x1854.png 848w, https://substackcdn.com/image/fetch/$s_!qNv6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf535b34-bfb5-4a72-981f-1801b31f6cee_1438x1854.png 1272w, https://substackcdn.com/image/fetch/$s_!qNv6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf535b34-bfb5-4a72-981f-1801b31f6cee_1438x1854.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>We get an opportunity to review our changes and then we can just click &#8220;Switch over&#8221;</p><p>During the switchover, RDS runs guardrail checks, stops new write operations, drops and disallows new connections, waits for replication to sync, and renames DB instances and endpoints in both environments.</p><p>Let&#8217;s see how long that takes. </p><p></p><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;87807fd4-15a0-4cce-a6cf-3af13d859dbe&quot;,&quot;duration&quot;:null}"></div><p></p><p>Writes were unavailable in the video from 0:17 &#8594; 1:22 for a total of 1:05. Not too shabby. Reads were unavailable from 0:27&#8594; 1:22 for a total of 55seconds. My monitoring script saw about 2 seconds of outage, and due to bugs in the script that I&#8217;m not willing to resolve, its missed that its last check was stalled and waited too long for a timeout as the endpoint flipped over to the new instance. At the end I&#8217;m left with my production endpoint on 8.0 with my schema changes and my old 5.7 instance renamed to &#8220;old-busted-old1&#8221; still running 5.7! </p><p></p><h3><strong>Conclusion: Navigating Changes Seamlessly with AWS RDS's Blue/Green Feature</strong></h3><p>Embarking on database schema changes or version upgrades is often fraught with risks that could affect the availability and performance of your applications. This blog post has been a somewhat comprehensive guide on how to leverage the Blue/Green deployments feature in AWS RDS for MySQL to make these transitions as smooth as possible.</p><p>By following this approach, we've been able to update the MySQL version from 5.7.43 to 8.0.34 and alter the database schema&#8212;all while maintaining high availability. The Blue/Green feature, with its guardrails and rollback capabilities, ensures that the switchover is as risk-free as possible. Monitoring tools and best practices were also discussed to provide a holistic strategy for database migration and schema modification.</p><p>Key Takeaways:</p><ol><li><p><strong>Efficiency</strong>: The Blue/Green deployment feature allows you to make schema changes and version upgrades without significant downtime. In our test, the total connection unavailability was just 1 minute and 5 seconds.</p></li><li><p><strong>Safety Nets</strong>: The guardrails and timeout settings are invaluable for preventing unwanted disruptions and data inconsistencies. If something does go wrong, the process rolls back, ensuring data integrity.</p></li><li><p><strong>Monitoring</strong>: Real-time monitoring allows you to keep tabs on the switchover process and quickly react to any issues. </p></li><li><p><strong>Flexibility</strong>: This method is not just for large enterprises but is scalable to any size, as demonstrated using a db.t3.micro instance.</p></li><li><p><strong>Future-proof</strong>: The Blue/Green deployment strategy makes future changes easier to manage and less risky, setting you up for long-term success.</p></li></ol><p>As we near the End-of-Life for MySQL 5.7 on AWS RDS, this strategy offers a solid pathway to upgrade to newer versions. However it's worth considering a move to Aurora MySQL for even more robustness and flexibility, as discussed in my session at the AWS ANZ Summit 2023.</p><p>With these tools and strategies in your arsenal, may your databases always be available, and your schema changes forever be smooth!</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.123cloud.st/p/bluegreen-deployments-the-new-norm?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.123cloud.st/p/bluegreen-deployments-the-new-norm?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.123cloud.st/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.123cloud.st/subscribe?"><span>Subscribe now</span></a></p><div class="pullquote"><p>(Subscribing is Free and Helps me out a ton!)</p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.123cloud.st/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share&quot;,&quot;text&quot;:&quot;Share One Twenty Three Cloud Street&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.123cloud.st/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share One Twenty Three Cloud Street</span></a></p>]]></content:encoded></item><item><title><![CDATA[The Unexpectedly Direct Path to Building the APC ECU-3 Solar Data Collector]]></title><description><![CDATA[A commentary on why everything should have API's]]></description><link>https://www.123cloud.st/p/the-unexpectedly-direct-path-to-building</link><guid isPermaLink="false">https://www.123cloud.st/p/the-unexpectedly-direct-path-to-building</guid><dc:creator><![CDATA[Will Laws]]></dc:creator><pubDate>Sat, 15 Jul 2023 06:17:36 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6539d81-f48b-45f8-8973-87c91f6aea7f_3600x1308.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In the world of technology, the path to innovation is often paved with challenges. As a tech enthusiast, I've found that these challenges often act as catalysts, driving me to think creatively and develop solutions that push the boundaries of what's possible. My latest project, integrating data from an APC ECU-3 device with Home Assistant, is not an example of this.</p><p>The APC ECU-3 is an old and basic tool for those harnessing solar power. I&#8217;ve found that in Australia it&#8217;s unfortunately the device you&#8217;re likely to get <s>stuck with</s> installed with your panels. It very slowly provides <s>a wealth</s> some data about your solar power system. However, its lack of an API presented a <s>significant</s> challenge when it came to integrating this data with Home Assistant.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.123cloud.st/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading One Twenty Three Cloud Street! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TcZc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc024f2ca-349d-41ae-80fb-bafa014aed27_3130x1060.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TcZc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc024f2ca-349d-41ae-80fb-bafa014aed27_3130x1060.png 424w, https://substackcdn.com/image/fetch/$s_!TcZc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc024f2ca-349d-41ae-80fb-bafa014aed27_3130x1060.png 848w, https://substackcdn.com/image/fetch/$s_!TcZc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc024f2ca-349d-41ae-80fb-bafa014aed27_3130x1060.png 1272w, https://substackcdn.com/image/fetch/$s_!TcZc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc024f2ca-349d-41ae-80fb-bafa014aed27_3130x1060.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TcZc!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc024f2ca-349d-41ae-80fb-bafa014aed27_3130x1060.png" width="1200" height="406.31868131868134" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c024f2ca-349d-41ae-80fb-bafa014aed27_3130x1060.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:493,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:322128,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!TcZc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc024f2ca-349d-41ae-80fb-bafa014aed27_3130x1060.png 424w, https://substackcdn.com/image/fetch/$s_!TcZc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc024f2ca-349d-41ae-80fb-bafa014aed27_3130x1060.png 848w, https://substackcdn.com/image/fetch/$s_!TcZc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc024f2ca-349d-41ae-80fb-bafa014aed27_3130x1060.png 1272w, https://substackcdn.com/image/fetch/$s_!TcZc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc024f2ca-349d-41ae-80fb-bafa014aed27_3130x1060.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The system shows a screen like this when visiting its web page. The goal is to scrape all the info out of this table and import it into Home Assistant sensors. </p><p>I set out to build this bridge between this silly page and Home Assistant. This tool retrieves, parses, and formats the data from the APC ECU-3 device, transforming it into a JSON file that Home Assistant can interpret.</p><p>With no API to call, I had to get <s>creative</s> old school. I wrote a simple script using Python's requests module that fetches the data directly from the APC ECU-3 device's parameters page. The data returned was a <s>dense</s> basic HTML page filled with <s>valuable</s> basic information <s>hidden</s> directly exposed within an HTML table.</p><p>Next, I had to extract the required data points from this HTML table. BeautifulSoup, a Python library for parsing HTML, was instrumental here. It allowed me to sift through the HTML structure, identify the data table, and pull out the rows containing the information I needed.</p><p>I then transformed this data into a format that Home Assistant could understand. Using Python, I created a dictionary where the keys were the Inverter IDs and the values were lists containing the power data for each inverter. Then I had to remove  the units since Home Assistant will put its own units in place and I would get &#8220;140 W W&#8221; in my graphs. The final step in this process was to convert this dictionary into a JSON file and save it on the Home Assistant server in an accessible location so other scripts can access it.</p><p>To help others with the integration, I wrote another Python script that automates the generation of the relevant section of HA&#8217;s <code>configuration.yaml</code> file. This script reads the inverter IDs from the ECU and produces the corresponding sensor entries for the <code>configuration.yaml</code> file.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!LhN9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11346898-499a-416e-8053-a5f07bafa7ab_1110x1344.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!LhN9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11346898-499a-416e-8053-a5f07bafa7ab_1110x1344.png 424w, https://substackcdn.com/image/fetch/$s_!LhN9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11346898-499a-416e-8053-a5f07bafa7ab_1110x1344.png 848w, https://substackcdn.com/image/fetch/$s_!LhN9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11346898-499a-416e-8053-a5f07bafa7ab_1110x1344.png 1272w, https://substackcdn.com/image/fetch/$s_!LhN9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11346898-499a-416e-8053-a5f07bafa7ab_1110x1344.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!LhN9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11346898-499a-416e-8053-a5f07bafa7ab_1110x1344.png" width="1110" height="1344" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/11346898-499a-416e-8053-a5f07bafa7ab_1110x1344.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1344,&quot;width&quot;:1110,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:427803,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!LhN9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11346898-499a-416e-8053-a5f07bafa7ab_1110x1344.png 424w, https://substackcdn.com/image/fetch/$s_!LhN9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11346898-499a-416e-8053-a5f07bafa7ab_1110x1344.png 848w, https://substackcdn.com/image/fetch/$s_!LhN9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11346898-499a-416e-8053-a5f07bafa7ab_1110x1344.png 1272w, https://substackcdn.com/image/fetch/$s_!LhN9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11346898-499a-416e-8053-a5f07bafa7ab_1110x1344.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Not exactly difficult, but it is tedious if you&#8217;re unfamiliar with my janky setup.</p><p>In Home Assistant, I set up an automation to run the Python script every minute. This ensured that the solar power data in Home Assistant was <s>always up-to-date</s> as updated as possible since the ECU doesn&#8217;t seem to provide regular updates and often fails to provide any data. The automation, coupled with the sensor entries generated by the Python script, allowed the raw APC ECU-3 data to be leveraged within Home Assistant.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!xGle!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6539d81-f48b-45f8-8973-87c91f6aea7f_3600x1308.png" data-component-name="Image2ToDOM"><div class="image2-inset image2-full-screen"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!xGle!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6539d81-f48b-45f8-8973-87c91f6aea7f_3600x1308.png 424w, https://substackcdn.com/image/fetch/$s_!xGle!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6539d81-f48b-45f8-8973-87c91f6aea7f_3600x1308.png 848w, https://substackcdn.com/image/fetch/$s_!xGle!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6539d81-f48b-45f8-8973-87c91f6aea7f_3600x1308.png 1272w, https://substackcdn.com/image/fetch/$s_!xGle!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6539d81-f48b-45f8-8973-87c91f6aea7f_3600x1308.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!xGle!,w_5760,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6539d81-f48b-45f8-8973-87c91f6aea7f_3600x1308.png" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c6539d81-f48b-45f8-8973-87c91f6aea7f_3600x1308.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;full&quot;,&quot;height&quot;:529,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:562343,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-fullscreen" alt="" srcset="https://substackcdn.com/image/fetch/$s_!xGle!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6539d81-f48b-45f8-8973-87c91f6aea7f_3600x1308.png 424w, https://substackcdn.com/image/fetch/$s_!xGle!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6539d81-f48b-45f8-8973-87c91f6aea7f_3600x1308.png 848w, https://substackcdn.com/image/fetch/$s_!xGle!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6539d81-f48b-45f8-8973-87c91f6aea7f_3600x1308.png 1272w, https://substackcdn.com/image/fetch/$s_!xGle!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6539d81-f48b-45f8-8973-87c91f6aea7f_3600x1308.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Upon completion, I successfully managed to plot the power output of each solar panel!</p><p>Developing the APC ECU-3 Data Reader was a journey filled with <s>challenges</s> boring scripting and hack-y methods. There's still plenty of room for improvement - but at this point, I need your help!</p><p>There's an existing project, the <strong><a href="https://github.com/ksheumaker/homeassistant-apsystems_ecur">APSystems ECU-R component for Home Assistant</a></strong>, which supports models with APIs. Unfortunately, the APC ECU-3 model isn't yet supported. But with our collective effort, we can expand its support to include the APC ECU-3.</p><p>So, if you're a fellow tech enthusiast, a developer, or someone with a knack for tackling challenges, <strong>I have an ask for you!</strong> I invite you to contribute. Whether it's improving the current project or adding support for the APC ECU-3 to the APSystems ECU-R component, your contribution can make a difference.</p><p>You can find the source code here: <a href="https://github.com/jeeshofone/ha-apc-ecu-3">https://github.com/jeeshofone/ha-apc-ecu-3</a> <strong>Please reach out if you have an APC ECU-3 and found this helpful or want to help improve the project. </strong></p><p>(I also don&#8217;t want to have sole ownership of this <a href="https://www.123cloud.st/p/tech-debt-is-good">technical line of credit</a>)</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.123cloud.st/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading One Twenty Three Cloud Street! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[vim's hidden gems]]></title><description><![CDATA[Unleashing the Power of a Legendary Text Editor]]></description><link>https://www.123cloud.st/p/vims-hidden-gems</link><guid isPermaLink="false">https://www.123cloud.st/p/vims-hidden-gems</guid><dc:creator><![CDATA[Will Laws]]></dc:creator><pubDate>Sat, 25 Mar 2023 04:21:17 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/0c365fdd-d201-4260-acf5-fef52a0d9e4c_1040x842.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I really love vim. They say people struggle to quit vim, but I can't quit using vim &#8211; it's too addictive! <em>&lt;audience groaning intensifies&gt; </em></p><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.123cloud.st/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading One Twenty Three Cloud Street! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>I&#8217;ve been using vim since I started using linux back in the knoppix 3.x days and I wanted to share a quick list of vim related tips.  I&#8217;ll start off easy and get more advanced as I go. </p><h2>Basic</h2><ol><li><p><strong>Opening Vim</strong>: </p><ol><li><p>To open Vim in your terminal, simply type <code>vim</code>. To open a specific file, type <code>vim filename</code>.</p></li></ol></li><li><p><strong>Vim modes</strong>: </p><ol><li><p>Vim has several modes, but the most important ones are Normal mode, Insert mode, and Command-line mode.</p><ul><li><p><strong>Normal mode</strong>: The default mode when you start Vim. You can use commands and navigate the text without editing it.</p></li><li><p><strong>Insert mode</strong>: In this mode, you can insert text like a regular text editor. To enter Insert mode, press <code>i</code> in Normal mode.</p></li><li><p><strong>Command-line mode</strong>: Used to execute commands, save files, and more. Press <code>:</code> in Normal mode to enter Command-line mode.</p></li></ul></li></ol></li><li><p><strong>Basic navigation</strong>: </p><ol><li><p>In Normal mode, you can navigate using the following keys:</p><ul><li><p><code>h</code> - move left</p></li><li><p><code>j</code> - move down</p></li><li><p><code>k</code> - move up</p></li><li><p><code>l</code> - move right You can also use the arrow keys, but using <code>h</code>, <code>j</code>, <code>k</code>, <code>l</code> allows you to keep your hands on the home row.</p></li></ul></li></ol></li><li><p><strong>Inserting text</strong>: </p><ol><li><p>Press <code>i</code> to enter Insert mode and type as you would in any other text editor. To exit Insert mode and return to Normal mode, press <code>Esc</code>.</p></li></ol></li><li><p><strong>Saving and quitting</strong>: </p><ol><li><p>In Normal mode, press <code>:</code> to enter Command-line mode, then:</p><ul><li><p>To save a file, type <code>w</code> and press <code>Enter</code>.</p></li><li><p>To quit without saving, type <code>q</code> and press <code>Enter</code>.</p></li><li><p>To save and quit, type <code>wq</code> and press <code>Enter</code>.</p></li><li><p>To force quit without saving, type <code>q!</code> and press <code>Enter</code>.</p></li></ul></li></ol></li><li><p><strong>Basic editing</strong>: </p><ol><li><p>In Normal mode, you can perform various editing operations, such as:</p><ul><li><p><code>dd</code> - delete the current line</p></li><li><p><code>yy</code> - yank (copy) the current line</p></li><li><p><code>p</code> - paste the yanked text after the current line</p></li><li><p><code>u</code> - undo the last change</p></li><li><p><code>Ctrl + r</code> - redo the last undone change</p></li></ul></li></ol></li><li><p><strong>Searching</strong>: </p><ol><li><p>In Normal mode, you can search for text:</p><ul><li><p><code>/search_term</code> - search forward for the term</p></li><li><p><code>?search_term</code> - search backward for the term</p></li><li><p><code>n</code> - move to the next occurrence of the search term</p></li><li><p><code>N</code> - move to the previous occurrence of the search term</p></li></ul></li></ol></li></ol><p></p><h2>Pro</h2><ol><li><p><strong>Visual block selection</strong>: </p><ol><li><p>To select a block of text, first press <code>Ctrl + v</code> in Normal mode to enter Visual Block mode. Then, move the cursor to define the rectangular selection. You can use <code>h</code>, <code>j</code>, <code>k</code>, <code>l</code>, or the arrow keys to move the cursor.</p><ul><li><p>I really really really really love visual block mode. Block editing in Vim can be powerful and efficient when working with columns or multiple lines. </p></li></ul></li></ol></li><li><p><strong>Inserting text</strong>: </p><ol><li><p>With a visual block selected, press <code>I</code> to insert text before the selected block. Type the text you want to insert, then press <code>Esc</code>. Vim will insert the text on each line of the block.</p></li></ol></li><li><p><strong>Appending text</strong>: </p><ol><li><p>Similarly, with a visual block selected, press <code>A</code> to append text after the selected block. Type the text you want to append, then press <code>Esc</code>. Vim will append the text on each line of the block.</p></li></ol></li><li><p><strong>Deleting a block</strong>: </p><ol><li><p>To delete the selected block of text, press <code>d</code> or <code>x</code> in Visual Block mode. This will delete the rectangular selection.</p></li></ol></li><li><p><strong>Changing text</strong>: </p><ol><li><p>To change the selected block of text, press <code>c</code> in Visual Block mode. This will delete the block and enter Insert mode, allowing you to type new text. After typing, press <code>Esc</code> to apply the change to all lines in the block.</p></li></ol></li><li><p><strong>Indenting and dedenting</strong>: </p><ol><li><p>To indent or dedent a visual block, select the block in Visual Block mode and press <code>&gt;</code> to indent or <code>&lt;</code> to dedent. You can also prefix these commands with a number to specify the number of indentation levels, like <code>3&gt;</code> for three levels of indentation.</p></li></ol></li><li><p><strong>Columnar search and replace</strong>: </p><ol><li><p>Perform a search and replace operation within the selected visual block by first selecting the block and then typing <code>:s/search/replace/g</code>. Press <code>Enter</code> to execute the command.</p><p></p></li></ol></li></ol><h2>Advanced</h2><ol><li><p><strong>Macros</strong>: </p><ol><li><p>Macros allow you to record a series of keystrokes and replay them to automate repetitive tasks. To record a macro, press <code>q</code> followed by a register name (a lowercase letter) in Normal mode, e.g., <code>qa</code>. Perform the desired actions, then press <code>q</code> again to stop recording. To replay the macro, press <code>@</code> followed by the register name, e.g., <code>@a</code>.</p></li></ol></li><li><p><strong>Split windows</strong>: </p><ol><li><p>Vim supports split windows, allowing you to view and edit multiple files or different parts of the same file simultaneously. Use the following commands to manage split windows:</p><ul><li><p><code>:split</code> or <code>:sp</code> - open a horizontal split</p></li><li><p><code>:vsplit</code> or <code>:vs</code> - open a vertical split</p></li><li><p><code>Ctrl + w</code> followed by <code>h</code>, <code>j</code>, <code>k</code>, or <code>l</code> to navigate between splits</p></li></ul></li></ol></li><li><p><strong>Tab pages</strong>: </p><ol><li><p>Tab pages are another way to work with multiple files. Each tab page can contain multiple split windows. Use the following commands to manage tab pages:</p><ul><li><p><code>:tabnew</code> or <code>:tabe</code> - open a new tab page</p></li><li><p><code>gt</code> or <code>:tabn</code> - go to the next tab page</p></li><li><p><code>gT</code> or <code>:tabp</code> - go to the previous tab page</p></li><li><p><code>:tabc</code> - close the current tab page</p></li></ul></li></ol></li><li><p><strong>Folding</strong>: </p><ol><li><p>Folding allows you to collapse and expand sections of code or text, making it easier to navigate and manage large files. There are several folding methods available in Vim, including manual, syntax-based, and expression-based folding. Use the following commands to manage folds:</p><ul><li><p><code>za</code> - toggle the fold at the cursor</p></li><li><p><code>zR</code> - open all folds</p></li><li><p><code>zM</code> - close all folds</p></li><li><p><code>zj</code> - move to the next fold</p></li><li><p><code>zk</code> - move to the previous fold</p></li></ul></li></ol></li><li><p><strong>Text objects</strong>: </p><ol><li><p>Text objects allow you to operate on specific portions of text, such as words, sentences, paragraphs, or blocks. They can be used with commands like <code>d</code>, <code>c</code>, <code>y</code>, and <code>v</code>. Examples of text objects include:</p><ul><li><p><code>aw</code> - a word</p></li><li><p><code>as</code> - a sentence</p></li><li><p><code>ap</code> - a paragraph</p></li><li><p><code>a(</code> or <code>a)</code> - a block enclosed by parentheses</p></li><li><p><code>a[</code> or <code>a]</code> - a block enclosed by square brackets</p></li></ul></li></ol></li><li><p><strong>Command-line window</strong>: </p><ol><li><p>The command-line window allows you to edit and navigate command-line history. Access it by pressing <code>q:</code> in Normal mode. You can edit and execute previous commands or search through your command history.</p></li></ol></li><li><p><strong>Persistent undo</strong>: </p><ol><li><p>Vim can store your undo history across sessions, allowing you to undo and redo changes even after closing and reopening a file. To enable this feature, add the following lines to your <code>.vimrc</code> file:<br><code>set undofile</code></p><p><code>set undodir=~/.vim/undodir</code></p></li><li><p>Ensure that the <code>undodir</code> directory exists or create it if necessary.</p></li></ol></li></ol><p></p><h2>vimspert</h2><ol><li><p><strong>Omni completion</strong>: </p><ol><li><p>Vim offers context-aware autocompletion through omni completion. Press <code>Ctrl + x</code> followed by <code>Ctrl + o</code> in Insert mode to trigger omni completion. For programming languages, you may need to install additional plugins or configure Vim to provide relevant suggestions.</p></li></ol></li><li><p><strong>Quickfix list and location list</strong>: </p><ol><li><p>Vim's quickfix list stores errors, warnings, or search results from various sources, such as compilers or grep-like tools. The location list is similar but specific to individual windows. Use the following commands to work with quickfix and location lists:</p><ul><li><p><code>:copen</code> - open the quickfix window</p></li><li><p><code>:cclose</code> - close the quickfix window</p></li><li><p><code>:cnext</code> - move to the next item in the quickfix list</p></li><li><p><code>:cprev</code> - move to the previous item in the quickfix list</p></li><li><p><code>:lopen</code>, <code>:lclose</code>, <code>:lnext</code>, <code>:lprev</code> - same commands for location lists</p></li></ul></li></ol></li><li><p><strong>Vim sessions</strong>: </p><ol><li><p>Vim sessions allow you to save your current editing environment, including open files, window layout, and options, so you can quickly restore it later. Use the following commands to manage sessions:</p><ul><li><p><code>:mksession session_name.vim</code> - save the current session</p></li><li><p><code>:source session_name.vim</code> - restore a saved session</p></li></ul></li></ol></li><li><p><strong>Marks</strong>: </p><ol><li><p>Marks are used to bookmark specific positions in a file or across multiple files. Lowercase marks are local to a file, while uppercase marks are global. Use the following commands to work with marks:</p><ul><li><p><code>m{a-zA-Z}</code> - set a mark at the cursor position, e.g., <code>ma</code> or <code>mA</code></p></li><li><p><code>'{a-z}</code> or '<code>{a-z}</code> - jump to a lowercase mark in the current file</p></li><li><p><code>'{A-Z}</code> or '<code>{A-Z}</code> - jump to an uppercase mark in any file</p></li></ul></li></ol></li><li><p><strong>Mappings</strong>: </p><ol><li><p>Mappings allow you to define custom keybindings or modify existing ones in Vim. You can create mappings for different modes using commands like <code>:map</code>, <code>:nmap</code>, <code>:imap</code>, <code>:vmap</code>, etc. For example, to map <code>jj</code> to <code>Esc</code> in Insert mode, add the following line to your <code>.vimrc</code> file:</p><p><code>inoremap jj &lt;Esc&gt;</code></p></li></ol></li><li><p><strong>Registers</strong>: </p><ol><li><p>Registers are storage locations that can hold text, macros, or other data. Vim has multiple registers, such as unnamed, named, numbered, read-only, and expression registers. To access or manipulate registers, use the following commands:</p><ul><li><p><code>"{a-z0-9}%#:-=.</code> - specify a register, e.g., <code>"ayy</code> to yank the current line into register <code>a</code></p></li><li><p><code>:reg</code> or <code>:registers</code> - display the contents of all registers</p></li><li><p><code>:echo @a</code> - display the contents of a specific register, e.g., register <code>a</code></p></li></ul></li></ol></li><li><p><strong>Plugins</strong>: </p><ol><li><p>Vim has a vibrant plugin ecosystem that can extend its functionality. Popular plugin managers include Vim Plug, Pathogen, and Vundle. Some notable Vim plugins are NERDTree (file explorer), CtrlP (fuzzy file finder), and YouCompleteMe (code completion). </p></li><li><p>Checkout </p><p><a href="https://vimawesome.com/">https://vimawesome.com/</a> for some truely epic plugins. </p></li></ol></li></ol><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!iW-x!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17f7745b-54a6-42d9-b07b-8702b1e1dd1a_2116x1652.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!iW-x!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17f7745b-54a6-42d9-b07b-8702b1e1dd1a_2116x1652.png 424w, https://substackcdn.com/image/fetch/$s_!iW-x!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17f7745b-54a6-42d9-b07b-8702b1e1dd1a_2116x1652.png 848w, https://substackcdn.com/image/fetch/$s_!iW-x!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17f7745b-54a6-42d9-b07b-8702b1e1dd1a_2116x1652.png 1272w, https://substackcdn.com/image/fetch/$s_!iW-x!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17f7745b-54a6-42d9-b07b-8702b1e1dd1a_2116x1652.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!iW-x!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17f7745b-54a6-42d9-b07b-8702b1e1dd1a_2116x1652.png" width="1456" height="1137" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/17f7745b-54a6-42d9-b07b-8702b1e1dd1a_2116x1652.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1137,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:442512,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!iW-x!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17f7745b-54a6-42d9-b07b-8702b1e1dd1a_2116x1652.png 424w, https://substackcdn.com/image/fetch/$s_!iW-x!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17f7745b-54a6-42d9-b07b-8702b1e1dd1a_2116x1652.png 848w, https://substackcdn.com/image/fetch/$s_!iW-x!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17f7745b-54a6-42d9-b07b-8702b1e1dd1a_2116x1652.png 1272w, https://substackcdn.com/image/fetch/$s_!iW-x!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17f7745b-54a6-42d9-b07b-8702b1e1dd1a_2116x1652.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><h2>Conclusion<br></h2><p>This is just a brief introduction to using Vim. There are many more commands, features, and customizations available. To learn more about Vim, you can refer to its extensive documentation by typing <code>vimtutor</code> in the terminal!  And NO! I won&#8217;t tell you how to quit vim, its too good to stop using. </p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.123cloud.st/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading One Twenty Three Cloud Street! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[ChatGPT Tackles xkcd's 'What If'?]]></title><description><![CDATA[I asked ChatGPT some of the most interesting "What If" Questions: Here are the Answers]]></description><link>https://www.123cloud.st/p/chatgpt-tackles-xkcds-what-if</link><guid isPermaLink="false">https://www.123cloud.st/p/chatgpt-tackles-xkcds-what-if</guid><dc:creator><![CDATA[Will Laws]]></dc:creator><pubDate>Wed, 28 Dec 2022 03:47:56 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!GlbV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fba8df93b-835b-428b-a452-65c7807073d0_1012x397.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><em>I end up doing quite a bit of professional writing at the end of the year and to take a break I decided to jump on the ChatGPT bandwagon - I hope you enjoy reading this as it was quite fun to put together. </em></p><div><hr></div><p>ChatGPT from OpenAI is quickly becoming a household name, and if you haven't heard of it yet, you're in for a treat. Its amazing and accurate responses are captivating audiences, but there's still a lot of potential for growth and improvement.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.123cloud.st/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">One Twenty Three Cloud Street is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p><p>If you're not familiar with xkcd's "What If?" series, it's a popular webcomic that tackles all sorts of science- and math-related questions with a humorous and informative approach. In this post, we'll be using ChatGPT to answer a selection of questions from &#8220;What If?&#8221; and see how far it can go.</p><p></p><p>Lets start with something simple.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!GlbV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fba8df93b-835b-428b-a452-65c7807073d0_1012x397.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GlbV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fba8df93b-835b-428b-a452-65c7807073d0_1012x397.png 424w, https://substackcdn.com/image/fetch/$s_!GlbV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fba8df93b-835b-428b-a452-65c7807073d0_1012x397.png 848w, https://substackcdn.com/image/fetch/$s_!GlbV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fba8df93b-835b-428b-a452-65c7807073d0_1012x397.png 1272w, https://substackcdn.com/image/fetch/$s_!GlbV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fba8df93b-835b-428b-a452-65c7807073d0_1012x397.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!GlbV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fba8df93b-835b-428b-a452-65c7807073d0_1012x397.png" width="1012" height="397" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/ba8df93b-835b-428b-a452-65c7807073d0_1012x397.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:397,&quot;width&quot;:1012,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:77971,&quot;alt&quot;:&quot;You can't talk about xkcd without alt text on your images, that would be illegal.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="You can't talk about xkcd without alt text on your images, that would be illegal." title="You can't talk about xkcd without alt text on your images, that would be illegal." srcset="https://substackcdn.com/image/fetch/$s_!GlbV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fba8df93b-835b-428b-a452-65c7807073d0_1012x397.png 424w, https://substackcdn.com/image/fetch/$s_!GlbV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fba8df93b-835b-428b-a452-65c7807073d0_1012x397.png 848w, https://substackcdn.com/image/fetch/$s_!GlbV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fba8df93b-835b-428b-a452-65c7807073d0_1012x397.png 1272w, https://substackcdn.com/image/fetch/$s_!GlbV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fba8df93b-835b-428b-a452-65c7807073d0_1012x397.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Compare that with the xkcd about page: </p><blockquote><p>&#8220;It's not actually an acronym. It's just a word with no phonetic pronunciation -- a treasured and carefully-guarded point in the space of four-character strings.&#8221;</p><p>&#8220;For those of us pedantic enough to want a rule, here it is: The preferred form is "xkcd", all lower-case. In formal contexts where a lowercase word shouldn't start a sentence, "XKCD" is an okay alternative. "Xkcd" is frowned upon.&#8221;</p><p><em><a href="https://xkcd.com/about/">https://xkcd.com/about/</a></em></p></blockquote><p></p><p>The description of the comic may be accurate, but the origin of the name appears to be entirely fabricated. <strong>Now, lets get to the fun part</strong></p><div><hr></div><h2><a href="https://what-if.xkcd.com/57/">Dropping A Mountain</a></h2><blockquote><p>What if a huge mountain&#8212;Denali, say&#8212;had the bottom inch of its base disappear? What would happen from the impact of the mountain falling 1 inch? What about 1 foot? What if the mountain's base were raised to the present height of the summit, and then the whole thing were allowed to drop to the earth?</p></blockquote><p>Get ready to laugh. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!sH8P!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1e2c8658-c2d3-4afa-b28f-067b1af1405c_913x601.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!sH8P!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1e2c8658-c2d3-4afa-b28f-067b1af1405c_913x601.png 424w, https://substackcdn.com/image/fetch/$s_!sH8P!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1e2c8658-c2d3-4afa-b28f-067b1af1405c_913x601.png 848w, https://substackcdn.com/image/fetch/$s_!sH8P!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1e2c8658-c2d3-4afa-b28f-067b1af1405c_913x601.png 1272w, https://substackcdn.com/image/fetch/$s_!sH8P!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1e2c8658-c2d3-4afa-b28f-067b1af1405c_913x601.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!sH8P!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1e2c8658-c2d3-4afa-b28f-067b1af1405c_913x601.png" width="913" height="601" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/1e2c8658-c2d3-4afa-b28f-067b1af1405c_913x601.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:601,&quot;width&quot;:913,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:132920,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!sH8P!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1e2c8658-c2d3-4afa-b28f-067b1af1405c_913x601.png 424w, https://substackcdn.com/image/fetch/$s_!sH8P!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1e2c8658-c2d3-4afa-b28f-067b1af1405c_913x601.png 848w, https://substackcdn.com/image/fetch/$s_!sH8P!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1e2c8658-c2d3-4afa-b28f-067b1af1405c_913x601.png 1272w, https://substackcdn.com/image/fetch/$s_!sH8P!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1e2c8658-c2d3-4afa-b28f-067b1af1405c_913x601.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Mountains can float because gravity will hold them in place. To be fair, no one has tried to make a 1 foot gap at the base of a mountain to test this. [Citation Needed]</p><div><hr></div><p></p><h2><a href="https://what-if.xkcd.com/144/">Saliva Pool</a></h2><blockquote><p>How long would it take for a single person to fill up an entire swimming pool with their own saliva?</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!jkUZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fad9633ec-06e5-4021-9da7-11e8b28dd47f_970x408.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jkUZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fad9633ec-06e5-4021-9da7-11e8b28dd47f_970x408.png 424w, https://substackcdn.com/image/fetch/$s_!jkUZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fad9633ec-06e5-4021-9da7-11e8b28dd47f_970x408.png 848w, https://substackcdn.com/image/fetch/$s_!jkUZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fad9633ec-06e5-4021-9da7-11e8b28dd47f_970x408.png 1272w, https://substackcdn.com/image/fetch/$s_!jkUZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fad9633ec-06e5-4021-9da7-11e8b28dd47f_970x408.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!jkUZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fad9633ec-06e5-4021-9da7-11e8b28dd47f_970x408.png" width="970" height="408" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/ad9633ec-06e5-4021-9da7-11e8b28dd47f_970x408.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:408,&quot;width&quot;:970,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:85952,&quot;alt&quot;:&quot;yawnnnnn, can't even have fun with that answer&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="yawnnnnn, can't even have fun with that answer" title="yawnnnnn, can't even have fun with that answer" srcset="https://substackcdn.com/image/fetch/$s_!jkUZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fad9633ec-06e5-4021-9da7-11e8b28dd47f_970x408.png 424w, https://substackcdn.com/image/fetch/$s_!jkUZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fad9633ec-06e5-4021-9da7-11e8b28dd47f_970x408.png 848w, https://substackcdn.com/image/fetch/$s_!jkUZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fad9633ec-06e5-4021-9da7-11e8b28dd47f_970x408.png 1272w, https://substackcdn.com/image/fetch/$s_!jkUZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fad9633ec-06e5-4021-9da7-11e8b28dd47f_970x408.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Ok lets give it some more information..</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!PquQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff27f5c35-17c0-4954-be85-9360b0d7933a_806x696.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!PquQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff27f5c35-17c0-4954-be85-9360b0d7933a_806x696.png 424w, https://substackcdn.com/image/fetch/$s_!PquQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff27f5c35-17c0-4954-be85-9360b0d7933a_806x696.png 848w, https://substackcdn.com/image/fetch/$s_!PquQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff27f5c35-17c0-4954-be85-9360b0d7933a_806x696.png 1272w, https://substackcdn.com/image/fetch/$s_!PquQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff27f5c35-17c0-4954-be85-9360b0d7933a_806x696.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!PquQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff27f5c35-17c0-4954-be85-9360b0d7933a_806x696.png" width="806" height="696" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/f27f5c35-17c0-4954-be85-9360b0d7933a_806x696.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:696,&quot;width&quot;:806,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:162485,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!PquQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff27f5c35-17c0-4954-be85-9360b0d7933a_806x696.png 424w, https://substackcdn.com/image/fetch/$s_!PquQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff27f5c35-17c0-4954-be85-9360b0d7933a_806x696.png 848w, https://substackcdn.com/image/fetch/$s_!PquQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff27f5c35-17c0-4954-be85-9360b0d7933a_806x696.png 1272w, https://substackcdn.com/image/fetch/$s_!PquQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff27f5c35-17c0-4954-be85-9360b0d7933a_806x696.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This math is off by about an order of 100. It should take ~8300 years not 8.3. ChatGPT is not good at math. This response is after I taught it some proper multiplication.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!f6CF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3d9fdf75-f33f-4272-b0d1-131b71152d3b_796x962.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!f6CF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3d9fdf75-f33f-4272-b0d1-131b71152d3b_796x962.png 424w, https://substackcdn.com/image/fetch/$s_!f6CF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3d9fdf75-f33f-4272-b0d1-131b71152d3b_796x962.png 848w, https://substackcdn.com/image/fetch/$s_!f6CF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3d9fdf75-f33f-4272-b0d1-131b71152d3b_796x962.png 1272w, https://substackcdn.com/image/fetch/$s_!f6CF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3d9fdf75-f33f-4272-b0d1-131b71152d3b_796x962.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!f6CF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3d9fdf75-f33f-4272-b0d1-131b71152d3b_796x962.png" width="796" height="962" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/3d9fdf75-f33f-4272-b0d1-131b71152d3b_796x962.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:962,&quot;width&quot;:796,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:195686,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!f6CF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3d9fdf75-f33f-4272-b0d1-131b71152d3b_796x962.png 424w, https://substackcdn.com/image/fetch/$s_!f6CF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3d9fdf75-f33f-4272-b0d1-131b71152d3b_796x962.png 848w, https://substackcdn.com/image/fetch/$s_!f6CF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3d9fdf75-f33f-4272-b0d1-131b71152d3b_796x962.png 1272w, https://substackcdn.com/image/fetch/$s_!f6CF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3d9fdf75-f33f-4272-b0d1-131b71152d3b_796x962.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Please don&#8217;t rely on ChatGPT for math.</p><div><hr></div><h2><a href="https://what-if.xkcd.com/102/">Keyboard Power</a></h2><blockquote><p>As a writer, I'm wondering what would be the cumulative energy of the hundreds of thousands of keystrokes required to write a novel.</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!qknm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa85f611e-9f11-4aca-abbd-f6f399b348e0_993x924.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!qknm!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa85f611e-9f11-4aca-abbd-f6f399b348e0_993x924.png 424w, https://substackcdn.com/image/fetch/$s_!qknm!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa85f611e-9f11-4aca-abbd-f6f399b348e0_993x924.png 848w, https://substackcdn.com/image/fetch/$s_!qknm!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa85f611e-9f11-4aca-abbd-f6f399b348e0_993x924.png 1272w, https://substackcdn.com/image/fetch/$s_!qknm!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa85f611e-9f11-4aca-abbd-f6f399b348e0_993x924.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!qknm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa85f611e-9f11-4aca-abbd-f6f399b348e0_993x924.png" width="993" height="924" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/a85f611e-9f11-4aca-abbd-f6f399b348e0_993x924.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:924,&quot;width&quot;:993,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:188890,&quot;alt&quot;:&quot;someone tell me how much energy I wasted writing this post..&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="someone tell me how much energy I wasted writing this post.." title="someone tell me how much energy I wasted writing this post.." srcset="https://substackcdn.com/image/fetch/$s_!qknm!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa85f611e-9f11-4aca-abbd-f6f399b348e0_993x924.png 424w, https://substackcdn.com/image/fetch/$s_!qknm!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa85f611e-9f11-4aca-abbd-f6f399b348e0_993x924.png 848w, https://substackcdn.com/image/fetch/$s_!qknm!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa85f611e-9f11-4aca-abbd-f6f399b348e0_993x924.png 1272w, https://substackcdn.com/image/fetch/$s_!qknm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa85f611e-9f11-4aca-abbd-f6f399b348e0_993x924.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Even if you help it along by providing missing information, it can&#8217;t handle the analysis. </p><div><hr></div><h2><strong><a href="https://what-if.xkcd.com/4/">A Mole of Moles</a></strong></h2><blockquote><p>What would happen if you were to gather a mole (unit of measurement) of moles (the small furry critter) in one place?</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!k9Kg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2594b1ac-4df5-4210-b33d-3d08f50a879a_980x804.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!k9Kg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2594b1ac-4df5-4210-b33d-3d08f50a879a_980x804.png 424w, https://substackcdn.com/image/fetch/$s_!k9Kg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2594b1ac-4df5-4210-b33d-3d08f50a879a_980x804.png 848w, https://substackcdn.com/image/fetch/$s_!k9Kg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2594b1ac-4df5-4210-b33d-3d08f50a879a_980x804.png 1272w, https://substackcdn.com/image/fetch/$s_!k9Kg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2594b1ac-4df5-4210-b33d-3d08f50a879a_980x804.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!k9Kg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2594b1ac-4df5-4210-b33d-3d08f50a879a_980x804.png" width="980" height="804" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/2594b1ac-4df5-4210-b33d-3d08f50a879a_980x804.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:804,&quot;width&quot;:980,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:162302,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!k9Kg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2594b1ac-4df5-4210-b33d-3d08f50a879a_980x804.png 424w, https://substackcdn.com/image/fetch/$s_!k9Kg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2594b1ac-4df5-4210-b33d-3d08f50a879a_980x804.png 848w, https://substackcdn.com/image/fetch/$s_!k9Kg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2594b1ac-4df5-4210-b33d-3d08f50a879a_980x804.png 1272w, https://substackcdn.com/image/fetch/$s_!k9Kg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2594b1ac-4df5-4210-b33d-3d08f50a879a_980x804.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Hard to believe but this is actually a fun answer. </p><div><hr></div><h2><a href="https://what-if.xkcd.com/1/">Relativistic Baseball</a></h2><blockquote><p>What would happen if you tried to hit a baseball pitched at 90% the speed of light?</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!MC4-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9f1ce370-5217-48d4-af47-40732ac75227_998x387.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!MC4-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9f1ce370-5217-48d4-af47-40732ac75227_998x387.png 424w, https://substackcdn.com/image/fetch/$s_!MC4-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9f1ce370-5217-48d4-af47-40732ac75227_998x387.png 848w, https://substackcdn.com/image/fetch/$s_!MC4-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9f1ce370-5217-48d4-af47-40732ac75227_998x387.png 1272w, https://substackcdn.com/image/fetch/$s_!MC4-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9f1ce370-5217-48d4-af47-40732ac75227_998x387.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!MC4-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9f1ce370-5217-48d4-af47-40732ac75227_998x387.png" width="998" height="387" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/9f1ce370-5217-48d4-af47-40732ac75227_998x387.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:387,&quot;width&quot;:998,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:84511,&quot;alt&quot;:&quot;I mean, Randall did imagine this pretty well...&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="I mean, Randall did imagine this pretty well..." title="I mean, Randall did imagine this pretty well..." srcset="https://substackcdn.com/image/fetch/$s_!MC4-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9f1ce370-5217-48d4-af47-40732ac75227_998x387.png 424w, https://substackcdn.com/image/fetch/$s_!MC4-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9f1ce370-5217-48d4-af47-40732ac75227_998x387.png 848w, https://substackcdn.com/image/fetch/$s_!MC4-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9f1ce370-5217-48d4-af47-40732ac75227_998x387.png 1272w, https://substackcdn.com/image/fetch/$s_!MC4-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9f1ce370-5217-48d4-af47-40732ac75227_998x387.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Lets help it out a bit with some of the conditions laid out in Randall&#8217;s original post.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!z3kg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd769572a-9f81-48e9-9d19-f1dee0637bda_913x1039.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!z3kg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd769572a-9f81-48e9-9d19-f1dee0637bda_913x1039.png 424w, https://substackcdn.com/image/fetch/$s_!z3kg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd769572a-9f81-48e9-9d19-f1dee0637bda_913x1039.png 848w, https://substackcdn.com/image/fetch/$s_!z3kg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd769572a-9f81-48e9-9d19-f1dee0637bda_913x1039.png 1272w, https://substackcdn.com/image/fetch/$s_!z3kg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd769572a-9f81-48e9-9d19-f1dee0637bda_913x1039.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!z3kg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd769572a-9f81-48e9-9d19-f1dee0637bda_913x1039.png" width="913" height="1039" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/d769572a-9f81-48e9-9d19-f1dee0637bda_913x1039.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1039,&quot;width&quot;:913,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:223728,&quot;alt&quot;:&quot;seems like the AI wants to move on&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="seems like the AI wants to move on" title="seems like the AI wants to move on" srcset="https://substackcdn.com/image/fetch/$s_!z3kg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd769572a-9f81-48e9-9d19-f1dee0637bda_913x1039.png 424w, https://substackcdn.com/image/fetch/$s_!z3kg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd769572a-9f81-48e9-9d19-f1dee0637bda_913x1039.png 848w, https://substackcdn.com/image/fetch/$s_!z3kg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd769572a-9f81-48e9-9d19-f1dee0637bda_913x1039.png 1272w, https://substackcdn.com/image/fetch/$s_!z3kg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd769572a-9f81-48e9-9d19-f1dee0637bda_913x1039.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Someone forgot to teach it how to play baseball?</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!AORv!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Faa0b9433-c2bb-47e2-8416-645aa6ce9f00_812x915.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!AORv!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Faa0b9433-c2bb-47e2-8416-645aa6ce9f00_812x915.png 424w, https://substackcdn.com/image/fetch/$s_!AORv!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Faa0b9433-c2bb-47e2-8416-645aa6ce9f00_812x915.png 848w, https://substackcdn.com/image/fetch/$s_!AORv!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Faa0b9433-c2bb-47e2-8416-645aa6ce9f00_812x915.png 1272w, https://substackcdn.com/image/fetch/$s_!AORv!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Faa0b9433-c2bb-47e2-8416-645aa6ce9f00_812x915.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!AORv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Faa0b9433-c2bb-47e2-8416-645aa6ce9f00_812x915.png" width="812" height="915" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/aa0b9433-c2bb-47e2-8416-645aa6ce9f00_812x915.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:915,&quot;width&quot;:812,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:167441,&quot;alt&quot;:&quot;&#8220;at the end of the game the team with the most points on the board is going to win.&#8221; --John Madden --Michael Scott --ChatGPT&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="&#8220;at the end of the game the team with the most points on the board is going to win.&#8221; --John Madden --Michael Scott --ChatGPT" title="&#8220;at the end of the game the team with the most points on the board is going to win.&#8221; --John Madden --Michael Scott --ChatGPT" srcset="https://substackcdn.com/image/fetch/$s_!AORv!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Faa0b9433-c2bb-47e2-8416-645aa6ce9f00_812x915.png 424w, https://substackcdn.com/image/fetch/$s_!AORv!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Faa0b9433-c2bb-47e2-8416-645aa6ce9f00_812x915.png 848w, https://substackcdn.com/image/fetch/$s_!AORv!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Faa0b9433-c2bb-47e2-8416-645aa6ce9f00_812x915.png 1272w, https://substackcdn.com/image/fetch/$s_!AORv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Faa0b9433-c2bb-47e2-8416-645aa6ce9f00_812x915.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>hmmmm, ok so it does know baseball<br></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!1GXi!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe609a5b2-bb20-4043-a9ad-2746e4f5d6a7_795x377.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1GXi!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe609a5b2-bb20-4043-a9ad-2746e4f5d6a7_795x377.png 424w, https://substackcdn.com/image/fetch/$s_!1GXi!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe609a5b2-bb20-4043-a9ad-2746e4f5d6a7_795x377.png 848w, https://substackcdn.com/image/fetch/$s_!1GXi!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe609a5b2-bb20-4043-a9ad-2746e4f5d6a7_795x377.png 1272w, https://substackcdn.com/image/fetch/$s_!1GXi!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe609a5b2-bb20-4043-a9ad-2746e4f5d6a7_795x377.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!1GXi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe609a5b2-bb20-4043-a9ad-2746e4f5d6a7_795x377.png" width="795" height="377" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/e609a5b2-bb20-4043-a9ad-2746e4f5d6a7_795x377.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:377,&quot;width&quot;:795,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:67898,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!1GXi!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe609a5b2-bb20-4043-a9ad-2746e4f5d6a7_795x377.png 424w, https://substackcdn.com/image/fetch/$s_!1GXi!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe609a5b2-bb20-4043-a9ad-2746e4f5d6a7_795x377.png 848w, https://substackcdn.com/image/fetch/$s_!1GXi!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe609a5b2-bb20-4043-a9ad-2746e4f5d6a7_795x377.png 1272w, https://substackcdn.com/image/fetch/$s_!1GXi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe609a5b2-bb20-4043-a9ad-2746e4f5d6a7_795x377.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>now we&#8217;re getting somewhere&#8230;.</p><p></p><div><hr></div><h2><a href="https://what-if.xkcd.com/8/">Everybody Jump</a></h2><blockquote><p>What would happen if everyone on earth stood as close to each other as they could and jumped, everyone landing on the ground at the same instant?</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!DIr6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F31bf1330-af4d-4836-9e4f-3560f4557628_932x572.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!DIr6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F31bf1330-af4d-4836-9e4f-3560f4557628_932x572.png 424w, https://substackcdn.com/image/fetch/$s_!DIr6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F31bf1330-af4d-4836-9e4f-3560f4557628_932x572.png 848w, https://substackcdn.com/image/fetch/$s_!DIr6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F31bf1330-af4d-4836-9e4f-3560f4557628_932x572.png 1272w, https://substackcdn.com/image/fetch/$s_!DIr6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F31bf1330-af4d-4836-9e4f-3560f4557628_932x572.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!DIr6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F31bf1330-af4d-4836-9e4f-3560f4557628_932x572.png" width="932" height="572" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/31bf1330-af4d-4836-9e4f-3560f4557628_932x572.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:572,&quot;width&quot;:932,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:114972,&quot;alt&quot;:&quot;Does this bot read xkcd??&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Does this bot read xkcd??" title="Does this bot read xkcd??" srcset="https://substackcdn.com/image/fetch/$s_!DIr6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F31bf1330-af4d-4836-9e4f-3560f4557628_932x572.png 424w, https://substackcdn.com/image/fetch/$s_!DIr6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F31bf1330-af4d-4836-9e4f-3560f4557628_932x572.png 848w, https://substackcdn.com/image/fetch/$s_!DIr6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F31bf1330-af4d-4836-9e4f-3560f4557628_932x572.png 1272w, https://substackcdn.com/image/fetch/$s_!DIr6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F31bf1330-af4d-4836-9e4f-3560f4557628_932x572.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><h2><strong><a href="https://what-if.xkcd.com/37/">Supersonic Stereo</a></strong></h2><blockquote><p>What if you somehow managed to make a stereo travel at twice the speed of sound, would it sound backwards to someone who was just casually sitting somewhere as it flies by?</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gQrZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9dd42cf-1c28-406a-b6be-4c745ce55f31_915x403.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gQrZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9dd42cf-1c28-406a-b6be-4c745ce55f31_915x403.png 424w, https://substackcdn.com/image/fetch/$s_!gQrZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9dd42cf-1c28-406a-b6be-4c745ce55f31_915x403.png 848w, https://substackcdn.com/image/fetch/$s_!gQrZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9dd42cf-1c28-406a-b6be-4c745ce55f31_915x403.png 1272w, https://substackcdn.com/image/fetch/$s_!gQrZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9dd42cf-1c28-406a-b6be-4c745ce55f31_915x403.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gQrZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9dd42cf-1c28-406a-b6be-4c745ce55f31_915x403.png" width="915" height="403" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/f9dd42cf-1c28-406a-b6be-4c745ce55f31_915x403.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:403,&quot;width&quot;:915,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:93378,&quot;alt&quot;:&quot;I'll take answers that are incorrect for 400 Alex.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="I'll take answers that are incorrect for 400 Alex." title="I'll take answers that are incorrect for 400 Alex." srcset="https://substackcdn.com/image/fetch/$s_!gQrZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9dd42cf-1c28-406a-b6be-4c745ce55f31_915x403.png 424w, https://substackcdn.com/image/fetch/$s_!gQrZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9dd42cf-1c28-406a-b6be-4c745ce55f31_915x403.png 848w, https://substackcdn.com/image/fetch/$s_!gQrZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9dd42cf-1c28-406a-b6be-4c745ce55f31_915x403.png 1272w, https://substackcdn.com/image/fetch/$s_!gQrZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9dd42cf-1c28-406a-b6be-4c745ce55f31_915x403.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This is a fun one. Randall actually cites a scientific paper that confirms the sounds would be backwards if you could hear it over the sonic boom.</p><div><hr></div><h2><a href="https://what-if.xkcd.com/6/">Glass Half Empty</a></h2><blockquote><p>What if a glass of water was, all of a sudden, literally half empty?</p></blockquote><p>Before I ask it the What If question, lets see if it can handle the concept of &#8220;Half&#8221;.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!RK7O!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F677d1c8c-a7ce-4fa0-bff8-a7c687d756c8_817x425.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RK7O!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F677d1c8c-a7ce-4fa0-bff8-a7c687d756c8_817x425.png 424w, https://substackcdn.com/image/fetch/$s_!RK7O!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F677d1c8c-a7ce-4fa0-bff8-a7c687d756c8_817x425.png 848w, https://substackcdn.com/image/fetch/$s_!RK7O!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F677d1c8c-a7ce-4fa0-bff8-a7c687d756c8_817x425.png 1272w, https://substackcdn.com/image/fetch/$s_!RK7O!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F677d1c8c-a7ce-4fa0-bff8-a7c687d756c8_817x425.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!RK7O!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F677d1c8c-a7ce-4fa0-bff8-a7c687d756c8_817x425.png" width="817" height="425" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/677d1c8c-a7ce-4fa0-bff8-a7c687d756c8_817x425.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:425,&quot;width&quot;:817,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:91045,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!RK7O!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F677d1c8c-a7ce-4fa0-bff8-a7c687d756c8_817x425.png 424w, https://substackcdn.com/image/fetch/$s_!RK7O!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F677d1c8c-a7ce-4fa0-bff8-a7c687d756c8_817x425.png 848w, https://substackcdn.com/image/fetch/$s_!RK7O!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F677d1c8c-a7ce-4fa0-bff8-a7c687d756c8_817x425.png 1272w, https://substackcdn.com/image/fetch/$s_!RK7O!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F677d1c8c-a7ce-4fa0-bff8-a7c687d756c8_817x425.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Apparently 500ml is more than half of 1000ml.  Again, do not use ChatGPT for math. </p><p>On to the real question</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!HtVv!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff90cda1a-07d9-41b6-8536-90279d641df0_823x478.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!HtVv!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff90cda1a-07d9-41b6-8536-90279d641df0_823x478.png 424w, https://substackcdn.com/image/fetch/$s_!HtVv!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff90cda1a-07d9-41b6-8536-90279d641df0_823x478.png 848w, https://substackcdn.com/image/fetch/$s_!HtVv!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff90cda1a-07d9-41b6-8536-90279d641df0_823x478.png 1272w, https://substackcdn.com/image/fetch/$s_!HtVv!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff90cda1a-07d9-41b6-8536-90279d641df0_823x478.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!HtVv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff90cda1a-07d9-41b6-8536-90279d641df0_823x478.png" width="823" height="478" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/f90cda1a-07d9-41b6-8536-90279d641df0_823x478.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:478,&quot;width&quot;:823,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:105119,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!HtVv!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff90cda1a-07d9-41b6-8536-90279d641df0_823x478.png 424w, https://substackcdn.com/image/fetch/$s_!HtVv!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff90cda1a-07d9-41b6-8536-90279d641df0_823x478.png 848w, https://substackcdn.com/image/fetch/$s_!HtVv!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff90cda1a-07d9-41b6-8536-90279d641df0_823x478.png 1272w, https://substackcdn.com/image/fetch/$s_!HtVv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff90cda1a-07d9-41b6-8536-90279d641df0_823x478.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Now if only ChatGPT could draw.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dhHk!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5bed0c5a-bf39-4291-8d87-b9739afcd571_805x465.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dhHk!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5bed0c5a-bf39-4291-8d87-b9739afcd571_805x465.png 424w, https://substackcdn.com/image/fetch/$s_!dhHk!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5bed0c5a-bf39-4291-8d87-b9739afcd571_805x465.png 848w, https://substackcdn.com/image/fetch/$s_!dhHk!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5bed0c5a-bf39-4291-8d87-b9739afcd571_805x465.png 1272w, https://substackcdn.com/image/fetch/$s_!dhHk!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5bed0c5a-bf39-4291-8d87-b9739afcd571_805x465.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dhHk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5bed0c5a-bf39-4291-8d87-b9739afcd571_805x465.png" width="805" height="465" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/5bed0c5a-bf39-4291-8d87-b9739afcd571_805x465.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:465,&quot;width&quot;:805,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:87792,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!dhHk!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5bed0c5a-bf39-4291-8d87-b9739afcd571_805x465.png 424w, https://substackcdn.com/image/fetch/$s_!dhHk!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5bed0c5a-bf39-4291-8d87-b9739afcd571_805x465.png 848w, https://substackcdn.com/image/fetch/$s_!dhHk!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5bed0c5a-bf39-4291-8d87-b9739afcd571_805x465.png 1272w, https://substackcdn.com/image/fetch/$s_!dhHk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5bed0c5a-bf39-4291-8d87-b9739afcd571_805x465.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><h2><a href="https://what-if.xkcd.com/107/">Letter To Mom</a></h2><blockquote><p>What&#8217;s the fastest way to get a hand-written letter from my place in Chicago to my mother in New Jersey?</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!4oQk!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc939275-dbbe-4f66-8bd1-50b1b00ce596_1638x1224.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4oQk!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc939275-dbbe-4f66-8bd1-50b1b00ce596_1638x1224.png 424w, https://substackcdn.com/image/fetch/$s_!4oQk!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc939275-dbbe-4f66-8bd1-50b1b00ce596_1638x1224.png 848w, https://substackcdn.com/image/fetch/$s_!4oQk!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc939275-dbbe-4f66-8bd1-50b1b00ce596_1638x1224.png 1272w, https://substackcdn.com/image/fetch/$s_!4oQk!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc939275-dbbe-4f66-8bd1-50b1b00ce596_1638x1224.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!4oQk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc939275-dbbe-4f66-8bd1-50b1b00ce596_1638x1224.png" width="1456" height="1088" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/dc939275-dbbe-4f66-8bd1-50b1b00ce596_1638x1224.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1088,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:307578,&quot;alt&quot;:&quot;USPS>Everything&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="USPS>Everything" title="USPS>Everything" srcset="https://substackcdn.com/image/fetch/$s_!4oQk!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc939275-dbbe-4f66-8bd1-50b1b00ce596_1638x1224.png 424w, https://substackcdn.com/image/fetch/$s_!4oQk!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc939275-dbbe-4f66-8bd1-50b1b00ce596_1638x1224.png 848w, https://substackcdn.com/image/fetch/$s_!4oQk!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc939275-dbbe-4f66-8bd1-50b1b00ce596_1638x1224.png 1272w, https://substackcdn.com/image/fetch/$s_!4oQk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc939275-dbbe-4f66-8bd1-50b1b00ce596_1638x1224.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Hmm, not very innovative, lets try a follow up question.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!IR4Q!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc73fa56-2417-4aa7-8042-626e0f3e3d47_1604x430.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!IR4Q!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc73fa56-2417-4aa7-8042-626e0f3e3d47_1604x430.png 424w, https://substackcdn.com/image/fetch/$s_!IR4Q!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc73fa56-2417-4aa7-8042-626e0f3e3d47_1604x430.png 848w, https://substackcdn.com/image/fetch/$s_!IR4Q!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc73fa56-2417-4aa7-8042-626e0f3e3d47_1604x430.png 1272w, https://substackcdn.com/image/fetch/$s_!IR4Q!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc73fa56-2417-4aa7-8042-626e0f3e3d47_1604x430.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!IR4Q!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc73fa56-2417-4aa7-8042-626e0f3e3d47_1604x430.png" width="1456" height="390" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/cc73fa56-2417-4aa7-8042-626e0f3e3d47_1604x430.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:390,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:92420,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!IR4Q!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc73fa56-2417-4aa7-8042-626e0f3e3d47_1604x430.png 424w, https://substackcdn.com/image/fetch/$s_!IR4Q!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc73fa56-2417-4aa7-8042-626e0f3e3d47_1604x430.png 848w, https://substackcdn.com/image/fetch/$s_!IR4Q!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc73fa56-2417-4aa7-8042-626e0f3e3d47_1604x430.png 1272w, https://substackcdn.com/image/fetch/$s_!IR4Q!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc73fa56-2417-4aa7-8042-626e0f3e3d47_1604x430.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!n5n5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9761020-2a3b-485d-917f-aaef090012d2_1562x1180.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!n5n5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9761020-2a3b-485d-917f-aaef090012d2_1562x1180.png 424w, https://substackcdn.com/image/fetch/$s_!n5n5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9761020-2a3b-485d-917f-aaef090012d2_1562x1180.png 848w, https://substackcdn.com/image/fetch/$s_!n5n5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9761020-2a3b-485d-917f-aaef090012d2_1562x1180.png 1272w, https://substackcdn.com/image/fetch/$s_!n5n5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9761020-2a3b-485d-917f-aaef090012d2_1562x1180.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!n5n5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9761020-2a3b-485d-917f-aaef090012d2_1562x1180.png" width="1456" height="1100" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/b9761020-2a3b-485d-917f-aaef090012d2_1562x1180.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1100,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:314134,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!n5n5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9761020-2a3b-485d-917f-aaef090012d2_1562x1180.png 424w, https://substackcdn.com/image/fetch/$s_!n5n5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9761020-2a3b-485d-917f-aaef090012d2_1562x1180.png 848w, https://substackcdn.com/image/fetch/$s_!n5n5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9761020-2a3b-485d-917f-aaef090012d2_1562x1180.png 1272w, https://substackcdn.com/image/fetch/$s_!n5n5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9761020-2a3b-485d-917f-aaef090012d2_1562x1180.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><h2>Conclusion</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!B6j5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fff250168-5846-45a6-98ad-88f42a7c3d30_1590x1130.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!B6j5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fff250168-5846-45a6-98ad-88f42a7c3d30_1590x1130.png 424w, https://substackcdn.com/image/fetch/$s_!B6j5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fff250168-5846-45a6-98ad-88f42a7c3d30_1590x1130.png 848w, https://substackcdn.com/image/fetch/$s_!B6j5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fff250168-5846-45a6-98ad-88f42a7c3d30_1590x1130.png 1272w, https://substackcdn.com/image/fetch/$s_!B6j5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fff250168-5846-45a6-98ad-88f42a7c3d30_1590x1130.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!B6j5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fff250168-5846-45a6-98ad-88f42a7c3d30_1590x1130.png" width="1456" height="1035" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/ff250168-5846-45a6-98ad-88f42a7c3d30_1590x1130.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1035,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:320412,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!B6j5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fff250168-5846-45a6-98ad-88f42a7c3d30_1590x1130.png 424w, https://substackcdn.com/image/fetch/$s_!B6j5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fff250168-5846-45a6-98ad-88f42a7c3d30_1590x1130.png 848w, https://substackcdn.com/image/fetch/$s_!B6j5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fff250168-5846-45a6-98ad-88f42a7c3d30_1590x1130.png 1272w, https://substackcdn.com/image/fetch/$s_!B6j5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fff250168-5846-45a6-98ad-88f42a7c3d30_1590x1130.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>I think it&#8217;s safe to say that ChatGPT won&#8217;t be taking our jobs anytime soon. For now it&#8217;s just a fun tool that can do some decent writing and answer general knowledge questions. </p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.123cloud.st/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">One Twenty Three Cloud Street is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Tech Debt is Good]]></title><description><![CDATA[What is a technical line of credit?]]></description><link>https://www.123cloud.st/p/tech-debt-is-good</link><guid isPermaLink="false">https://www.123cloud.st/p/tech-debt-is-good</guid><dc:creator><![CDATA[Will Laws]]></dc:creator><pubDate>Sun, 01 May 2022 22:55:44 GMT</pubDate><enclosure url="https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/8a8c1475-eed7-4145-b8cd-e23b0d0cc5d6_3736x2805.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Technical debt is often treated entirely incorrectly. It is observed as a sign of antiquated culture, bad practices and hurried architecture.  For most tech professionals this sounds obvious, <em><strong>and have you ever bought or leased an automobile?</strong></em></p><div><hr></div><p>I went to my favorite car dealer several years ago and leased a brand new car.  We worked out option packages and mileage, down payment and monthly payments.  I gave them my down payment of only $5,000USD and I walked away with a $50,000 automobile.  </p><h3>Let&#8217;s translate that exchange into application ownership.</h3><p>I went to my development team several years ago and asked for a brand new application. We worked out the amount of sprints, time and cost to build.  I gave them the time to build it and after only 6 months my startup walked away with an application capable of handling our million dollar idea.</p><div><hr></div><p>After I bought my car, my bank followed up with me every month asking for a payment. I didn&#8217;t walk away from the dealership for just my initial $5,000 payment and no follow up payments on principal and interest. <strong>You must service your debt.</strong> </p><div><hr></div><h2>Our technical workloads don&#8217;t only accumulate debt. Instead, they accumulate interest on existing debt. </h2><p>This unpaid interest is what many people are often referring to when they think of tech debt. From the first line of code, a new project begins accumulating debt; but the interest hasn&#8217;t come due, <em><strong>yet</strong>. </em> </p><blockquote><p>We don&#8217;t buy our applications, even from internally sourced development teams.</p></blockquote><p>We lease them. They require interest payments in the form of package upgrades, architecture changes and security posture alignments. The debt and interest rates we take on at the inception of the idea <strong>can</strong> be known and <strong>must</strong> be planned for. </p><p>There is no &#8220;bank&#8221; that&#8217;s going to ask for the work to be completed to pay them back.  If the interest isn&#8217;t paid, the debt will not be serviced and you won&#8217;t be sent to collections.  This lack of external accountability, a <strong>vacuum of required responsibility</strong>, is a driving force in the creation of this unpaid interest in many businesses. </p><p>&#8220;You don&#8217;t own a house, a house owns you.&#8221; You are beholden to the house to not only pay for it but to maintain it and even improve it. If you don&#8217;t then: <br>The bank will come looking for payments. <br>The counsel will get after you for dues. <br>The neighbors will complain at you for your unkempt yard.  <br>Your insurance will get on you for not mending the damages.  </p><h3>With tech development there are similar, yet different driving forces.</h3><p>The business will ask the development team to add features and reduce bugs.<br>The customers will ask the business to add features and reduce bugs. <br>The partner integrators will ask the business to add features and reduce bugs.  </p><p>It is very unlikely that anyone will ask the development team to pay any of their time towards the <strong>technical interest</strong> payments if they don&#8217;t understand the mountain of pain that is coming for them. <br><br>Technical leaders must be accountable to themselves and the business to understand how large their line of credit is so that they can service it properly. </p><div><hr></div><h2>Interest re-payment is part of the total cost of ownership. </h2><p>Several years ago I was tasked with architecting a new product(lets call it &#8220;MultiTower&#8221;). Our team, like many &#8220;start-ups&#8221; consisted of just a hand full of absolute rockstars.  Over the next year we built our initial proof of concept into a <s>viable</s> sellable product. We picked up a couple customers and set about reducing bugs and adding features. </p><blockquote><p><strong>Our team now had a </strong><em><strong>technical line of credit</strong></em><strong> that we had to keep servicing. </strong>Every new feature increased the amount of ownership, and increased the amount of credit we&#8217;ve chosen to take out.</p></blockquote><p>We kept up with frameworks, database engine versions, security patches and released often. I implemented a micro-service architecture and insisted on high standards for testing. 20% of our time was easily and without pushback spent on interest re-payment. We never backed down from our code coverage target or our automation. At the close of the second year of development we had a very well maintained application and no extra customers to show for it.  The product just wasn&#8217;t something our customers wanted.  </p><blockquote><p>Developing the proper way isn&#8217;t going to get your startup off the ground.</p></blockquote><p><em>&#8220;Well, Will,&#8221;</em> you might say <em>&#8220;thats why you should skip &#8216;proper&#8217; and build a monolith at your startup - spend that 20% on your features!&#8221;</em></p><blockquote><p>Developing in an expedient way isn&#8217;t what gets you off the ground either.</p></blockquote><div><hr></div><h2><strong>Servicing the interest on your technical line of credit is the best practice regardless of the architectural complexity.</strong> </h2><p>How much money do you need to make a year to own a Ferrari? How about a private jet? How much time do you need to spend maintaining your Kubernetes cluster to keep the versions up to date and the plugin versions all compatible?</p><p>If you don&#8217;t have the resources for &#8220;fancy&#8221;, ignoring the maintenance to <strong>stretch</strong> your budget to afford &#8220;fancy&#8221; does <strong>instantly</strong> give you &#8220;fancy&#8221;.  You won&#8217;t have that fancy thing, in a couth state, for very long if you don&#8217;t increase your budget for maintenance.</p><p>We were fortunate enough to have enough staffing, with the right levels of experience to support the repayment for our chosen level of complexity. &#8220;MultiTower&#8221; was created out of a established scaleup as a new product. We didn&#8217;t operate like a startup because we didn&#8217;t work at one. We had the benefit of successful, existing products to fund the work and an existing customer base to begin selling to.   </p><p>There are a few inflection points on the way up.  Especially within applications that have a &#8220;cold start&#8221; problem to overcome. </p><blockquote><p>The things that make a startup successful are rarely the exact mechanisms that make them successful as a scale-up and are rarely, <em><strong>if ever</strong></em>, the correct path to creating a successful enterprise.<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a> </p></blockquote><h2>The square of velocity is acceleration. The square of shortcut is debt.</h2><p>A business that has reached its next stage of growth without planning for adaptation will continue to pile on unserviced debt to an ever growing line of credit. This will make new features harder to build, increase time to deployment, and frustrate the developers. The larger the unserviced debt the more time it will take to correctly bring new business decisions, features, and security fixes into production. EVERY change will take longer. This pressure on the development team has a tendency to force their hand to meet deadlines. </p><p><strong>How are deadlines met under pressure?</strong>  Shortcuts are taken. The more shortcuts that are taken, the more often that specific shortcut will effect a dependent system or feature. When shortcuts are taken, the metaphorical Interest Rate goes UP in addition to the expected increase in the size of the line of credit. </p><div><hr></div><h1>Why debt is good</h1><div class="pullquote"><p>Every shortcut you take<br>And bug you make<br>Every feature you break<br>Every step(function) you take<br><s>I'll be watching you<br></s>Adds to your technical line of credit. </p></div><blockquote><p>You&#8217;re going to be taking out this line of credit whether you want to or not. </p></blockquote><p><s>Un</s>fortunately the workload now exists.  Having a business with a well serviced technical line of credit is incredibly attractive to your technical team.  </p><p>Would you rather: </p><ul><li><p>Pay the bill on a well maintained car doing preventative maintenance at predictable intervals</p></li><li><p>Be late to work cause it &#8220;suddenly&#8221; broke down and also have irregular maintenance bills that unexpectedly delay your journey</p></li></ul><p>Treat your workloads the same way and give them the care they require. </p><p>Go ahead - Decide to build the monolith, or the micro service or the serverless or the IIS stack of your dreams.<br>Understand the line of credit you are taking out on behalf of your business.<br>Understand what the interest payments look like and service your technical line of credit accordingly. <br><br>Your investors, developers, and customers will thank you later.</p><p></p><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>Go read &#8220;The Cold Start Problem&#8221; by Andrew Chen if you&#8217;re interested in the best way to understand these inflection points and specific challenges to building a product that has a network effect. https://www.amazon.com/Cold-Start-Problem-Andrew-Chen/dp/0062969749 - <em>side note</em> - making this footnote made me realize that Substack doesn&#8217;t have the ability to make UNDERSCORE&#8217;d text(was trying to make a proper citiation). What a lean machine! Hopefully this feature is missing to make sure they have 20% of their time left to service the technical line of credit. </p></div></div>]]></content:encoded></item><item><title><![CDATA[Spoiler Alert (You're reading this on the solution I chose)]]></title><description><![CDATA[A self documenting article.]]></description><link>https://www.123cloud.st/p/spoiler-alert-youre-reading-this</link><guid isPermaLink="false">https://www.123cloud.st/p/spoiler-alert-youre-reading-this</guid><dc:creator><![CDATA[Will Laws]]></dc:creator><pubDate>Wed, 30 Mar 2022 02:48:08 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!k_ZC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5246d3b5-d9a5-4f41-8dca-0b5c2dd4dd2c_2267x833.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>My name is Will Laws and I live at 123 Cloud Street, but I haven&#8217;t always lived here. I&#8217;ve been inside too many data centres to count and I&#8217;ve been migrating businesses to the cloud since 2009. </p><p></p><h3>This blog is about to document its own creation. </h3><p></p><p>Yesterday I spent about 2hours discovering a &#8220;good&#8221; domain name.&nbsp; I had requirements that it be clever (no .com/.org/.net domains) easy to say and remember and cost very little. Many options were considered before settling on&nbsp;<a href="http://123cloud.st/">123cloud.st</a>&nbsp;- the domain meets all my requirements except I cant purchase it on my preferred registrar. </p><p>Selecting a secondary registrar has never been something I quite enjoy. I actually like having all my eggs in one basket sometimes, it makes them easier to count.&nbsp; I&#8217;ve placed my money into Gandi and they have sent some of that to S&#227;o Tom&#233; and Pr&#237;ncipe (owners of the .st TLD) and step one is to update my Name Servers to use Route53. I&#8217;m greeted with a delightful delay indicating that I must now wait 12-24hr&#8217;s for some lines in a database to be updated. </p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ciym!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F55fe9753-5044-400a-98fc-2fa761b37117_826x176.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ciym!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F55fe9753-5044-400a-98fc-2fa761b37117_826x176.png 424w, https://substackcdn.com/image/fetch/$s_!ciym!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F55fe9753-5044-400a-98fc-2fa761b37117_826x176.png 848w, https://substackcdn.com/image/fetch/$s_!ciym!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F55fe9753-5044-400a-98fc-2fa761b37117_826x176.png 1272w, https://substackcdn.com/image/fetch/$s_!ciym!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F55fe9753-5044-400a-98fc-2fa761b37117_826x176.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ciym!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F55fe9753-5044-400a-98fc-2fa761b37117_826x176.png" width="826" height="176" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/55fe9753-5044-400a-98fc-2fa761b37117_826x176.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:176,&quot;width&quot;:826,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:32766,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ciym!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F55fe9753-5044-400a-98fc-2fa761b37117_826x176.png 424w, https://substackcdn.com/image/fetch/$s_!ciym!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F55fe9753-5044-400a-98fc-2fa761b37117_826x176.png 848w, https://substackcdn.com/image/fetch/$s_!ciym!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F55fe9753-5044-400a-98fc-2fa761b37117_826x176.png 1272w, https://substackcdn.com/image/fetch/$s_!ciym!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F55fe9753-5044-400a-98fc-2fa761b37117_826x176.png 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a></figure></div><p>These messages are typically written by a marketing team to keep support levels low in the event of &#8220;higher than normal&#8221; call volumes. I can check if this is completed with:<br><br><code>dig NS </code><a href="http://123cloud.st/"><code>123cloud.st</code></a><code> | grep NS</code></p><p><br>Annnnd it was completed instantly. <br><br></p><blockquote><p>I build on the cloud and I have an infinite to-do list. </p></blockquote><p></p><p>Here&#8217;s how I&#8217;m going so far.</p><ul><li><p><s>Buy a Domain Name</s></p></li><li><p>Static Site or CMS?</p></li><li><p>How do you contact me?</p><ul><li><p>Email address?</p><ul><li><p>do i get a lot of spam now?</p></li><li><p>Free email or paid?</p></li></ul></li><li><p>Request Forum that sends me an email?</p></li><li><p>Does it need a captcha?</p></li><li><p>Forums and discussion groups?</p></li><li><p>Are posts allowed to have comments? - not if we have a static page?</p></li></ul></li><li><p>How do/Should I integrate social media(and which if any platforms)</p></li><li><p>Do I want/need to market this?</p></li><li><p>I need a logo</p></li><li><p>I need a theme</p></li><li><p>Do I need an editor?</p></li><li><p>Start a github and build with IaC before we go too far&nbsp;<s>- or is click ops ok?</s></p></li><li><p>What security risks am I willing to take to save money?</p></li><li><p>Write an About Page</p></li><li><p>Define a budget?</p></li><li><p>Can this create revenue or will it only consume it?</p></li><li><p>Total Cost of Ownership</p></li><li><p>Prioritize this list</p></li><li><p>How will I handle customer data? How will I handle customer privacy?</p></li></ul><p>As much as I want to pick between a static site, and a plethora of CMS&#8217;s available - I need to prioritize my list first.&nbsp; A savvy reader might notice that I&#8217;ve forgotten an item on my list - &#8220;write the content&#8221;.&nbsp; I&#8217;m currently writing this in Slack - I haven&#8217;t made any decisions so far except for purchasing the domain.&nbsp; My intention is to write this as I build and think about the project and that means writing before I have a reasonable tool to draft content.</p><p>I researched 5 of the top headless and traditional CMS&#8217;s - Self hosted WordPress, Ghost, Strapi, and Netlify for about 4 hours.  This wasn&#8217;t a waste of time but it was the wrong item on my list. </p><h4><em>IM SUPPOSED TO BE PRIORITIZING THE LIST</em><strong> </strong></h4><p>I have ADHD and I jumped straight into the most interesting (at the moment) item and I hyper focused.  Let&#8217;s start again.How about this for a better list?</p><ul><li><p>Set a deadline to get this done</p></li><li><p>Find a way to publish your content that includes</p><ul><li><p>Fixed Cost Ownership</p></li><li><p>Hands-Off (mostly) Security</p></li><li><p>An Editor (still writing this in slack yo)</p></li><li><p>Understand privacy of user data</p></li></ul></li><li><p>Get A Logo/Theme (Async)</p></li><li><p>Get an Email Address Setup (Async)</p></li><li><p>Make a Branded Twitter (Async?)</p></li></ul><p></p><h4><strong>Progress</strong>?</h4><p></p><p>I often think in cycles like this. Constantly refactoring my thoughts into more accurate and manageable pieces of work. My first list was way too specific. At work I would call that jumping straight into solution-ing. It is not an effective way to create a sustainable $anything.</p><p></p><h4><em><strong>No progress.</strong></em></h4><p></p><p><strong>That was the end of the first day.</strong> I hadn&#8217;t done my first priority to set a deadline and over a week has passed with no more words written.  </p><h4>Welcome to my life&#8230; oh wait, procrastination paid off&#8230;</h4><p>While this project wasn&#8217;t occupying time at the keyboard, it was occupying time in my mind.  I learned that I didn&#8217;t want to maintain the daily maintenance of a blog&#8217;s serverless or serverfull infrastructure. I didn&#8217;t need to start drafting shared responsibility models. There had to be options out there for non-tech centric writers who wanted all the same things I did.  So I did what anyone would do and registered my email address.</p><p>I&#8217;ve used Amazon WorkMail (exchange) in the past for myself and love the pricing model at $4USD/user/month. In about 5minutes I was able to add my 123cloud.st domain and WorkMail automatically added all my DNS entries, validated my SNS configuration and I was done.</p><p>I finally shared my idea to begin a blog with one of my longest held mentors.  He immediately mentioned that he reads a lot of content on Substack and that I should check it out.  </p><p>Substack looked promising because it had a mechanism to complete this entire task!</p><ul><li><p><s>Find a way to publish your content that includes</s></p><ul><li><p><s>Fixed Cost Ownership</s></p></li><li><p><s>Hands-Off (mostly) Security</s></p></li><li><p><s>An Editor (still writing this in slack yo)</s></p></li><li><p><s>Understand privacy of user data</s></p><p></p></li></ul></li></ul><p>I also looked into <strong>Medium</strong>.</p><p>The main differences that I could see were that Substack lacked built-in SEO and Medium lacked email lists.  I care about both of these things and with Substack being the new kid on the block, maybe I can give it a chance to scale and grow with me?  Every time I visit a medium article, I find so many distracting promotions around the page. Substack seems to give me the ability to keep my brand and not distract you with other content. I guess I&#8217;m selfish, so starting with this paragraph, I&#8217;m writing in Substack&#8217;s editor. <br></p><h3>There are some problems with the editor.</h3><p><a href="https://support.substack.com/hc/en-us/articles/360037463172-How-do-I-center-or-right-align-text-">I can&#8217;t control the alignment of text</a>. I found some issues in putting multiple images in the same &#8220;row&#8221; and some &#8220;Home&#8221; screen bugs when you have fewer than 2 posts (Keeping that <em>Hello World</em> post up for now) which hide the navigation bar. </p><p>After spending a few hours playing around with the style settings and link settings its time to get a logo. I head over to Fiverr and 99designs to price some logo creation. I&#8217;m not very good with Adobe Illustrator unfortunately.  </p><p><strong>I immediately get distracted</strong> and sign up for twitter before quickly realizing that I don&#8217;t have a header or profile image and I&#8217;m supposed to be working on those.</p><p></p><h3>Logos are hard</h3><p>Substack gives its users a tiny logo in the top right corner. I found some interesting designs on Fiverr and quickly realized a cheaper option is to use their <a href="https://www.fiverr.com/logo-maker">LogoMaker</a> product to efficiently source a designer curated icon.  2 hours later and I&#8217;ve got what you&#8217;re seeing today. Probably not the best design for a Substack icon; however, I&#8217;m assuming that most readers will care more about the words than my logo?</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!k_ZC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5246d3b5-d9a5-4f41-8dca-0b5c2dd4dd2c_2267x833.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!k_ZC!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5246d3b5-d9a5-4f41-8dca-0b5c2dd4dd2c_2267x833.png 424w, https://substackcdn.com/image/fetch/$s_!k_ZC!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5246d3b5-d9a5-4f41-8dca-0b5c2dd4dd2c_2267x833.png 848w, https://substackcdn.com/image/fetch/$s_!k_ZC!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5246d3b5-d9a5-4f41-8dca-0b5c2dd4dd2c_2267x833.png 1272w, https://substackcdn.com/image/fetch/$s_!k_ZC!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5246d3b5-d9a5-4f41-8dca-0b5c2dd4dd2c_2267x833.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!k_ZC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5246d3b5-d9a5-4f41-8dca-0b5c2dd4dd2c_2267x833.png" width="658" height="241.77884615384616" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/5246d3b5-d9a5-4f41-8dca-0b5c2dd4dd2c_2267x833.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:535,&quot;width&quot;:1456,&quot;resizeWidth&quot;:658,&quot;bytes&quot;:32128,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!k_ZC!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5246d3b5-d9a5-4f41-8dca-0b5c2dd4dd2c_2267x833.png 424w, https://substackcdn.com/image/fetch/$s_!k_ZC!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5246d3b5-d9a5-4f41-8dca-0b5c2dd4dd2c_2267x833.png 848w, https://substackcdn.com/image/fetch/$s_!k_ZC!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5246d3b5-d9a5-4f41-8dca-0b5c2dd4dd2c_2267x833.png 1272w, https://substackcdn.com/image/fetch/$s_!k_ZC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5246d3b5-d9a5-4f41-8dca-0b5c2dd4dd2c_2267x833.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>After a quick signup for Stripe (the only payment platform on Substack). All I need to do is some custom domain work.</p><p></p><h3>Custom Domains are ESSENTIAL for SEO</h3><p>Adding a custom domain to Substack is pretty simple with Route53. Since Substack lacks the <a href="https://support.substack.com/hc/en-us/articles/360051222571-How-do-I-set-up-my-custom-domain-">documentation</a> on their own site for R53, I&#8217;ve provided it here.</p><p></p><ol><li><p>Tell Substack your domain name (and put a www as a subdomain because they make you - we&#8217;ll fix that later)</p></li><li><p>Add the CNAME record that Substack provides to redirect your traffic in Route53</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!A0fg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5fe9b3ff-f24b-4928-bab9-b197646afa60_1216x144.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!A0fg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5fe9b3ff-f24b-4928-bab9-b197646afa60_1216x144.png 424w, https://substackcdn.com/image/fetch/$s_!A0fg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5fe9b3ff-f24b-4928-bab9-b197646afa60_1216x144.png 848w, https://substackcdn.com/image/fetch/$s_!A0fg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5fe9b3ff-f24b-4928-bab9-b197646afa60_1216x144.png 1272w, https://substackcdn.com/image/fetch/$s_!A0fg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5fe9b3ff-f24b-4928-bab9-b197646afa60_1216x144.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!A0fg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5fe9b3ff-f24b-4928-bab9-b197646afa60_1216x144.png" width="1216" height="144" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/5fe9b3ff-f24b-4928-bab9-b197646afa60_1216x144.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:144,&quot;width&quot;:1216,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:40396,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!A0fg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5fe9b3ff-f24b-4928-bab9-b197646afa60_1216x144.png 424w, https://substackcdn.com/image/fetch/$s_!A0fg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5fe9b3ff-f24b-4928-bab9-b197646afa60_1216x144.png 848w, https://substackcdn.com/image/fetch/$s_!A0fg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5fe9b3ff-f24b-4928-bab9-b197646afa60_1216x144.png 1272w, https://substackcdn.com/image/fetch/$s_!A0fg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5fe9b3ff-f24b-4928-bab9-b197646afa60_1216x144.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Hey you can put a picture in an itemized list!</figcaption></figure></div></li><li><p>Create an S3 Bucket with the root name of your website (123cloud.st) without the www and enable Static Website hosting </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5S04!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9cc2eca-d31d-4c6c-a1bf-9f07195fc8ae_1038x1294.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5S04!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9cc2eca-d31d-4c6c-a1bf-9f07195fc8ae_1038x1294.png 424w, https://substackcdn.com/image/fetch/$s_!5S04!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9cc2eca-d31d-4c6c-a1bf-9f07195fc8ae_1038x1294.png 848w, https://substackcdn.com/image/fetch/$s_!5S04!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9cc2eca-d31d-4c6c-a1bf-9f07195fc8ae_1038x1294.png 1272w, https://substackcdn.com/image/fetch/$s_!5S04!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9cc2eca-d31d-4c6c-a1bf-9f07195fc8ae_1038x1294.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5S04!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9cc2eca-d31d-4c6c-a1bf-9f07195fc8ae_1038x1294.png" width="477" height="594.6416184971098" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/a9cc2eca-d31d-4c6c-a1bf-9f07195fc8ae_1038x1294.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1294,&quot;width&quot;:1038,&quot;resizeWidth&quot;:477,&quot;bytes&quot;:166100,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!5S04!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9cc2eca-d31d-4c6c-a1bf-9f07195fc8ae_1038x1294.png 424w, https://substackcdn.com/image/fetch/$s_!5S04!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9cc2eca-d31d-4c6c-a1bf-9f07195fc8ae_1038x1294.png 848w, https://substackcdn.com/image/fetch/$s_!5S04!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9cc2eca-d31d-4c6c-a1bf-9f07195fc8ae_1038x1294.png 1272w, https://substackcdn.com/image/fetch/$s_!5S04!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9cc2eca-d31d-4c6c-a1bf-9f07195fc8ae_1038x1294.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Please keep all your S3 buckets private and block all public access!</figcaption></figure></div></li><li><p>Wait for Substack to update their systems. They seem to use Cloudflare for their CDN and they likely setup an origin for each domain: </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!h93x!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2dae97c3-feba-489e-9641-d67c5a8586b7_875x995.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!h93x!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2dae97c3-feba-489e-9641-d67c5a8586b7_875x995.jpeg 424w, https://substackcdn.com/image/fetch/$s_!h93x!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2dae97c3-feba-489e-9641-d67c5a8586b7_875x995.jpeg 848w, https://substackcdn.com/image/fetch/$s_!h93x!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2dae97c3-feba-489e-9641-d67c5a8586b7_875x995.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!h93x!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2dae97c3-feba-489e-9641-d67c5a8586b7_875x995.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!h93x!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2dae97c3-feba-489e-9641-d67c5a8586b7_875x995.jpeg" width="875" height="995" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/2dae97c3-feba-489e-9641-d67c5a8586b7_875x995.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:995,&quot;width&quot;:875,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:247210,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!h93x!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2dae97c3-feba-489e-9641-d67c5a8586b7_875x995.jpeg 424w, https://substackcdn.com/image/fetch/$s_!h93x!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2dae97c3-feba-489e-9641-d67c5a8586b7_875x995.jpeg 848w, https://substackcdn.com/image/fetch/$s_!h93x!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2dae97c3-feba-489e-9641-d67c5a8586b7_875x995.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!h93x!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2dae97c3-feba-489e-9641-d67c5a8586b7_875x995.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div></li><li><p>You&#8217;ll get an email when its done. Then you will have www.123cloud.st and 123cloud.st directing to your Substack blog</p></li></ol><p></p><h3>/me wipes sweat from brow</h3><p>This entire exercise has been incredibly thought provoking for me. I&#8217;ve already started working on several other problems that I must tackle and I can&#8217;t wait to share with you how I go about solving them.  You&#8217;re not going to find me writing rote documentation without commentary. I&#8217;m going to be strongly opinionated and frequently insist on high standards. I hope you enjoyed this first post!</p><h4>oh yeah and</h4><ul><li><p><s>write the content</s> </p></li></ul>]]></content:encoded></item></channel></rss>