<?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:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Bert Oubida on Medium]]></title>
        <description><![CDATA[Stories by Bert Oubida on Medium]]></description>
        <link>https://medium.com/@bertrandoubida?source=rss-7c27a8c89f65------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*9RFRewnrr4In5qZAjpo3eA@2x.jpeg</url>
            <title>Stories by Bert Oubida on Medium</title>
            <link>https://medium.com/@bertrandoubida?source=rss-7c27a8c89f65------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 00:57:54 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@bertrandoubida/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[AWS Control Tower (In layman’s terms)]]></title>
            <link>https://medium.com/@bertrandoubida/aws-control-tower-in-laymans-terms-a984979ef359?source=rss-7c27a8c89f65------2</link>
            <guid isPermaLink="false">https://medium.com/p/a984979ef359</guid>
            <category><![CDATA[aws-landing-zone]]></category>
            <category><![CDATA[aws-organizations]]></category>
            <category><![CDATA[iam-identity-center]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-control-tower]]></category>
            <dc:creator><![CDATA[Bert Oubida]]></dc:creator>
            <pubDate>Thu, 24 Sep 2026 00:50:15 GMT</pubDate>
            <atom:updated>2026-09-24T01:06:35.535Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>With the great number of technical articles out there by now, this article is for anyone looking for a simple explanation of “Control Tower”.</strong></p><p>—</p><h4>Simple break down</h4><p>AWS Control Tower is the “automatic, get it up and running correctly” button for running and adding new company accounts on AWS. This service helps provide you a secure, best-practice, multi-account setup called a <strong><em>landing zone</em></strong> in around an hour, and then keeps it tidy as you grow.</p><p>Imagine a general contractor that constructs your building to code, hands you the keys, and goes on to quietly keep watch in the background so everything remains up to code.</p><p>—</p><h4>When to use this</h4><p>One AWS account works well when you’re just getting started as a small company. As your company continues to grow, remaining on that single account is like running your whole company out of one room. This means that all your teams; engineering, finance, security, and the interns are all in that room.</p><p>What this means, is that:</p><ol><li>A simple mistake has a wide reach, affecting the whole room.</li><li>Figuring out who is tied to what on billing is a puzzle.</li><li>Permissions get more complex, and can get very messy (especially with production, and your testing environment being in the same room).</li><li>Your Risk managers and Auditors will judge.</li></ol><p>The best move would be to occupy a few different rooms (moving to a <strong><em>multi-account</em></strong> setup): which organizes and gives each team or project its own room, with a shared foundation for security and logins. This is what Control Tower does. It does so in a way where you decide the basic number of tables, chairs, and the setup. This automatically furnishes each room so you don’t have to even think about it.</p><p>—</p><h4>What Control Tower sets up first</h4><p>Once you push the button for a set up, “in under an hour”, you will get:</p><ol><li>A clean layout of the accounts. This is grouped into tidy folders (called <strong><em>Organizational Units</em></strong>), and dedicated accounts for <strong>management/billing</strong>, <strong>log archive</strong>, and <strong>security audit</strong>.</li><li>A vending machine for new accounts. (<strong><em>Account Factory</em></strong>) Your teams can request a ready-made, pre-approved account instead of building one from scratch.</li><li>Automatic rules for your rooms (Controls, a.k.a. <strong><em>Guardrails</em></strong>) you’ll have safety rules switched on from the creation of the account.</li><li>One <strong><em>dashboard</em></strong>. The ability to monitor/see every account and any red flags in a single view.</li></ol><p>—</p><h4>The terms you’ll hear when talking about AWS Control Tower</h4><p><strong><em>Landing zone</em></strong><em>: </em>The whole up-to-code building Control Tower builds for you.</p><p><strong><em>Organizational Units (OUs)</em></strong>: Floors of the building, everything on a floor follows that floor’s rules.</p><p><strong><em>Accounts</em></strong>: Individual apartments. Three are special: the <em>manager’s office</em> <em>(billing)</em>, the <em>camera archive (log archive)</em>, and the <em>security desk (audit)</em>.</p><p><strong><em>Controls / Guardrails</em></strong> House rules. <em>Preventive</em> = a locked door (stops it). <em>Detective</em> = a smoke alarm (flags it). <em>Proactive</em> = a plan-check before you build.</p><p><strong><em>Account Factory</em></strong><em>: </em>A vending machine for new, ready-to-go accounts.</p><p><strong><em>Dashboard</em></strong>: The manager’s monitor showing every room and any red lights.</p><p><strong><em>CfCT (Customizations for Control Tower)</em></strong>: Your renovation kit for adding a few custom rooms to the standard building.</p><p><em>(Behind the scenes, Control Tower quietly runs on AWS Organizations, Service Catalog, and IAM Identity Center. This is the plumbing and the elevators you never have to touch.)</em></p><p>—</p><h4>Conclusion</h4><p>If you’re running more than a handful of AWS accounts, the single-account route eventually costs you in security, clarity, and audit pain. <strong><em>Control Tower</em></strong><em> gives you the next step in your growth, multi-account foundation, built right, in under an hour, and kept that way as you scale.</em> You trade a little flexibility for a lot of speed, safety, and sanity. For most organizations, that’s an easy yes.</p><p>—</p><ul><li>Summarized from AWS’s official Control Tower documentation in plain terms.</li></ul><p>Link:</p><ul><li><a href="https://docs.aws.amazon.com/organizations/latest/userguide/services-that-can-integrate-CTower.html">https://docs.aws.amazon.com/organizations/latest/userguide/services-that-can-integrate-CTower.html</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a984979ef359" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Iceland Itinerary 3 nights/4 days]]></title>
            <link>https://medium.com/@bertrandoubida/iceland-itinerary-3-nights-4-days-1a280be72a32?source=rss-7c27a8c89f65------2</link>
            <guid isPermaLink="false">https://medium.com/p/1a280be72a32</guid>
            <category><![CDATA[vacation]]></category>
            <category><![CDATA[reykjavik]]></category>
            <category><![CDATA[itinerary]]></category>
            <category><![CDATA[iceland]]></category>
            <dc:creator><![CDATA[Bert Oubida]]></dc:creator>
            <pubDate>Wed, 15 Jul 2026 02:54:45 GMT</pubDate>
            <atom:updated>2026-07-15T02:54:45.701Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T0BzsQYj_5RGjhA-kVvVyA@2x.jpeg" /></figure><h3>Chasing Waterfalls and Hot Springs: A 4-Day Iceland Itinerary from Reykjavík</h3><p>Iceland had been on my bucket list for years, and I wanted to make the most of a long weekend without feeling like I was rushing from one destination to another. The goal of this trip was not to see every corner of the country. It was to experience the highlights around Reykjavík, explore Iceland’s incredible landscapes, and still leave time to relax.</p><p>If you are planning your first trip to Iceland, this itinerary balances sightseeing, good food, scenic drives, and one of the country’s best geothermal spas.</p><h3>Before You Go</h3><h3>Rent a Car</h3><p>I highly recommend renting through <strong>Blue Car Rental</strong>.</p><p>After researching dozens of companies, Blue Car Rental consistently came up as one of the most recommended agencies in Iceland because of its transparent pricing and hassle-free pickup process. Blue Car built a reputation for making the experience straightforward.</p><p>A few tips:</p><ul><li>Book early if traveling during peak season.</li><li>Consider their insurance options for peace of mind.</li><li>Iceland’s roads are generally excellent. Even on paved roads, loose volcanic rocks can kick up and crack windshields, especially behind larger vehicles. Leave extra following distance whenever possible.</li></ul><h3>Where We Stayed</h3><p><strong>Hotel Reykjavík Saga</strong></p><p>The hotel is in an excellent location right in downtown Reykjavík. Nearly everything in the city center is within walking distance, making it easy to explore restaurants, museums, shopping streets, and the waterfront without constantly moving the car.</p><h3>Day 1: Arrive and Explore Reykjavík</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dbbn6NILDz_WgG1kkqXezA@2x.jpeg" /></figure><p>After landing at Keflavík Airport, we picked up our rental car (a 10–15 minute walk right outside the terminal) and made the 45-minute drive into Reykjavík.</p><p>Rather than immediately checking into the hotel, we spent the afternoon exploring the city on foot.</p><p>Reykjavík is surprisingly walkable. Although it is Iceland’s largest city, downtown feels intimate and relaxed.</p><p>Some of our favorite stops included:</p><ul><li>Hallgrímskirkja Church</li><li>Sun Voyager Sculpture</li><li>Harpa Concert Hall</li><li>Laugavegur shopping street</li><li>Reykjavík Harbor</li></ul><p>In case the weather was not going to cooperate, we had backups planned. Reykjavík has plenty of excellent museums, including:</p><ul><li>Perlan</li><li>Saga Museum</li><li>Whales of Iceland</li><li>Maritime Museum</li></ul><h3>Lunch</h3><p>Le Kock</p><p>Great burgers and a perfect first meal after landing.</p><h3>Free Walking Tour</h3><p>One of the best decisions of the trip was joining the free walking tour starting in front of Hallgrímskirkja.</p><p>Even if you have researched Iceland beforehand, the local guides provide fascinating historical context that makes the city much more meaningful.</p><h3>Evening Relaxation</h3><p>The perfect way to recover from travel was spending the evening at <strong>Sky Lagoon</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2Hnece7imMy_vXihvo0VhA@2x.jpeg" /></figure><p>Unlike the more famous Blue Lagoon, Sky Lagoon feels quieter and more intimate while still offering incredible ocean views.</p><p>We ended up spending about 4 hours here and felt beyond relaxed afterwards, don’t forget to go through their <em>Skjol</em> experience before you leave.</p><h3>Day 2: The Golden Circle</h3><p>The Golden Circle is Iceland’s most famous sightseeing route, and for good reason.</p><p>We started early with breakfast from <strong>Brauð &amp; Co</strong>, one of Reykjavík’s best bakeries.</p><p>Our planned route included:</p><ul><li>Thingvellir National Park</li><li>Gullfoss Waterfall</li><li>Haukadalur Geothermal Area, home of Strokkur Geyser</li><li>Brúarfoss Waterfall</li><li>Urriðafoss</li><li>Kerið Crater</li><li>Reykjadalur Hot Spring River</li></ul><p>Reality, however, reminded us that Iceland deserves flexibility.</p><p>Instead of rushing through every stop, we ended up visiting:</p><ul><li>Thingvellir National Park</li><li>Haukadalur Geothermal Area</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/603/1*FgclJGuA2xMOZEnDRJ21ag@2x.jpeg" /></figure><ul><li>Reykjadalur Hot Spring River</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vRd6eNk4O190x6ZoXufKHg@2x.jpeg" /></figure><p>Honestly, I would not change it.</p><p>The hike to Reykjadalur takes around an hour each way, but soaking in a naturally heated river surrounded by mountains became one of the highlights of the entire trip.</p><p>Sometimes seeing fewer places makes for a better experience.</p><h3>Lunch</h3><p>Ölverk Pizza &amp; Brewery</p><p>Excellent pizza and craft beer after a morning of hiking. But honestly, you can google restaurants along the way that have good ratings and you will enjoy the food.</p><h3>Dinner</h3><p>ROK Restaurant</p><p>Probably one of my favorite meals in Reykjavík.</p><p>Their small plates make it easy to try a variety of Icelandic ingredients without committing to one large entrée.</p><h3>Day 3: Iceland’s South Coast</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*94IUOP7I0yBq1VpIGs6LUg@2x.jpeg" /></figure><p>The drive along Iceland’s South Coast feels like driving through another planet.</p><p>Our first adventure was a glacier hike on <strong>Sólheimajökull</strong>.</p><p>Walking across ancient ice surrounded by some deep blue crevasses is something that pictures simply cannot capture.</p><p>If you are debating whether the guided glacier hike is worth it, it absolutely is, lots of useful information</p><p>Afterward, we didn’t get to drive toward Vík for lunch, but if you have time, it’s worth it for several iconic stops on the drive back.</p><p>Highlights include:</p><ul><li>Reynisfjara Black Sand Beach</li><li>Seljalandsfoss</li><li>Skógafoss</li></ul><p>Each waterfall has its own personality.</p><p>Seljalandsfoss lets you walk behind the waterfall, while Skógafoss overwhelms you with its sheer power and size.</p><h3>Lunch</h3><p>We stoped at a local restaurant on the road, but a good stop is:</p><p>Smiðjan Brugghús in Vík; Great burgers and beer after the glacier hike.</p><h3>Dinner</h3><p>Reykjavík Kitchen</p><p>A relaxing final dinner before heading home.</p><h3>Day 4: Heading Home</h3><p>After one last Icelandic breakfast at our favorite bakery “<strong>Brauð &amp; Co”</strong>, it was time to make the drive back to Keflavík Airport.</p><p>Returning the rental car with Blue Car Rental was just as easy as picking it up, making the departure completely stress-free.</p><h3>Lessons Learned</h3><p>If I were planning this trip again, here are a few things I would keep in mind:</p><ul><li>Do not overpack your itinerary. Iceland deserves flexibility because the weather changes quickly.</li><li>Start sightseeing early. Popular attractions become much busier in the afternoon.</li><li>Fill up on gas whenever convenient once you leave Reykjavík.</li><li>Bring waterproof clothing, even if the forecast looks perfect.</li><li>Wear waterproof hiking boots if you plan to visit waterfalls or hike to Reykjadalur.</li><li>Keep extra distance from vehicles on gravel sections to reduce the chance of windshield damage from flying rocks.</li><li>Download offline Google Maps before leaving Reykjavík, as cell service can become spotty in more remote areas.</li></ul><h3>Final Thoughts</h3><p>Iceland exceeded every expectation.</p><p>From walking through Reykjavík’s colorful streets to hiking on a glacier, soaking in natural hot springs, and standing beside some of the most beautiful waterfalls I have ever seen, every day felt completely different from the last.</p><p>Four days is enough to experience many of Iceland’s most iconic sights, but it is also enough to leave wanting to come back. Next time, I would venture farther east to Jökulsárlón Glacier Lagoon and Diamond Beach, spend more time exploring the South Coast, and perhaps drive the entire Ring Road.</p><p>For a first visit to Iceland, this itinerary offers an excellent balance of adventure, sightseeing, incredible food, and relaxation. It is the perfect introduction to one of the world’s most beautiful countries.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1a280be72a32" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Migrating an App from Heroku to AWS Elastic Container Services using CodePipeline, and ECR]]></title>
            <link>https://medium.com/@bertrandoubida/migrating-an-app-from-heroku-to-aws-elastic-container-services-using-codepipeline-and-ecr-fd1907205a36?source=rss-7c27a8c89f65------2</link>
            <guid isPermaLink="false">https://medium.com/p/fd1907205a36</guid>
            <category><![CDATA[aws-codepipeline]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[heroku]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Bert Oubida]]></dc:creator>
            <pubDate>Wed, 01 Jan 2025 00:52:06 GMT</pubDate>
            <atom:updated>2025-01-01T00:52:06.206Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*SgicESUyBYXyQaXZ" /></figure><p>For this project, we will be checking out the Heroku platform, seeing how easy it is to set up and launch a simple app. Next, we’ll be taking a look at AWS to launch the same app, utilizing <strong>Codepipeline</strong>, <strong>Elastic Container Registry (ECR)</strong>, and <strong>Elastic Container Services (ECS)</strong>.</p><h3><strong>The App:</strong></h3><p>To create the app, we will write some simple JavaScript code to be run on Node.Js in an “Index.js” file, and make sure it has the necessary dependencies in the “package.json” file.</p><p>The JavaScript code for your <strong>Index.js</strong> file:</p><pre>const express = require(&#39;express&#39;);<br>const app = express();<br>const port = process.env.PORT || 8080;<br><br>app.get(&#39;/&#39;, (req, res) =&gt; {<br>  const name = process.env.NAME || &#39;Bite&#39;;<br>  res.send(`Hello ${name}!`);<br>});<br><br>app.listen(port, () =&gt; {<br>  console.log(`helloearthlings: I am listening on port ${port}`);<br>});</pre><p>The necessary code for your <strong>package.json</strong> file:</p><pre>{<br>  &quot;name&quot;: &quot;helloBite&quot;,<br>  &quot;description&quot;: &quot;Simple hello world sample in Node&quot;,<br>  &quot;version&quot;: &quot;1.0.0&quot;,<br>  &quot;main&quot;: &quot;index.js&quot;,<br>  &quot;scripts&quot;: {<br>    &quot;start&quot;: &quot;node index.js&quot;<br>  },<br>  &quot;author&quot;: &quot;Bert&quot;,<br>  &quot;license&quot;: &quot;Apache-2.0&quot;,<br>  &quot;dependencies&quot;: {<br>    &quot;express&quot;: &quot;^4.17.1&quot;<br>  }<br>}</pre><h3>Heroku Pipeline:</h3><p>Create an Heroku profile, and find the “Create new app” option</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NvzsBoEgLu3QvdjKCOa2zw.jpeg" /></figure><p>Connect your Github account, and the app should be running just like that!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WzaPZ3suuzBK8UeyYBm2UQ.jpeg" /></figure><p>Heroku offers a few options for your app to create a pipeline where continuous deployment is possible. Feel free to explore, and make sure to get acquainted with the documentation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ismjip4mZbllku249lXHMw.jpeg" /></figure><h3>Prep-work for app building in Codepipeline:</h3><p>In order to make sure our app runs consistently across all environments, we can make use of containerization with Docker (Creating a Dockerfile). To also make sure that AWS executes building the app in a container exactly how we want/need it later on (to include phases such as installing, testing, and building the necessary components of the app before Dockerizing it), we will create a buildspec file, which is specific to Codepipeline and CodeBuild.</p><p>Our <strong>Dockerfile</strong> can be as simple as this:</p><pre># Using the official lightweight Node.js 12 image. https://hub.docker.com/_/node<br>FROM node:12-slim<br><br># Creating and changing to the app directory.<br>WORKDIR /usr/src/app<br><br># Copying the application dependencies to the container.<br>COPY package*.json ./<br><br># Install production dependencies.<br>RUN npm install --only=production<br><br># Copy local code found in repository to the container.<br>COPY . ./<br><br># Command to run the web service or app when the container is started.<br>CMD [ &quot;npm&quot;, &quot;start&quot; ]</pre><p>And the <strong>buildspe.yml</strong> file can be something like this:</p><pre>version: 0.2<br><br>phases:<br>  install:<br>    commands:<br>      - echo &quot;Starting process and installing dependencies&quot;<br>      - docker info || (nohup dockerd --host=unix:///var/run/docker.sock --host=tcp://127.0.0.1:2375 &amp;) #This starts the Docker daemon if it&#39;s not already running.<br>      - timeout 15 sh -c &quot;until docker info; do echo .; sleep 1; done&quot; #Code to make sure the process waits for the Docker daemon to be ready, retrying for up to 15 seconds.<br>      - npm install<br>  pre_build:<br>    commands:<br>      - ps -p $$<br>      - echo &quot;Logging in to Amazon ECR...&quot;<br>      - aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 000000000000.dkr.ecr.us-east-1.amazonaws.com/bite #Logging into your ECR repository using AWS credentials.<br>      - export REPOSITORY_URI=000000000000.dkr.ecr.us-east-1.amazonaws.com/biteecrrepo #This sets the ECR repository URI for later use, this is where the Docker image will be stored<br>      - export IMAGE_TAG=$(echo $CODEBUILD_RESOLVED_SOURCE_VERSION | cut -c 1-7) #This creates a Docker image tag based on the current commit hash.<br>  build:<br>    commands:<br>      - echo &quot;This is the Image Tag:&quot; $IMAGE_TAG<br>      - echo &quot;This is the Repo URI:&quot; $REPOSITORY_URI  <br>      - echo &quot;Build started on `date`&quot;<br>      - echo &quot;Building the Docker image...&quot;<br>      - docker build --no-cache -t $REPOSITORY_URI:$IMAGE_TAG .<br>  post_build:<br>    commands:<br>      - pwd<br>      - ls -al<br>      - echo &quot;Build completed on `date`&quot;<br>      - echo &quot;Pushing the Docker image...&quot;<br>      - docker push $REPOSITORY_URI:$IMAGE_TAG<br>      - cd ${CODEBUILD_SRC_DIR}<br>      - printf &#39;[{&quot;name&quot;:&quot;%s&quot;,&quot;imageUri&quot;:&quot;%s:%s&quot;}]&#39; &quot;Bite_container&quot; $REPOSITORY_URI $IMAGE_TAG &gt; imagedefinitions.json<br>      - cat imagedefinitions.json<br>artifacts:<br>  files:<br>    - imagedefinitions.json<br>  discard-paths: yes</pre><p>Your repository should look like this after the two files have been created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*s6qo3N7U_FBWhUOzLrQDvw.jpeg" /></figure><h3>AWS Pipeline set-up:</h3><p>To begin, log into AWS where you will create a VPC, an ECR repository, and an ECS cluster and Task before we get to the Pipeline.</p><h3>Creating a VPC &amp; Load Balancer</h3><p>To create a VPC that will serve as the environment where your new pipeline will be protected, we simply search VPC in the search bar. AWS does a great job of making things easy, find “Create a VPC”, and make sure to select “VPC and more” when creating one so that your subnets, and other necessary essentials are created as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E1wF-MJvikf_U-R7z-jKNg.png" /><figcaption>VPC creation</figcaption></figure><p>Notice below that my VPC was swiftly created with links to each resource that was create.</p><p>P.S. Also notice that I changed the backgound lighting setting to “Dark”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JKX7qXv3DJf1jIn8TsVCtA.png" /></figure><h3>ECR Repository</h3><p>Creating an Amazon Elastic Container Registry Repository is simple, look up ECR in the search bar, navigate to “Create a repository”, give your repository a name, and you’ll see why we need it in the future.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l4Fo93slPsjOnyfgTwg4Xw.png" /><figcaption>Simply add a name to your repository</figcaption></figure><h3>ECS Cluster</h3><p>Type in ECS (Elastic Container Service), and look for “Clusters” in the left pane to click on and “Create Cluster”. The configuration can be left as is, all that is needed is a “Cluster name” and then hit “create”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kdCu9f8Jb1_BN2WY45XP2A.png" /></figure><p>While the cluster is being created, you can jump to create a new task definition, which is needed to launch a task later on. All you require is to name the Task, get the URI from the ECR repository we created earlier, and paste it in, and you can click on “create” to set up a task definition.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*66VNnKvX2I0Y5NYNeP3Gwg.png" /><figcaption>Create new task button</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fi7Z1H1Ev5vt5vDeUnq6xA.png" /><figcaption>Task creation complete</figcaption></figure><p>One final step in this is to go back to your cluster, click on “Create a service”, select your task definition as the new family, name your service, and click “create”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JXNV01BoImILYfUKG4QUMw.png" /><figcaption>Creating a service in your Cluster</figcaption></figure><h3>AWS Codepipeline:</h3><p>To link your source code and finally launch it, we can use Codepipeline to pull it, build it, and deploy it. Navigate to Codepipeline and click “Create pipeline” to get started, and then select “Build Custom Pipeline”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h7Ovhd-Ty2-nenPeNXZtSA.png" /><figcaption>“Create Pipeline” option in orange</figcaption></figure><p>Next, set up the basic configurations to ensure that Codepipeline has the proper permissions to execute its functions, and link it to your Github repository (Notice in the pictures that if you haven’t connected to Github before, you will need to set up a connection like me).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/759/1*upThRIjPPpSZvQ1lDNAIBw.png" /><figcaption>Name entered and everything left as is</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VTTrrK_BXizQ6LrutCXEjA.png" /><figcaption>Github App selected, and connection creation needed</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/753/1*jgnCG-HNF0UxLk29jMt0xg.png" /><figcaption>Source stage set-up</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/745/1*2D2cNgNDZmGvsBcU61mx6A.png" /><figcaption>Using CodeBuild, and make sure to create a “project”</figcaption></figure><p><strong>CodeBuild Project:</strong></p><p>This section is important enough that it deserves its own explanation. Make sure you select <strong>“Managed Image”</strong>, To keep things simple, then you can select a simple linux image to keep things moving. Make sure that your service role has the permision it needs, letting the system create one is always easiest. For the buildspec section, since we created the <strong>buildspec file in our Github repo</strong>, it is only right we use it, so make sure to check off that you’ll be bringing your own file to the party.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/593/1*-Rif5OOY1Uw614UYtpjnbw.png" /><figcaption>“Create a project”</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/749/1*cESQZtdCa39pR5JrXOIRcQ.png" /><figcaption>The final result should look like this</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/739/1*cJp8B2butbBny3rcy0jtKA.png" /><figcaption>Select all that applies from the created resources in this article</figcaption></figure><p>DO NOT FORGET to enter “imagedefinitions.json”, as it is crucial to help the process find its way to various variables.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3Iqb6tSf6da8ge-hVV0gjg.png" /><figcaption>Final review</figcaption></figure><p>Deploy and watch the magic happen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qvwtyl7ObwiHH0S3uSZw3w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TyHDCTURN2SQHY9PzL_kkg.png" /><figcaption>Task should be running like so</figcaption></figure><p><strong>Congratulations, you set up your pipeline via ECS, and should be in business. Please don’t hesitate to contact me should you need anything. Check out my other projects where I test out multiple tools that will make your life easier.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fd1907205a36" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Passing the Linux Essentials 010–160 Exam by LPI]]></title>
            <link>https://medium.com/@bertrandoubida/passing-the-linux-essentials-010-160-exam-by-lpi-b6e66041a34a?source=rss-7c27a8c89f65------2</link>
            <guid isPermaLink="false">https://medium.com/p/b6e66041a34a</guid>
            <category><![CDATA[command-line]]></category>
            <category><![CDATA[certification]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Bert Oubida]]></dc:creator>
            <pubDate>Mon, 04 Nov 2024 02:29:23 GMT</pubDate>
            <atom:updated>2024-11-04T02:29:23.789Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4HcClk2d7TTXChJf" /></figure><h3><strong>WHY take the exam?</strong></h3><p>The Linux essentials exam is a great way to show that you understand the open source giant that is known as Linux, some of its processes, and its best practices. As a Cloud/DevOps engineer, I personally enjoyed learning more about Linux, its many distributions, commands, and uses that I wasn’t aware of.</p><p>The test is an hour-long test with 40 questions, where you need to score at least a <em>500 out of 800 to pass</em>.</p><h3>HOW to prepare well for the exam</h3><p>Odds are that if you landed on this article, you know why you’re taking the test and are looking for resources to help you pass this exam. So to get to the point, here are resources that I believe will help you not only pass the test, but get a good handle on the topic as well. The resources below are command line help focused, the practice exams however will give you a glance into the other aspects that you need to pass the exam.</p><h3><strong>Resources:</strong></h3><ol><li><strong>Official Linux Guide-</strong></li></ol><p>Before you begin, make sure to take a good look at the <em>Official Linux study guide</em>. This guide is very long, but it contains a ton of information that will be very useful for the test: <a href="https://thinkific.s3.amazonaws.com/file_uploads/381835/attachments/e73/7cc/958/Linux_Essentials_Study_Guide.pdf">Linux_Essentials_Study_Guide.pdf</a></p><p><strong>2. Command line cheat sheet-</strong></p><p>Here is an extra cheat sheet with commands that will help you with that part of the test. <a href="https://linuxopsys.com/linux-commands-cheat-sheet#google_vignette">https://linuxopsys.com/linux-commands-cheat-sheet#google_vignette</a></p><p><strong>3. Hands-on-command line practice-</strong></p><p>A simple resource that I found to practice Commands is the following resource, offered by “CMD Challenge”<a href="https://cmdchallenge.com/">https://cmdchallenge.com/</a></p><p>For more options, and a challenging practice of the Commands, I checked out the Linux journey : <a href="https://linuxjourney.com/">https://linuxjourney.com/</a></p><p><strong>4. Practice exams by Jason Dion -</strong></p><p>Now that you reviewed concepts and even got to practice using other resources I provided. It&#39;s time to do a few if not a ton of practice exams before you sit for the real exam. I found the resources below to very helpful when it comes to getting use to the format of the test, and the questions that it will contain.</p><p><a href="https://www.udemy.com/course/linux-essentials-practice-exams/?ranMID=39197&amp;ranEAID=%2FjZHTpnCvx8&amp;ranSiteID=_jZHTpnCvx8-gqidJcI94NqzKDYE5vR6UQ&amp;utm_source=aff-campaign&amp;LSNPUBID=%2FjZHTpnCvx8&amp;utm_medium=udemyads&amp;couponCode=LEARNNOWPLANS">LPI Linux Essentials 010–160 (6 Practice Exams) | Udemy</a></p><p>An extra, cheaper resource for practice exams can be found here. I prefer the Udemy version, but I have a few acquaintances that have used the resource below instead and found it a great help.</p><p><a href="https://www.testpreptraining.com/lpi-linux-essentials-010-160-exam">https://www.testpreptraining.com/lpi-linux-essentials-010-160-exam</a></p><h3><strong>Best of luck, please feel free to come back, leave a comment/feedback as to what helped, and/or what may need updating, thank you all for reading!</strong></h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b6e66041a34a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using AWS NUKE with PowerShell]]></title>
            <link>https://medium.com/@bertrandoubida/using-aws-nuke-with-powershell-0aebc68b3a79?source=rss-7c27a8c89f65------2</link>
            <guid isPermaLink="false">https://medium.com/p/0aebc68b3a79</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[aws-nuke]]></category>
            <category><![CDATA[powershell]]></category>
            <dc:creator><![CDATA[Bert Oubida]]></dc:creator>
            <pubDate>Thu, 12 Sep 2024 11:01:42 GMT</pubDate>
            <atom:updated>2024-09-12T11:01:42.871Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*S2-dURS9mHe3THee" /></figure><blockquote><strong>BIG WARNING: </strong>Remember that AWS NUKE removes EVERYTHING in the specified account. Please be very careful when using this resource.</blockquote><h3><strong>Starting resources:</strong></h3><p>To complete this project, you need an <strong>AWS account with an Access Key</strong> created and ready for use, <strong>Powershell (ran as administrator) with the AWS CLI installed</strong>, and the <a href="https://github.com/rebuy-de/aws-nuke/releases"><strong>AWS Nuke release page</strong></a><strong>.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g2oJDV_6hMkC2tjqw4au0A.png" /><figcaption>AWS Nuke Github page</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*8AA6gg-EESh9ieEwkrBlpA.png" /><figcaption>AWS console with a pipeline built</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LA0_KYboN3zZMxZYlFwXhA.png" /><figcaption>Windows terminal</figcaption></figure><h3><strong>Step by step Process:</strong></h3><p>To begin, <strong>“RUN” the terminal as an administrator</strong>, and to confirm that you have the AWS CLI downloaded, type in</p><pre>aws - version</pre><p>To connect your AWS account if not already configured, simply gather the <strong>Access Key and Secret password</strong> you created from your AWS console, and in the terminal, type in</p><pre>aws configure</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/542/1*5o7rNVPLCm8BXmxW0fCYiw.png" /></figure><p>After entering your credentials, it is time to download AWS Nuke.</p><p>As of September 10th, 2024, below was <strong>the latest version of the Zip file of AWS Nuke</strong> to download for W<strong>indows</strong>. Simply copy and paste the following into your terminal</p><pre>curl -LO https://github.com/rebuy-de/aws-nuke/releases/download/v2.25.0/aws-nuke-v2.25.0-windows-amd64.zip</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KubU_spQWD9HYUgU6wXaHg.png" /></figure><p>now that you have the <strong>zip file</strong>, time to <strong>extract all</strong> that is inside</p><pre>tar -xf aws-nuke-v2.25.0-windows-amd64.zip</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/579/1*iGGdTLeFyxkV15ffGKDsYw.png" /></figure><p>To make it easy for ourselves, we’re going to create a <strong>new directory</strong>, <strong>rename the executable file of AWS Nuke</strong>, and <strong>move it to the newly created directory</strong> where we will also <strong>create a config file</strong>.</p><pre>mkdir &quot;C:\Program Files\AWS Nuke&quot;<br>ren aws-nuke-v2.25.0-windows-amd64.exe aws-nuke.exe<br>move aws-nuke.exe &quot;C:\Program Files\AWS Nuke&quot;<br>cd &quot;C:\Program Files\AWS Nuke&quot;</pre><p><strong>Double-check</strong> that all the commands worked by simply copying and pasting this to your terminal.</p><pre>.\aws-nuke.exe - help</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/714/1*pmv_ZlzZKLFZ2cG70yV0Qw.png" /></figure><p>Now let’s create and edit a <strong>config file</strong> to do as we please with AWS Nuke. You can <strong>customize</strong> the config file <strong>to your liking</strong> using the <a href="https://github.com/rebuy-de/aws-nuke?tab=readme-ov-file">AWS Nuke Github page</a> for guidance, this way you can place resources on the do not touch list, or specify resources you want to get rid of.</p><p>In the terminal, type in the command below</p><pre>notepad nuke-config.yml</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/585/1*BQWBlSoh41AC7V-I4BCevw.png" /><figcaption>Example of default config file, edit as you see fit</figcaption></figure><p>Here is mine:</p><pre>regions:<br>  - &quot;us-east-1&quot;  # Add more regions as needed<br>account-blocklist:<br>  - &quot;999999999999&quot;  # Replace with your own AWS account ID if you don&#39;t want to nuke it (if you want to nuke your account, remove this line)<br>accounts:<br>  &quot;----------&quot;:  # Replace with your actual AWS account ID</pre><p>After editing the config file, <strong>run the executable</strong> with the command below</p><pre>.\aws-nuke.exe - config nuke-config.yml - no-dry-run</pre><p><strong>I appreciated how the executable would not run if the account alias had “prod” in the name.</strong> Which prompted me to rename my account and run the command again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JcYcAEDE5NydtWVNLsbI7Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PIuPgSHI_MT1oCnjveh8AA.png" /><figcaption>AWS Nuke at work</figcaption></figure><h3><strong>ALL DONE!</strong></h3><p><strong>Congratulations, AWS Nuke should be working its magic now</strong>. There are some resource with deletion protection, and others like Reserved Instances that will be unaffected, but, the job will be done too well (everything wiped out) if nothing is specified. So, <strong>BE CAREFUL</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZYUOjgv1idW1guow70CpyA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0aebc68b3a79" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Quick study resources for passing the HashiCorp Certified: Terraform Associate (003) Exam]]></title>
            <link>https://medium.com/@bertrandoubida/quick-study-resources-for-passing-the-hashicorp-certified-terraform-associate-003-exam-c3aa3410783c?source=rss-7c27a8c89f65------2</link>
            <guid isPermaLink="false">https://medium.com/p/c3aa3410783c</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[study]]></category>
            <dc:creator><![CDATA[Bert Oubida]]></dc:creator>
            <pubDate>Thu, 23 May 2024 15:23:15 GMT</pubDate>
            <atom:updated>2024-06-18T16:27:02.989Z</atom:updated>
            <content:encoded><![CDATA[<p>This serves as a quick guide to provide individuals with some cloud-pipeline building experience (but little to no Terraform experience) with resources to pass the Terraform Associate Exam (003).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/0*EDjJgl8J-WT5aVLn.png" /></figure><h3><strong>Test information:</strong></h3><p>I recently passed the Terraform Associate exam by using the resources below (in the span of 10 hours over 3 days), and I am sharing this in hopes that it helps you pass as well. Some basic information about the exam is that it has 57 questions, and candidates have 1 hour (+30 minutes for those that request an ESL time accommodation) to complete it all. HashiCorp will let you know immediately after the test whether you PASS or FAIL.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mmo_crp3UmcN4c-I4Y_TQQ.png" /></figure><h3>Reviewing Terraform (click on headers for links):</h3><p><a href="https://www.youtube.com/watch?v=0m2iL7JFMnw"><strong>Getting into the basics with TechToby:</strong></a><strong> </strong>To ease into it the process, I quickly watched TechToby’s video on “Learn Terraform In 8 Minutes | Terraform Tutorial For Beginners” to get reacquainted with Terraform. This video is great at giving you a good overview of Terraform.</p><p><a href="https://rishabkumar.com/notes/terraform-associate/"><strong>Digging deeper with Rishab Kumar:</strong></a><strong> </strong>Rishab does a great job of sharing best practices and all the essentials that have to do with Terraform. Take your time with this and make sure you understand each section in this post. This was the most crucial part in my journey.</p><h4><a href="https://cloudacademy.com/search/?product=lab&amp;q=terraform"><strong>Hands-on practice with Cloud Academy:</strong></a></h4><p>I used Cloud Academy to get hands-on practice (They have a ton of labs and have a 7-day free trial you can take advantage of). Terraform seems to focus on AWS when it comes to questions and examples of cloud providers, so I did the “Terraform Deploy AWS Infrastructure challenge” hands-on lab to practice. Of course feel free to do more, I placed a big emphasis on understanding the concepts, and best practice measures put in place by Terraform.</p><h4><a href="https://skillcertpro.com/product/hashicorp-certified-terraform-associate-exam-questions/"><strong>Mock Testing with Skillcertpro:</strong></a></h4><p>After all the reviewing and practicing, I did 4 mock tests (number 1,2, 9,11) using “Skillcertpro”, I found it very convenient because of its “check” feature that explains the reasoning behind the answers as you progress along the questions, and that it was affordable at $20 USD. Skillcertpro even has a fact sheet on test #12, make sure to take a look there.</p><h4><a href="https://developer.hashicorp.com/terraform/tutorials/certification-003/associate-study-003">Checks and balances with Official Terraform site:</a></h4><p>Try your hand at the Terraform sample questions here: <a href="https://developer.hashicorp.com/terraform/tutorials/certification-003/associate-questions">Sample questions — Terraform Associate certification | Terraform | HashiCorp Developer</a>.</p><p>Also take a look at the exam objectives below to make sure you can answer and speak to the Terraform subjects (include “-refresh-only” in your review).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/693/1*-EAh0EMzvoGv9WRanMFwaw.png" /></figure><p>Knowing the difference between the current and last version of the exam also helps you see and think about what is important and most likely will be on the test.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*6xCVKeMkG5p-FBZKyGIOPg.png" /></figure><h4>Final check before your exam:</h4><p>After taking the mock tests and making sure you’re scoring above the average on those, coupled with the resources I provided, you should be ready for the exam.</p><p>I took the exam at home, my background was a bit noisy with the sounds of a busy city street, but the exam proctor was straight forward with instructions so make sure we were both comfortable before starting the exam. I finished my exam with ample time to review all my flagged questions (much easier to answer when I went back to them), and the final resource below also helped me figure out what to expect. BEST OF LUCK AND FEEL FREE TO LEAVE A COMMENT SHOULD I BE ABLE TO DO ANYTHING FOR YOU. My LinkedIn is also open should you want a bit more direct contact.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c3aa3410783c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Redirecting sub-sites (URLs and Subdomains) in Apache2]]></title>
            <link>https://medium.com/@bertrandoubida/redirecting-sub-sites-urls-and-subdomains-in-apache2-5d1d33909a54?source=rss-7c27a8c89f65------2</link>
            <guid isPermaLink="false">https://medium.com/p/5d1d33909a54</guid>
            <category><![CDATA[url]]></category>
            <category><![CDATA[apache]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[subdomain]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Bert Oubida]]></dc:creator>
            <pubDate>Thu, 18 Jan 2024 03:53:08 GMT</pubDate>
            <atom:updated>2024-01-18T03:54:41.097Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*a-_n6PjsFVHSu52XXPo9Yw.jpeg" /></figure><h3>Redirecting</h3><ol><li>Navigate to the Apache Configuration Directory:</li></ol><pre>cd /etc/apache2/sites-available</pre><ol><li>Edit the 000-default.conf File:</li><li>Use a text editor to edit the 000-default.conf file. You may use nano, vim, or any other text editor you are comfortable with:</li></ol><pre>sudo nano 000-default.conf</pre><p>Add Redirect Rules:</p><ol><li>Add the following Redirect rules within the &lt;VirtualHost&gt; section:</li></ol><ul><li>Use “RedirectMatch 301 ^/” to redirect from the current sub-site to the new sub site by stating it immediately after (as seen in the examples below).</li></ul><pre>&lt;VirtualHost *:80&gt;<br>    ServerAdmin webmaster@localhost<br>    DocumentRoot /var/www/html<br><br>    # Add the following Redirect rules<br>    RedirectMatch 301 ^/wastelessfeedmore$ /<br>    RedirectMatch 301 ^/getstarted$ /<br>    RedirectMatch 301 ^/help$ /faq-support/<br><br>    # ... (other configuration)<br>&lt;/VirtualHost&gt;</pre><p>Save the file, restart Apache after making changes to the configuration file:</p><pre>sudo systemctl restart apache2</pre><p>Congratulations, simple and straight forward.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5d1d33909a54" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Re:Invent yourself with purpose (AWS conference)]]></title>
            <link>https://medium.com/@bertrandoubida/re-invent-yourself-with-purpose-aws-conference-52e8c63842cb?source=rss-7c27a8c89f65------2</link>
            <guid isPermaLink="false">https://medium.com/p/52e8c63842cb</guid>
            <category><![CDATA[conference]]></category>
            <category><![CDATA[news]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[las-vegas]]></category>
            <dc:creator><![CDATA[Bert Oubida]]></dc:creator>
            <pubDate>Tue, 12 Dec 2023 05:25:30 GMT</pubDate>
            <atom:updated>2023-12-17T19:24:24.381Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*adyK-KFiHbXS5DkW.jpg" /></figure><p>Interested in attending the biggest AWS conference of the year? AWS holds a conference every year where they announce the newest technological advances, and improvement made to current resources already in market. I have been to Re:Invent 2022 and 2023, and I wish I had a quick but informative guide to help me make the most of my time at the conference. So here we are :).</p><h3>Flights, Hotels, and Transportaion:</h3><p>The conference runs from Sunday to noon on Friday. I am a big fan of making the most of my attendance, so I would recommend <strong>getting in on Sunday</strong>. Most hotels allow you to check in as early as 12PM if the room is available, if not, it is 3PM. Below is a map of the hotels that AWS deems most convenient for this conference. Through the AWS Re:Invent portal, the first registrants get a discount for their stay at these hotels (limited while it lasts). I would recommend the <strong>hotels situated at the top of the strip</strong> (Treasure Island, Mirage, Encore, etc…). Last on this list is the included shuttle service offered by AWS. <strong>Shuttle service</strong> is provided from the airport to the hotels, and from venue to venue during this conference. For travel outside of the venues, lyft/uber is very common and will run you anywhere from $7 to $25 per trip.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oedg-4gt-l1J-ZHT" /></figure><h3>Necessities and Conference</h3><p>You’re all booked for the trip and hotel, congratulations, now here are the essentials for this trip.</p><ol><li>Very comfortable shoes.</li><li>Casual clothes to attend sessions, and labs during the day (jeans, pants, anything nice and comfortable)</li><li>Dressy clothes to party at a nightclub, hit some golf balls, and enjoy a few drinks as you network at bars.</li><li>Plenty of empty space in your suitcase (many vendors give free gifts and goodies at the “Expo center” during the conference, it’s nice to prepare space for the number of shirts, socks, and cool little gadgets you’ll receive).</li><li>The courage to approach people, introduce yourself and aim to genuinely get to know them.</li><li>Mapping out the learning sessions you would like to attend, 1–3 a day was plenty for me.</li></ol><p>To provide more information on the conference, the first thing to be aware of is that<strong> breakfast and lunch are provided at each venue </strong>where sessions are held (more information in your Re:Invent portal catalog). Yes, the food is good, and there is a variety of it for all dietary needs.</p><h3>AWS Re:Invent App</h3><p>As soon as you sign up, make sure to download the AWS event app (as conferences are held all over the world, the app allows you to check on the offerings of the events, and RSVP if eligible. Simply find the app in your App store, here is the apple version of the app: <a href="https://apps.apple.com/us/app/aws-events/id1457242918">AWS Events on the App Store (apple.com)</a></p><p>In the app, you will find my favorite feature, which is “<strong>Peer talks</strong>”. Peer talks allows you to reach out to anyone attending Re:Invent. You start by sending an invitation to communicate, and then can request a meeting at the many available locations provided by the conference through the app. This essentially means, you can network with like-minded individuals that are in your position, more senior, or a comepletely different industry. Knowledge is indeed power, and I believe it should be shared, so I would recommend utilizing this as much as you can!</p><p><strong>Follow the link to subscribe for updates on information regarding the next Re-invent: </strong><a href="https://reinvent.awsevents.com/#footer">AWS re:Invent 2023 | Amazon Web Services (awsevents.com)</a></p><h3>After-hour networking events and parties</h3><p>Every year, all the big organizations attempt to sell their products and get their names out there through party and networking events that occur after the conference halls are closed (6 or 7PM). You can find a list of all the events in the link I will provide below, make sure to RSVP to the ones you are interested in as soon as you register for re:invent, these events get filled up quickly and many are placed on the waitlist.</p><p><a href="https://conferenceparties.com/reinvent2023/">re:Invent Parties 2023 — Unofficial list of AWS re:Invent Conference and Vendor Parties (conferenceparties.com)</a></p><h3><strong>Other nice to explore areas:</strong></h3><p><strong>Area 15:</strong> Located right off the strip, you’ll have to uber/lyft here. This is a fun artsy area where you can visit exhibits (my favorite was Meow-wolf), eat good food, make memories at places like the arcade, and distract yourself in general.</p><p><strong>Las Vegas sign:</strong> located right next to the LAS airport, and the Las Vegas Harley Davidson store, there are many ways to get here. Walking and an uber/lyft are the best options. Unfortunately, with an uber/lyft, you’ll be hopping out for a quick picture, and then calling another uber. This is a 1 mile walk from the Mandalay Bay hotel, and not too bad if it’s not hot outside.<a href="https://www.google.com/maps?ll=36.082073,-115.172779&amp;z=16&amp;t=m&amp;hl=en&amp;gl=US&amp;mapclient=embed&amp;cid=4756498468048835337"> Click here for a Google map view of the location.</a></p><p><strong>Fremont experience:</strong> This is considered downtown Las Vegas and always active every night until about 1:30AM. There is always live music playing, great food, bars, casinos, and a ton of friendly locals. If in the area, check out the area’s newest built adults only building, the “Circa resort &amp; casino”. This place has a massive zone for sport lovers to enjoy every game being played, a large casino, and a rooftop club.</p><h3>AWS: All Builders Welcome Grant program</h3><p>New to tech and trying to find a way to still make it to the conference? Great thing is that AWS created a grant program that offers an all-expense paid trip to the event if you are chosen. That is, you get a paid for ticket to AWS Re:Invent, flight to and from the event, accommodations at a nearby hotel, a mentor at the event, and a great opportunity to meet like-minded future leaders of the industry from all over the world. This program is great at creating a community and setting up participants for success through sharing knowledge.</p><p><strong>Registration for the grant is usually made available at the beginning of August</strong>, follow my LinkedIn, and turn on notifications so that you can be notified when I post on the matter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/0*zwX8xLN9sNvq8gyz" /><figcaption>2022 AWS ABW Grant Recipients</figcaption></figure><p><a href="https://www.linkedin.com/in/boubida">Bertrand Oubida| LinkedIn</a></p><p>~Thank you for reading! Feel free to reach out should you have any specific questions, if it didn’t jump out at you, definitely note that I love meeting new people and sharing information :).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=52e8c63842cb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cloudformation template for hosting a Password protected Static Website on AWS Using Github…]]></title>
            <link>https://medium.com/@bertrandoubida/cloudformation-template-for-hosting-a-password-protected-static-website-on-aws-using-github-7e93367d1ea1?source=rss-7c27a8c89f65------2</link>
            <guid isPermaLink="false">https://medium.com/p/7e93367d1ea1</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloudformation]]></category>
            <category><![CDATA[cloudfront]]></category>
            <category><![CDATA[lambda]]></category>
            <category><![CDATA[static-site]]></category>
            <dc:creator><![CDATA[Bert Oubida]]></dc:creator>
            <pubDate>Sun, 19 Nov 2023 07:12:00 GMT</pubDate>
            <atom:updated>2025-09-24T23:11:05.745Z</atom:updated>
            <content:encoded><![CDATA[<h3>Cloudformation template for hosting a Password protected Static Website on AWS Using Github, Codepipeline, S3, CloudFront, lambda and Route53.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*mSMdbyLINZqsl_iC.jpg" /></figure><h3><strong>1. Pre-requisites:</strong></h3><p><strong>S3 bucket (for codepipeline logs)</strong>: Making sure you are in the US-EAST-1 region of AWS is crucial to this. Creation of an S3 bucket (named “codepipeline-logs-bucket” in my code below) to be used for the Artifact store of our codepipeline resource is needed.</p><p><strong>DNS name &amp; DNS certificate: </strong>Creation of a “Hosted Zone” in Route 53 (mine is “myappdns.com”) and a certificate in Certificate Manager that includes a wild card ( myappdns.com and */myappdns.com. Also make sure to create a record on route 53 when prompted by the creation of your certificate).</p><p><strong>CodeStarSourceConnection (to connect your github account)</strong>: Navigate to Codepipeline, then to settings to create the connection configuration needed for AWS to pull the files from your Github.</p><p>*As a side note, we are creating these resources separately from our other resources in the template because in my case, I have a bucket already set up for ALL artifact stores. My Domain name, and certificate were already configured, and the template is set up in a way where you can launch it many times and not get coinciding problems with resources already created. (Feel free to contact me if you need any help with your template).</p><h3>2. Template explanation (Full template at bottom)</h3><p><em>a.</em> The first part of the Cloudformation template starts by using “transfrom” to turn our Serverless lambda code into a readable syntax for cloudformation. We then go on to list a number of “Parameters” that are necessary to make sure we can customize our resources to our liking. This is where you’ll be using the values of resources you created in the “pre-requisite” portion of this guide. The values you enter in the parameter, will later be referenced down the line to create and tie some of the resources together.</p><pre>AWSTemplateFormatVersion: &quot;2010-09-09&quot;<br>Transform: &#39;AWS::Serverless-2016-10-31&#39;<br>Parameters:<br>  AppName:<br>    Description: &quot;e.g. Static-WebApp&quot;<br>    Type: &quot;String&quot;<br>    MinLength: 1<br>    Default: &quot;MyStaticSitev1&quot;<br>  FullAppName:<br>    Description: &quot;Desired Full Alias record (e.g. following the prompt above, i.e. docs.myappdns.com)&quot;<br>    Type: &quot;String&quot;<br>    MinLength: 1<br>    Default: &quot;docs.myappdns.com&quot;<br>  CustomBucketName:<br>    Description: &quot;All must be lowercase (e.g. bert-static-webapp-sandbox)&quot;<br>    Type: &quot;String&quot;<br>    MinLength: 1<br>    Default: &quot;bert-static-webapp-staging&quot;<br>  GitHubRepoName:<br>    Description: &quot;GitHub repository name&quot;<br>    Type: &quot;String&quot;<br>    MinLength: 1<br>    Default: &quot;Webpage&quot;<br>  GitHubBranchName:<br>    Description: &quot;GitHub branch name (e.g. main)&quot;<br>    Type: &quot;String&quot;<br>    MinLength: 1<br>    Default: &quot;main&quot;<br>  Environment:<br>    Description: &quot;Environment app should run under (e.g. Production)&quot;<br>    Type: &quot;String&quot;<br>    Default: &quot;Staging&quot;<br>    AllowedValues:<br>      - &quot;Production&quot;<br>      - &quot;Sandbox&quot;<br>      - &quot;Staging&quot;<br>      - &quot;Testing&quot;<br>    ConstraintDescription: &quot;Must specify an environment.&quot;<br>  StaticSiteOriginPath:<br>    Description: &quot;Path to static site documents in S3 bucket (e.g. /docs)&quot;<br>    Type: &quot;String&quot;<br>    MinLength: 1<br>  ACMCertificateArn:<br>    Description: &quot;Arn found in AWS Certificate Manager for specific URL desired (e.g. arn:aws:acm:us-east-1:123456789012:certificate/your-acm-certificate-id)&quot;<br>    Type: &quot;String&quot;<br>    MinLength: 1<br>  AWSHostedZoneName:<br>    Description: &quot;Name of Hosted Zone in Route 53 to use for FullAppName (e.g. staging.api.gocopia.com)&quot;<br>    Type: &quot;String&quot;<br>    MinLength: 1<br>  AWSHostedZoneID:<br>    Description: &quot;ID of Hosted Zone in Route 53 to use for FullAppName (e.g. Z0703764ASVK6MTPIASJ)&quot;<br>    Type: &quot;String&quot;<br>    MinLength: 1</pre><p><em>b.</em> The following part of my template starts by creating the S3 buckets needed to storage our static site files, and the logs that will be generated from our use of Cloudfront. Bucket policies are added as well to block access to our buckets unless it’s the resource (Cloudfront) we want.</p><p>Two things to note with this are. 1. That the following portion in the logging bucket section “OwnershipControls: Rules: — ObjectOwnership: BucketOwnerPreferred” is needed to specify that the bucket is tied to our Cloudfront. In the Route53 section, “HostedZoneId: Z2FDTNDATAQYW2” is always the value for Cloudfront’s HostedZoneId (So no need to edit it).</p><pre>Resources:<br>  S3Bucket:<br>    Type: &quot;AWS::S3::Bucket&quot;<br>    DeletionPolicy: Retain<br>    Properties:<br>      BucketName:<br>        Ref: &quot;CustomBucketName&quot;<br>      PublicAccessBlockConfiguration:<br>        BlockPublicAcls: true<br>        BlockPublicPolicy: true<br>        IgnorePublicAcls: true<br>        RestrictPublicBuckets: true<br>      WebsiteConfiguration:<br>        IndexDocument: index.html<br>        ErrorDocument: error.html<br>  BucketPolicy:<br>    Type: &quot;AWS::S3::BucketPolicy&quot;<br>    Properties:<br>      Bucket:<br>        Ref: &#39;S3Bucket&#39;<br>      PolicyDocument:<br>        Version: &#39;2012-10-17&#39;<br>        Statement:<br>          - Effect: Allow<br>            Principal:<br>              Service: &quot;cloudfront.amazonaws.com&quot;<br>            Action: &#39;s3:GetObject&#39;<br>            Resource:<br>              !Sub &quot;${S3Bucket.Arn}/*&quot;<br>  LoggingBucket:<br>    Type: &quot;AWS::S3::Bucket&quot;<br>    DeletionPolicy: Retain<br>    Properties:<br>      BucketName: !Join<br>        - &quot;&quot;<br>        - - !Ref CustomBucketName<br>          - &quot;logs&quot;<br>      AccessControl: Private<br>      OwnershipControls:<br>        Rules:<br>          - ObjectOwnership: BucketOwnerPreferred<br>  LoggingBucketPolicy:<br>    Type: &quot;AWS::S3::BucketPolicy&quot;<br>    Properties:<br>      Bucket: !Ref &#39;LoggingBucket&#39;<br>      PolicyDocument:<br>        Version: &#39;2012-10-17&#39;<br>        Statement:<br>          - Effect: Allow<br>            Principal:<br>              Service: &quot;cloudfront.amazonaws.com&quot;<br>            Action: &#39;s3:PutObject&#39;<br>            Resource:<br>              !Sub &quot;${LoggingBucket.Arn}/*&quot;<br>  Route53Record:<br>    Type: AWS::Route53::RecordSet<br>    Properties:<br>      HostedZoneId: !Ref AWSHostedZoneID<br>      Name: !Ref FullAppName<br>      Type: A<br>      AliasTarget:<br>        DNSName:<br>          Fn::GetAtt:<br>            - CloudFrontDistribution<br>            - DomainName<br>        HostedZoneId: Z2FDTNDATAQYW2</pre><p><em>c.</em> This section is where we create the lambda edge function that will hold the code for the password protection of our static site. To edit the password and username, find the following part in the lambda code and edit the values to what you would like.</p><pre>const authUser = &#39;user&#39;;<br>const authPass = &#39;password&#39;;</pre><p>A special tip for connection our lambda to the Cloudfront. The “LambdaFunctionAssociations” portion of the Cloudformation code below only take the ARN of a version of the lambda, so we created one to satisfy the requirement.</p><p>Remember that only a lambda@edge and not a regular lambda works with cloudfront so we adjust to launch from US-EAST-1 (only region where Lambda edges can be created), and edit our cloudformation code accordingly.</p><pre>WebAppAuthFunction:<br>    Type: AWS::Serverless::Function<br>    Properties:<br>      Handler: index.handler<br>      Runtime: nodejs16.x<br>      Timeout: 5<br>      MemorySize: 128<br>      PackageType: Zip<br>      InlineCode: |<br>        &#39;use strict&#39;;<br>        exports.handler = (event, context, callback) =&gt; {<br>          // Get request and request headers<br>          const request = event.Records[0].cf.request;<br>          const headers = request.headers;<br>          // Configure authentication<br>          const authUser = &#39;user&#39;;<br>          const authPass = &#39;password&#39;;<br>        <br>          // Construct the Basic Auth string<br>          const authString = &#39;Basic &#39; + Buffer.from(authUser + &#39;:&#39; + authPass).toString(&#39;base64&#39;);<br>          // Require Basic authentication<br>          if (typeof headers.authorization === &#39;undefined&#39; || headers.authorization[0].value !== authString) {<br>            const body = &#39;Unauthorized&#39;;<br>            const response = {<br>              status: &#39;401&#39;,<br>              statusDescription: &#39;Unauthorized&#39;,<br>              body: body,<br>              headers: {<br>                &#39;www-authenticate&#39;: [{ key: &#39;WWW-Authenticate&#39;, value: &#39;Basic&#39; }]<br>              },<br>            };<br>            callback(null, response);<br>          }<br>          // Continue request processing if authentication passed<br>          callback(null, request);<br>        };<br>      Role: !GetAtt WebAppAuthFunctionRole.Arn<br>  WebAppAuthFunctionRole:<br>    Type: &quot;AWS::IAM::Role&quot;<br>    Properties:<br>      Path: &quot;/&quot;<br>      ManagedPolicyArns:<br>        - &quot;arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole&quot;<br>      AssumeRolePolicyDocument:<br>        Version: &quot;2012-10-17&quot;<br>        Statement:<br>          - Sid: &quot;AllowLambdaServiceToAssumeRole&quot;<br>            Effect: &quot;Allow&quot;<br>            Action:<br>              - &quot;sts:AssumeRole&quot;<br>            Principal:<br>              Service:<br>                - &quot;lambda.amazonaws.com&quot;<br>                - &quot;edgelambda.amazonaws.com&quot;<br>  WebAppAuthFunctionVersion:<br>    Type: &quot;AWS::Lambda::Version&quot;<br>    Properties:<br>      FunctionName: !Ref WebAppAuthFunction<br>      Description: v1</pre><p><em>d.</em> Below, we finally create our Cloudfront, reference some of the values from our pre-requisite portion, and make sure to include that this resource should be created after our lambda function (we use the <br>“DependsOn:” marker for this). After this is created, you will have a cloudfront resource that pulls from your created S3 bucket with the webapp files, launches your site, and adds the lambda edge as a password verification tool in front of access to the WebApp, and lastly, ties the created Domain name (in “Aliases”) to the resource so your WebApp is accessible at that name.</p><pre>CloudFrontDistribution:<br>    Type: AWS::CloudFront::Distribution<br>    Properties:<br>      DistributionConfig:<br>        Origins:<br>          - DomainName: !GetAtt S3Bucket.RegionalDomainName<br>            Id: S3StaticContent<br>            S3OriginConfig:<br>              OriginAccessIdentity: &quot;&quot;<br>            OriginAccessControlId: !GetAtt WebAppOriginAccessControl.Id<br>            OriginPath: !Ref StaticSiteOriginPath<br>        DefaultRootObject: index.html<br>        Enabled: true<br>        DefaultCacheBehavior:<br>          CachePolicyId: 4135ea2d-6df8-44a3-9df3-4b5a84be39ad<br>          TargetOriginId: S3StaticContent<br>          ViewerProtocolPolicy: redirect-to-https<br>          AllowedMethods:<br>            - GET<br>            - HEAD<br>          Compress: true<br>          LambdaFunctionAssociations:<br>            - EventType: viewer-request<br>              LambdaFunctionARN: !Ref WebAppAuthFunctionVersion<br>        Aliases:<br>          - !Ref FullAppName<br>        ViewerCertificate:<br>          AcmCertificateArn: !Ref ACMCertificateArn<br>          SslSupportMethod: sni-only<br>        Logging:<br>          Bucket: !Sub<br>            - &quot;${BucketName}.s3.amazonaws.com&quot;<br>            - BucketName: !Ref LoggingBucket<br>        PriceClass: PriceClass_100<br>    DependsOn:<br>      - WebAppAuthFunction      <br>  WebAppOriginAccessControl:<br>    Type: AWS::CloudFront::OriginAccessControl<br>    Properties:<br>      OriginAccessControlConfig:<br>        Name:<br>          !Join<br>          - &quot;-&quot;<br>          -<br>            - Ref: &quot;CustomBucketName&quot;<br>            - &quot;OACConfig&quot;<br>            - Ref: &quot;Environment&quot;<br>        OriginAccessControlOriginType: s3<br>        SigningBehavior: always<br>        SigningProtocol: sigv4</pre><p><em>e.</em> Lastly, we create the pipeline to configure the code pull from Github, placement of files in our S3 bucket, deployment of the site using our S3 bucket (so it is readable by cloudfront), and the permissions needed to execute all this. An important thing to remember is that we need to get the ARN of our codestarconnection (created in the prerequisites) and input into the source stage of this code.</p><pre>CodePipeline:<br>    Type: &quot;AWS::CodePipeline::Pipeline&quot;<br>    Properties:<br>      Name:<br>        !Join<br>        - &quot;-&quot;<br>        - <br>          - &quot;Bert&quot;<br>          - Ref: &quot;AppName&quot;<br>          - Ref: &quot;Environment&quot;<br>      ArtifactStore:<br>        Type: &quot;S3&quot;<br>        Location: &quot;codepipeline-logs-bucket&quot;<br>      RoleArn: !GetAtt CodePipelineRole.Arn<br>      RestartExecutionOnUpdate: true<br>      Stages:<br>        -<br>          Name: &quot;Source&quot;<br>          Actions:<br>            -<br>              Name: &quot;Source&quot;<br>              ActionTypeId:<br>                Category: &quot;Source&quot;<br>                Owner: &quot;AWS&quot;<br>                Provider: &quot;CodeStarSourceConnection&quot;<br>                Version: 1<br>              OutputArtifacts:<br>                - Name: &quot;SourceArtifact&quot;<br>              Configuration:<br>                ConnectionArn: &quot;arn:aws:codestar-connections:us-east-1:049999999999:connection/99999999-e9af-9af9-a99b-9ed999999999&quot;<br>                FullRepositoryId:<br>                  !Join [&quot;/&quot;, [ &quot;myappdnsdocs&quot;, Ref: &quot;GitHubRepoName&quot; ]]<br>                BranchName:<br>                  Ref: &quot;GitHubBranchName&quot;<br>                DetectChanges: true<br>              RunOrder: 1<br>        -<br>          Name: &quot;Deploy&quot;<br>          Actions:<br>            -<br>              Name: &quot;Deploy&quot;<br>              ActionTypeId:<br>                Category: &quot;Deploy&quot;<br>                Owner: &quot;AWS&quot;<br>                Provider: &quot;S3&quot;<br>                Version: 1<br>              InputArtifacts:<br>                - Name: &quot;SourceArtifact&quot;<br>              Configuration:<br>                BucketName:<br>                  Ref: &quot;S3Bucket&quot;<br>                Extract: &quot;true&quot;<br>      ArtifactStore:<br>        Type: &quot;S3&quot;<br>        Location: &quot;codepipeline-logs-bucket&quot;<br>  CodePipelineRole:<br>    Type: AWS::IAM::Role<br>    Properties:<br>      RoleName: MyCodePipelineRole<br>      AssumeRolePolicyDocument:<br>        Version: &quot;2012-10-17&quot;<br>        Statement:<br>          - Effect: Allow<br>            Principal:<br>              Service:<br>                - codepipeline.amazonaws.com<br>            Action: sts:AssumeRole<br>      ManagedPolicyArns:<br>        - arn:aws:iam::aws:policy/AWSCodePipeline_FullAccess</pre><p>Congratulations, now that you understand what our code is doing, you can edit where necessary and hopefully accomplish what you set out to do. Below is my full Cloudformation template:</p><pre>AWSTemplateFormatVersion: &quot;2010-09-09&quot;<br>Transform: &#39;AWS::Serverless-2016-10-31&#39;<br>Parameters:<br>  AppName:<br>    Description: &quot;e.g. Static-WebApp&quot;<br>    Type: &quot;String&quot;<br>    MinLength: 1<br>    Default: &quot;MyStaticSitev1&quot;<br>  FullAppName:<br>    Description: &quot;Desired Full Alias record (e.g. following the prompt above, i.e. docs.myappdns.com)&quot;<br>    Type: &quot;String&quot;<br>    MinLength: 1<br>    Default: &quot;docs.myappdns.com&quot;<br>  CustomBucketName:<br>    Description: &quot;All must be lowercase (e.g. bert-static-webapp-sandbox)&quot;<br>    Type: &quot;String&quot;<br>    MinLength: 1<br>    Default: &quot;bert-static-webapp-staging&quot;<br>  GitHubRepoName:<br>    Description: &quot;GitHub repository name&quot;<br>    Type: &quot;String&quot;<br>    MinLength: 1<br>    Default: &quot;Webpage&quot;<br>  GitHubBranchName:<br>    Description: &quot;GitHub branch name (e.g. main)&quot;<br>    Type: &quot;String&quot;<br>    MinLength: 1<br>    Default: &quot;main&quot;<br>  Environment:<br>    Description: &quot;Environment app should run under (e.g. Production)&quot;<br>    Type: &quot;String&quot;<br>    Default: &quot;Staging&quot;<br>    AllowedValues:<br>      - &quot;Production&quot;<br>      - &quot;Sandbox&quot;<br>      - &quot;Staging&quot;<br>      - &quot;Testing&quot;<br>    ConstraintDescription: &quot;Must specify an environment.&quot;<br>  StaticSiteOriginPath:<br>    Description: &quot;Path to static site documents in S3 bucket (e.g. /docs)&quot;<br>    Type: &quot;String&quot;<br>    MinLength: 1<br>  ACMCertificateArn:<br>    Description: &quot;Arn found in AWS Certificate Manager for specific URL desired (e.g. arn:aws:acm:us-east-1:123456789012:certificate/your-acm-certificate-id)&quot;<br>    Type: &quot;String&quot;<br>    MinLength: 1<br>  AWSHostedZoneName:<br>    Description: &quot;Name of Hosted Zone in Route 53 to use for FullAppName (e.g. staging.api.gocopia.com)&quot;<br>    Type: &quot;String&quot;<br>    MinLength: 1<br>  AWSHostedZoneID:<br>    Description: &quot;ID of Hosted Zone in Route 53 to use for FullAppName (e.g. Z0703764ASVK6MTPIASJ)&quot;<br>    Type: &quot;String&quot;<br>    MinLength: 1<br>Resources:<br>  S3Bucket:<br>    Type: &quot;AWS::S3::Bucket&quot;<br>    DeletionPolicy: Retain<br>    Properties:<br>      BucketName:<br>        Ref: &quot;CustomBucketName&quot;<br>      PublicAccessBlockConfiguration:<br>        BlockPublicAcls: true<br>        BlockPublicPolicy: true<br>        IgnorePublicAcls: true<br>        RestrictPublicBuckets: true<br>      WebsiteConfiguration:<br>        IndexDocument: index.html<br>        ErrorDocument: error.html<br>  BucketPolicy:<br>    Type: &quot;AWS::S3::BucketPolicy&quot;<br>    Properties:<br>      Bucket:<br>        Ref: &#39;S3Bucket&#39;<br>      PolicyDocument:<br>        Version: &#39;2012-10-17&#39;<br>        Statement:<br>          - Effect: Allow<br>            Principal:<br>              Service: &quot;cloudfront.amazonaws.com&quot;<br>            Action: &#39;s3:GetObject&#39;<br>            Resource:<br>              !Sub &quot;${S3Bucket.Arn}/*&quot;<br>  LoggingBucket:<br>    Type: &quot;AWS::S3::Bucket&quot;<br>    DeletionPolicy: Retain<br>    Properties:<br>      BucketName: !Join<br>        - &quot;&quot;<br>        - - !Ref CustomBucketName<br>          - &quot;logs&quot;<br>      AccessControl: Private<br>      OwnershipControls:<br>        Rules:<br>          - ObjectOwnership: BucketOwnerPreferred<br>  LoggingBucketPolicy:<br>    Type: &quot;AWS::S3::BucketPolicy&quot;<br>    Properties:<br>      Bucket: !Ref &#39;LoggingBucket&#39;<br>      PolicyDocument:<br>        Version: &#39;2012-10-17&#39;<br>        Statement:<br>          - Effect: Allow<br>            Principal:<br>              Service: &quot;cloudfront.amazonaws.com&quot;<br>            Action: &#39;s3:PutObject&#39;<br>            Resource:<br>              !Sub &quot;${LoggingBucket.Arn}/*&quot;<br>  Route53Record:<br>    Type: AWS::Route53::RecordSet<br>    Properties:<br>      HostedZoneId: !Ref AWSHostedZoneID<br>      Name: !Ref FullAppName<br>      Type: A<br>      AliasTarget:<br>        DNSName:<br>          Fn::GetAtt:<br>            - CloudFrontDistribution<br>            - DomainName<br>        HostedZoneId: Z2FDTNDATAQYW2<br>  WebAppAuthFunction:<br>    Type: AWS::Serverless::Function<br>    Properties:<br>      Handler: index.handler<br>      Runtime: nodejs16.x<br>      Timeout: 5<br>      MemorySize: 128<br>      PackageType: Zip<br>      InlineCode: |<br>        &#39;use strict&#39;;<br>        exports.handler = (event, context, callback) =&gt; {<br>          // Get request and request headers<br>          const request = event.Records[0].cf.request;<br>          const headers = request.headers;<br>          // Configure authentication<br>          const authUser = &#39;user&#39;;<br>          const authPass = &#39;password&#39;;<br>        <br>          // Construct the Basic Auth string<br>          const authString = &#39;Basic &#39; + Buffer.from(authUser + &#39;:&#39; + authPass).toString(&#39;base64&#39;);<br>          // Require Basic authentication<br>          if (typeof headers.authorization === &#39;undefined&#39; || headers.authorization[0].value !== authString) {<br>            const body = &#39;Unauthorized&#39;;<br>            const response = {<br>              status: &#39;401&#39;,<br>              statusDescription: &#39;Unauthorized&#39;,<br>              body: body,<br>              headers: {<br>                &#39;www-authenticate&#39;: [{ key: &#39;WWW-Authenticate&#39;, value: &#39;Basic&#39; }]<br>              },<br>            };<br>            callback(null, response);<br>          }<br>          // Continue request processing if authentication passed<br>          callback(null, request);<br>        };<br>      Role: !GetAtt WebAppAuthFunctionRole.Arn<br>  WebAppAuthFunctionRole:<br>    Type: &quot;AWS::IAM::Role&quot;<br>    Properties:<br>      Path: &quot;/&quot;<br>      ManagedPolicyArns:<br>        - &quot;arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole&quot;<br>      AssumeRolePolicyDocument:<br>        Version: &quot;2012-10-17&quot;<br>        Statement:<br>          - Sid: &quot;AllowLambdaServiceToAssumeRole&quot;<br>            Effect: &quot;Allow&quot;<br>            Action:<br>              - &quot;sts:AssumeRole&quot;<br>            Principal:<br>              Service:<br>                - &quot;lambda.amazonaws.com&quot;<br>                - &quot;edgelambda.amazonaws.com&quot;<br>  WebAppAuthFunctionVersion:<br>    Type: &quot;AWS::Lambda::Version&quot;<br>    Properties:<br>      FunctionName: !Ref WebAppAuthFunction<br>      Description: v1<br>  CloudFrontDistribution:<br>    Type: AWS::CloudFront::Distribution<br>    Properties:<br>      DistributionConfig:<br>        Origins:<br>          - DomainName: !GetAtt S3Bucket.RegionalDomainName<br>            Id: S3StaticContent<br>            S3OriginConfig:<br>              OriginAccessIdentity: &quot;&quot;<br>            OriginAccessControlId: !GetAtt WebAppOriginAccessControl.Id<br>            OriginPath: !Ref StaticSiteOriginPath<br>        DefaultRootObject: index.html<br>        Enabled: true<br>        DefaultCacheBehavior:<br>          CachePolicyId: 4135ea2d-6df8-44a3-9df3-4b5a84be39ad<br>          TargetOriginId: S3StaticContent<br>          ViewerProtocolPolicy: redirect-to-https<br>          AllowedMethods:<br>            - GET<br>            - HEAD<br>          Compress: true<br>          LambdaFunctionAssociations:<br>            - EventType: viewer-request<br>              LambdaFunctionARN: !Ref WebAppAuthFunctionVersion<br>        Aliases:<br>          - !Ref FullAppName<br>        ViewerCertificate:<br>          AcmCertificateArn: !Ref ACMCertificateArn<br>          SslSupportMethod: sni-only<br>        Logging:<br>          Bucket: !Sub<br>            - &quot;${BucketName}.s3.amazonaws.com&quot;<br>            - BucketName: !Ref LoggingBucket<br>        PriceClass: PriceClass_100<br>    DependsOn:<br>      - WebAppAuthFunction      <br>  WebAppOriginAccessControl:<br>    Type: AWS::CloudFront::OriginAccessControl<br>    Properties:<br>      OriginAccessControlConfig:<br>        Name:<br>          !Join<br>          - &quot;-&quot;<br>          -<br>            - Ref: &quot;CustomBucketName&quot;<br>            - &quot;OACConfig&quot;<br>            - Ref: &quot;Environment&quot;<br>        OriginAccessControlOriginType: s3<br>        SigningBehavior: always<br>        SigningProtocol: sigv4<br>  CodePipeline:<br>    Type: &quot;AWS::CodePipeline::Pipeline&quot;<br>    Properties:<br>      Name:<br>        !Join<br>        - &quot;-&quot;<br>        - <br>          - &quot;Bert&quot;<br>          - Ref: &quot;AppName&quot;<br>          - Ref: &quot;Environment&quot;<br>      ArtifactStore:<br>        Type: &quot;S3&quot;<br>        Location: &quot;codepipeline-logs-bucket&quot;<br>      RoleArn: !GetAtt CodePipelineRole.Arn<br>      RestartExecutionOnUpdate: true<br>      Stages:<br>        -<br>          Name: &quot;Source&quot;<br>          Actions:<br>            -<br>              Name: &quot;Source&quot;<br>              ActionTypeId:<br>                Category: &quot;Source&quot;<br>                Owner: &quot;AWS&quot;<br>                Provider: &quot;CodeStarSourceConnection&quot;<br>                Version: 1<br>              OutputArtifacts:<br>                - Name: &quot;SourceArtifact&quot;<br>              Configuration:<br>                ConnectionArn: &quot;arn:aws:codestar-connections:us-east-1:049999999999:connection/99999999-e9af-9af9-a99b-9ed999999999&quot;<br>                FullRepositoryId:<br>                  !Join [&quot;/&quot;, [ &quot;myappdnsdocs&quot;, Ref: &quot;GitHubRepoName&quot; ]]<br>                BranchName:<br>                  Ref: &quot;GitHubBranchName&quot;<br>                DetectChanges: true<br>              RunOrder: 1<br>        -<br>          Name: &quot;Deploy&quot;<br>          Actions:<br>            -<br>              Name: &quot;Deploy&quot;<br>              ActionTypeId:<br>                Category: &quot;Deploy&quot;<br>                Owner: &quot;AWS&quot;<br>                Provider: &quot;S3&quot;<br>                Version: 1<br>              InputArtifacts:<br>                - Name: &quot;SourceArtifact&quot;<br>              Configuration:<br>                BucketName:<br>                  Ref: &quot;S3Bucket&quot;<br>                Extract: &quot;true&quot;<br>  CodePipelineRole:<br>    Type: AWS::IAM::Role<br>    Properties:<br>      RoleName: MyCodePipelineRole<br>      AssumeRolePolicyDocument:<br>        Version: &quot;2012-10-17&quot;<br>        Statement:<br>          - Effect: Allow<br>            Principal:<br>              Service:<br>                - codepipeline.amazonaws.com<br>            Action: sts:AssumeRole<br>      ManagedPolicyArns:<br>        - arn:aws:iam::aws:policy/AWSCodePipeline_FullAccess</pre><p>Copy and paste the template into Cloudformation on AWS, and voila, you are on your way to launching your own password protected static site.</p><h3>Resources:</h3><p>Explore and verify cloud formation syntax here, <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-bucket.html">AWS::S3::Bucket — AWS CloudFormation (amazon.com)</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7e93367d1ea1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating a lambda layer on a MacOS]]></title>
            <link>https://awstip.com/creating-a-lambda-layer-on-a-macos-ecfa256ff1e5?source=rss-7c27a8c89f65------2</link>
            <guid isPermaLink="false">https://medium.com/p/ecfa256ff1e5</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[guides-and-tutorials]]></category>
            <category><![CDATA[layers]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <dc:creator><![CDATA[Bert Oubida]]></dc:creator>
            <pubDate>Sat, 28 Oct 2023 04:45:25 GMT</pubDate>
            <atom:updated>2023-11-20T11:06:12.535Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/474/1*0Lrlq-ULYTOQ3WHOIRGBTw.jpeg" /></figure><p>We’ll be creating an AWS lambda layer for “<a href="https://pypi.org/project/psycopg2/">Psycopg2</a>” and “<a href="https://pypi.org/project/requests/">requests</a>” to allow use of “import” of the elements in your code. Although we are at python 3.11, we will be using python 3.9 and request 2.29.0 they are the only versions compatible with the current “psycopg2” package that is out.</p><p>Steps needed are</p><ol><li>Install the required packages (homebrew, python 3.9)</li><li>Simulated python environment</li><li>Install the layers</li><li>zip and upload the layers.</li></ol><h3>1.Installing Homebrew and python 3.9</h3><p>Open up your terminal by navigating to launchpad, and then searching up terminal and clicking on it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q_pR3CKUvI8GEe3MnUlpnA.png" /></figure><p>Once the terminal is open, type in the code below to install Homebrew (a software package manager that allows you to easily download softwares to your system with the command “brew install)</p><pre>/bin/bash -c &quot;$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/915/1*pvpHxiwKR0EtcYKgBrWMTw.png" /></figure><p>Once Homebrew is downloaded, type in the command below to download python 3.9:</p><pre>brew install python@3.9</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/915/1*S_ENFXc4lUxFZVwt8FXEnQ.png" /></figure><p>To double check that python 3.9 is well install, type in:</p><pre>python3.9 --version</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/915/1*6OpBvLyqF92djmhJ8pyitA.png" /></figure><p>To create a simulated environment where downloading packages we need to run our Python code is possible, a Python environment is required. This is so we can make sure it is compatible with the lambda python version, and that the downloads won’t affect or interfere with what’s in our local environment. Run the command below in your terminal to install a Python environment simulator</p><pre>brew install pyenv</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/915/1*tcvFzYZSuAuP7nxelFfSRw.png" /></figure><h3>2. Simulated python environment</h3><p>Let’s create a folder that will house all our other folders and files for a cleaner look, I will name mine “showing” but you can name yours any name you desire.</p><pre>mkdir showing</pre><p>After “ showing” is created, enter into the folder with the code below</p><pre>cd showing</pre><p>Once in the new directory, let’s set up the simulated Python 3.9 environment with the following code below</p><pre>python3.9 -m venv venv</pre><p>You should notice a new file created named “venv”, this will store all your installed modules. Now let’s start the simulated Python 3.9 environment</p><pre>source venv/bin/activate</pre><h3>3. Install the layers</h3><p>Use the command below to list all the current files in your directory to see what you have so far</p><pre>ls</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/915/1*VRIIgwQ7T-Zy7t3_0zGQkw.png" /></figure><p>To install my layer, I took advantage of a github repository that did the heavy lifting of compiling all the necessary files into a directory, so let’s just clone this using the code below (“brew install git” if you do not have git installed on your local terminal already)</p><pre>git clone jkehler/awslambda-psycopg2 (github.com)</pre><p>Next, it’s time to install all the modules you will be using in your lambda code, install the module requests.</p><pre>pip install requests==2.29.0</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/915/1*mdX-e3wRApHriAE60c0NvQ.png" /></figure><p>Since a certain file path is required for AWS lambda to process the zip files with the modules (<a href="https://docs.aws.amazon.com/lambda/latest/dg/packaging-layers.html">python/lib/python3.6/site-packages/{LibrariesGoHere}</a>), create a new folder with the name python.</p><pre>mkdir python</pre><p>Copy the contents of the venv folder into our new folder with the code below</p><pre>cp -r venv/* python</pre><p>We should now have the “requests” module in our python folder, time to add the psycopg2 module we will take from git instead of installing it directly</p><pre>cd python/lib/python3.9/site-packages/</pre><p>create a folder for psycopg2 to keep it organized for aws and ourselves.</p><pre>mkdir psycopg2</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/915/1*i3uH7DSzMw7aV2JqWr74EQ.png" /></figure><p>Now back up to your default starting directory/folder where you had the venv folder, python folder, and git folder that you cloned</p><pre> cd ../../../../</pre><p>Turn off the simulated environment since we’re done using it to download what we need.</p><pre>deactivate</pre><p>Copy the psycopg2 neccesary files to the proper place with the command below, remember that AWS lambda looks for the file path to be “<a href="https://docs.aws.amazon.com/lambda/latest/dg/packaging-layers.html">python/lib/python3.6/site-packages/{LibrariesGoHere}</a>”</p><pre>cp -r awslambda-psycopg2/psycopg2-3.9/* python/lib/python3.9/site-packages/psycopg2</pre><h3>4. zip and upload the layers.</h3><p>Using ls to check all the files you have is always a refreshing feeling and never hurts, you can also use it to go many levels deep to check that your copy took.</p><pre>ls</pre><pre>ls python/lib/python3.9/site-packages/</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/915/1*FpNLVITXeJY7BICgKoMC6w.png" /></figure><p>Once you confirm that all the necessary files are there just like the picture above, you can zip it using the command below.</p><pre>zip -r python.zip python</pre><p>Let’s check the results of the zip with “ls”, you should see a new zip file.</p><pre>ls</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/915/1*Wq92pmy3FxrycCBGN65KGw.png" /></figure><h4>AWS console: Lambda:</h4><p>Log into the aws console, and when you search “lambda” and click on it, you should notice “layers” on the side, as pictured. Click on it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TZnpQnXf_VmGHxKiMGOpuA.png" /></figure><p>Click on “Create a layer”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qIXDpPftcXJuYSKleJkPCA.png" /></figure><p>and upload your packaged zip file here by clicking on upload and making sure to select which runtime it is compatible with, and a little description to help you future self out a bit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u-gUdg8TvAVdp4ZPB5dwcQ.png" /></figure><p>Once the zip file is uploaded, and the layer created, you can use it by going to the lambda function that will be using it, and just under the “code” section, click on “add a layer” to add it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wkpf4UMQr1idzw0TMY-vLg.png" /></figure><h3>Resources:</h3><p><a href="https://www.psycopg.org/docs/install.html">Installation — Psycopg 2.9.9 documentation</a></p><p><a href="https://www.postgresql.org/docs/current/git.html">PostgreSQL: Documentation: 16: I.1. Getting the Source via Git</a></p><p><a href="https://github.com/jkehler/awslambda-psycopg2">jkehler/awslambda-psycopg2 (github.com)</a></p><p><a href="https://docs.aws.amazon.com/lambda/latest/dg/packaging-layers.html">Packaging your layer content — AWS Lambda (amazon.com)</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ecfa256ff1e5" width="1" height="1" alt=""><hr><p><a href="https://awstip.com/creating-a-lambda-layer-on-a-macos-ecfa256ff1e5">Creating a lambda layer on a MacOS</a> was originally published in <a href="https://awstip.com/">AWS Tip</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>