<?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 Mykhaylo Dyachenko on Medium]]></title>
        <description><![CDATA[Stories by Mykhaylo Dyachenko on Medium]]></description>
        <link>https://medium.com/@mihaeldyachenko?source=rss-062c2862795d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*MHhQhS3USgmwvc8qcmcmtQ.png</url>
            <title>Stories by Mykhaylo Dyachenko on Medium</title>
            <link>https://medium.com/@mihaeldyachenko?source=rss-062c2862795d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 01:35:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mihaeldyachenko/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[I Bought a Raspberry Pi 5 to Break It Until I Understand It]]></title>
            <link>https://medium.com/@mihaeldyachenko/i-bought-a-raspberry-pi-5-to-break-it-until-i-understand-it-87e9a939ebe5?source=rss-062c2862795d------2</link>
            <guid isPermaLink="false">https://medium.com/p/87e9a939ebe5</guid>
            <category><![CDATA[raspberry-pi]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Mykhaylo Dyachenko]]></dc:creator>
            <pubDate>Mon, 19 Oct 2026 18:26:04 GMT</pubDate>
            <atom:updated>2026-10-19T18:26:04.984Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*FpKoCfYBNn0dZrLlLFF1IQ.jpeg" /><figcaption>Raspberry Pi 5–8GB RAM</figcaption></figure><p>This is the story of setting up my first homelab node a Raspberry Pi 5 into a proper headless Ubuntu server. If you’re learning Linux, Docker, or Kubernetes and you want a cheap machine you can break without fear, this is for you. I’ll include the exact commands, and I won’t hide the two errors that tripped me up.</p><h3>Why a Raspberry Pi</h3><p>My laptop runs Arch. I like it, I know it, and I did not want to experiment with root files and risk breaking the machine I depend on every day. That fear is the problem. When a mistake means rebuilding your daily driver, you hold back , you don’t run the reckless command, you don’t wipe and retry three times in one night. And holding back is the enemy of fluency.</p><p>A cheap, disposable second machine fixes that. Nothing on it matters. Destroy it at noon, re-flash by 12:05, go again. That’s how you stop guessing which command to use and start <em>knowing</em>.</p><h3>The hardware</h3><p>I found a complete setup locally in Winnipeg for 230 CAD and tested it in person before buying:</p><ul><li>Raspberry Pi 5–8GB RAM, quad-core ARM (aarch64)</li><li>256GB NVMe SSD on a Waveshare PoE+ M.2 HAT</li><li>Active cooling (fan + heatsink) in a 3D-printed ventilated case</li><li>Gigabit Ethernet, official 27W USB-C power</li></ul><p>The NVMe matters more than people think. Constant install-and-destroy is write-heavy, and microSD cards are slow and wear out. Booting off NVMe makes the whole thing feel like a real computer. The PoE+ HAT is a bet on the future when this becomes a cluster, each Pi can take power and network over a single cable.</p><h3>Why Ubuntu Server, not Arch</h3><p>Here’s a choice that might surprise people who know I run Arch. I put Ubuntu Server on the Pi, on purpose.</p><p>Three reasons. It’s the officially supported, well-maintained path for the Pi. Every Docker and Kubernetes tutorial assumes a Debian/Ubuntu base, so when something breaks I’m not debugging alone. And most importantly it’s the family I’ll actually meet in the cloud. EC2 instances, container base images, CI runners: it’s apt and Debian/Ubuntu out there, not pacman. I already have Arch fluency from my laptop. The Pi gives me the other half.</p><h3>Installing Ubuntu — straight to the NVMe</h3><p>The Pi 5 has a trick that removes the usual microSD dance. On boot, its firmware offers a network install: press N, and it pulls the Raspberry Pi Imager over the internet and writes the OS directly to the NVMe. I picked Ubuntu Server (64-bit), pointed it at the SSD, and let it run. No card needed. A key thing to understand about Pi installs, there’s no installer wizard running <em>on</em> the Pi like on a normal PC. The OS is written fully-formed to the drive, and the Pi just boots it. For a server you run it headless, no monitor, no keyboard, controlled entirely over SSH from your laptop.</p><h3>First contact</h3><p>After first boot (set a password, skip Ubuntu Pro, skip Location Services), I needed two things to get in remotely — the username and the IP. On the Pi:</p><p>whoami # my username</p><p>hostname -I # the Pi’s IP on the network</p><p>Then, from my laptop:</p><p>ssh mischa@10.0.0.243</p><h3>The two errors (because real setups have them)</h3><p>I hit two snags worth sharing, because you probably will too.</p><p>1. SSH wasn’t installed. On Ubuntu Server, the SSH service isn’t there by default:</p><p>Failed to enable unit: Unit ssh.service does not exist</p><p>Fix — install it (which also enables and starts it):</p><p>sudo apt install openssh-server -y</p><p>2. A half-finished package operation blocked the install:</p><p>dpkg was interrupted, you must manually run &#39;sudo dpkg --configure -a&#39;</p><p>Fix — exactly what it says, then retry:</p><p>sudo dpkg --configure -a</p><p>Two commands, and I was in from my laptop. These aren’t failures, they’re the normal texture of real systems, and learning to read the error and do what it tells you is half the skill.</p><h3>Locking it down: keys only</h3><p>A password-login server on your network is a soft target. So I switched to SSH key authentication.</p><p>An SSH key is a pair, a private key that never leaves my laptop, and a public key that gets installed on the Pi. The handshake proves I hold the private half, no password sent over the wire.</p><p>ssh-keygen -t ed25519 -f ~/.ssh/homelab -C &quot;homelab&quot;</p><p>ssh-copy-id -i ~/.ssh/homelab.pub mischa@10.0.222</p><p>I added an entry to ~/.ssh/configso I connect with a single word:</p><p>Host homelab<br> HostName 10.0.0.222<br> User mischa<br> IdentifyFile ~/.ssh/homelab</p><p>Now it’s just ssh homelab.</p><p>Then the real hardening turning off password login entirely. In /etc/ssh/sshd_config:</p><p>PasswordAuthentication no</p><p>Verify it actually took effect, then restart:</p><p>sudo sshd -T | grep passwordauthentication # want: no<br> sudo systemctl restart ssh</p><p>The test that matters is trying to get in with a password on purpose and being refused:</p><p>ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no homelab <br># Permission denied (publickey)</p><p>That refusal is the win. The password door is closed. One rule I’d underline, only disable password login after you’ve confirmed key login works, and keep a second session open while you do it. That’s your safety net.</p><h3>Where this is going</h3><p>Right now this Pi sits quietly on my desk, waiting to be pushed.</p><p>The plan is to break it down until I understand it from the ground up. First Linux fluency, install, remove, files, permissions, processes. Then Docker, containers I can spin up and tear down endlessly. Then Kubernetes with K3s, starting as a single node.</p><p>And this is only step one. Two more Raspberry Pi 5s (16GB each) will join it to form a real 3-node Kubernetes cluster , the setup that actually teaches scheduling, cross-node networking, and what happens when a node dies.</p><p>All of this runs alongside the bigger goal. I’m deep in AWS right now, with 8 more cloud projects still ahead of me on the way to my certifications. The Pi cluster and the cloud work feed each other, the lab teaches me the architecture hands-on, and AWS is where it goes to scale.</p><p><em>I’m documenting my Cloud Engineering journey in public. Linux, Docker, Kubernetes, and AWS. If you’re on a similar path, switching careers, self-teaching, or just curious about cloud infrastructure, follow along.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=87e9a939ebe5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Part 5: Killing the Keys — Securing My Pipeline with OIDC (and the Hidden Bug That Took Four Failed…]]></title>
            <link>https://medium.com/@mihaeldyachenko/part-5-killing-the-keys-securing-my-pipeline-with-oidc-and-the-hidden-bug-that-took-four-failed-5a28899ee0de?source=rss-062c2862795d------2</link>
            <guid isPermaLink="false">https://medium.com/p/5a28899ee0de</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud-security]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[oidc]]></category>
            <dc:creator><![CDATA[Mykhaylo Dyachenko]]></dc:creator>
            <pubDate>Sat, 10 Oct 2026 19:24:38 GMT</pubDate>
            <atom:updated>2026-10-10T19:24:38.196Z</atom:updated>
            <content:encoded><![CDATA[<h3>Part 5: Killing the Keys — Securing My Pipeline with OIDC (and the Hidden Bug That Took Four Failed Runs)</h3><p>Back in <a href="https://medium.com/@mihaeldyachenko/part-2-automating-my-portfolio-deployment-with-github-actions-including-the-bug-that-almost-c05011ccec7a">Part 2</a>, I built a GitHub Actions pipeline that deploys my portfolio to AWS. It worked, and it still does, but it had a weakness I glossed over at the time it authenticated to AWS using <strong>long-lived access keys</strong> stored as GitHub secrets. A permanent password to my AWS account, sitting in GitHub, waiting.</p><p>This part removes them. By the end, my pipeline deploys with <strong>zero stored credentials. </strong>No access keys anywhere, in GitHub or in AWS and still works perfectly. The tool that makes that possible is <strong>OIDC</strong>. It’s the single biggest security upgrade I’ve made, and it fixes a real hole in live infrastructure rather than demonstrating something on a toy.</p><p>It also took <strong>four failed pipeline runs</strong> to get right, because of a bug I’d never have guessed and couldn’t see from the AWS side. That debugging story is the real lesson here, so I’m telling all of it.</p><h3>The problem with stored keys</h3><p>My old pipeline had two secrets, an access key ID and a secret access key. Those keys:</p><ul><li>never expire on their own,</li><li>work from <em>anywhere</em> if they leak,</li><li>sit in GitHub indefinitely.</li></ul><p>If someone ever got them, they could deploy to my AWS account from their laptop, forever, until I noticed and rotated them. That’s the risk you accept with long-lived credentials.</p><h3>The OIDC idea: stop storing a password</h3><p>OIDC (OpenID Connect) replaces the stored key with something better: <strong>prove your identity fresh each time, and store nothing.</strong></p><p>The analogy that made it click for me, a house key hidden under the mat (the access key — anyone who finds it gets in, anytime) versus showing your ID to a guard who checks it and lets you in for fifteen minutes (OIDC — nothing is left lying around, you prove who you are each run, and the pass expires fast).</p><p>Concretely:</p><ol><li>You set up a <strong>trust relationship</strong> in AWS: “I trust GitHub’s identity service, but only for <em>this</em> repo on <em>this</em> branch.”</li><li>When the pipeline runs, GitHub generates a short-lived <strong>token</strong> proving the job really came from your repo/branch.</li><li>AWS checks the token against the trust rule and hands back <strong>temporary credentials that expire in minutes.</strong></li><li>The pipeline deploys. The credentials vanish when the job ends.</li></ol><p>Nothing permanent is stored. And even if someone copies the role’s identifier, they can’t use it, AWS only issues credentials to a token proving it came from <em>your</em> repo. The security is enforced by AWS at login time, not by the workflow hoping to behave.</p><h3>Step 1: Register GitHub as a trusted provider</h3><p>First I confirmed my account and repo, then registered GitHub’s OIDC endpoint in AWS as a trusted identity provider.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*It8WJpGHNEQr33i74Hf4qA.png" /><figcaption>Registering GitHub as an OIDC identity provider in AWS</figcaption></figure><p>The URL (token.actions.githubusercontent.com) is GitHub&#39;s fixed OIDC endpoint, and the audience (sts.amazonaws.com) tells AWS the tokens are meant for its security token service. One-time setup.</p><h3>Step 2: Create the role, locked to my repo</h3><p>Next, an IAM role GitHub can assume. The <em>trust policy</em> is the critical part — the sub condition locks the role to exactly my repo and the main branch.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*36OYvYeXU7IRD_eTQpF4hw.png" /><figcaption>Creating the IAM role GitHub will assume</figcaption></figure><p>I gave it the <em>same least-privilege permissions</em> my old access-key user had, write to the one bucket, invalidate the one distribution. Nothing more.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vyBkq47x1NRXYFTKoFTH6g.png" /><figcaption>Attaching least-privilege deploy permissions to the role</figcaption></figure><h3>Step 3: Switch the workflow</h3><p>Then the actual change to deploy.yml add a permissions block so GitHub will mint the token, and replace the &quot;configure credentials with secrets&quot; step with the OIDC version, which points at the role ARN and carries <strong>no keys</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l2M8eodZCnebpFKFLny6AA.png" /><figcaption>The workflow switched to role-to-assume, no stored keys</figcaption></figure><p>That role-to-assume line is the whole switch. I pushed it, expecting green.</p><h3>Where it went wrong four times</h3><p>It failed. And kept failing, with the same unhelpful error:</p><p><em>Could not assume role with OIDC: Not authorized to perform sts:AssumeRoleWithWebIdentity</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oUeEIMqQ9oZumIsDUMSTcA.png" /><figcaption>The first failure: “Not authorized to assume role with OIDC”</figcaption></figure><p>That error tells you <em>nothing</em> about <em>why</em>. So I worked through the suspects methodically.</p><p><strong>First bug — an unsubstituted variable.</strong> When I’d written the trust policy, a shell variable hadn’t been set, so the file literally contained the text ${ACCOUNT_ID} instead of my account number.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P4c96w5VtuOF8JicB_ENTg.png" /><figcaption>Bug #1 — the trust policy with an unsubstituted ${ACCOUNT_ID}</figcaption></figure><p>I checked the <em>live</em> role (always check the source of truth, not the file you think you wrote) and confirmed the broken value was really on the role. Fixed it.</p><p><strong>Second bug — a missing colon.</strong> After fixing it by hand, a <em>different</em> error appeared: “Federated principals must be valid domain names or SAML metadata ARNs.” The cause: the ARN read arn:aws:iam:742... with a <em>single</em> colon after iam, not the required double iam::. (IAM is global, so the region segment is empty hence ::.) One missing character.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4VpAFdfUDIOOdl-oXgE_UQ.png" /><figcaption>Bug #2 — a single colon in the ARN breaks the provider</figcaption></figure><p>Fixed that too. Re-ran. <strong>Still</strong> the same “NOT AUTHORIZED” !!!</p><p><strong>Ruling things out.</strong> I confirmed the provider existed, the branch was really main, the trust policy&#39;s aud and sub looked exactly right. On paper, everything matched. Even widening the sub to a wildcard for my whole repo still failed. At that point I stopped guessing and did the one thing that actually reveals the truth.</p><h3>The fix: read what’s actually on the wire</h3><p>If AWS won’t tell you why it rejected the token, <strong>decode the token and look at what it actually contains.</strong> I added a temporary debug step to the workflow to print the token’s real claims.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NAfGIP_ZUJKZQhJ0xqJDNw.png" /><figcaption>Adding a debug step to decode the token’s claims</figcaption></figure><p>And there it was:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G2_rGyG3JWkoR-j79Q8YcA.png" /><figcaption>THE REVEAL !!! The token’s subject carries hidden numeric IDs</figcaption></figure><p>The token’s subject wasn’t repo:MishaD8/portfolio:... like every tutorial shows. It was:</p><p>repo:MishaD8@45635722/portfolio@1344504347:ref:refs/heads/main</p><p>There were <strong>numeric IDs appended, </strong>my GitHub user ID and the repo ID. My trust policy required the literal string MishaD8/portfolio, which <em>doesn&#39;t appear</em> in that subject, which is why even the wildcard repo:MishaD8/portfolio:* never matched. The audience was fine all along; it was always the subject format.</p><p>The fix was to match what the token actually sends, wildcards absorbing the @id suffixes, branch still locked:</p><p>repo:MishaD8*/portfolio*:ref:refs/heads/main</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r8HTqGDjr2hWCbgXXpY3Ew.png" /><figcaption>Matching the real subject with wildcards</figcaption></figure><p>I re-ran it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-rHQL501bd_YcLMAWdtI7Q.png" /><figcaption>Green at last — deploying with a short-lived OIDC token</figcaption></figure><p><strong>Green.</strong> The pipeline deployed using a short-lived OIDC token, no stored credentials involved.</p><h3>The payoff: deleting the keys</h3><p>With OIDC working, I removed the debug step and then did the satisfying part, made the old credentials <em>stop existing</em>, not just go unused:</p><ul><li>Deleted the IAM access key (one command destroys the whole key pair — the secret dies with the ID).</li><li>Deleted the two GitHub secrets (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY), keeping only the non-secret distribution ID.</li><li>Deleted the entire old IAM user, it had no purpose anymore.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QtFx53HTrlpe0M6mV6X5Nw.png" /><figcaption>Deleting the old access key; the credential stops existing</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4UxiP_N-KRHHUVH9Sq6tnw.png" /><figcaption>Removing the old IAM user; the OIDC role remains</figcaption></figure><p>Then one final empty-commit push to prove it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k2-IwTuxM84z8oqtAtt32A.png" /><figcaption>Verified: the pipeline deploys with zero stored credentials</figcaption></figure><p>Green with no AWS credential in existence anywhere.</p><h3>Why the public workflow file is now safe</h3><p>Here’s the part that captures the whole point. My deploy.yml is in a <strong>public repo</strong>, and it contains the role ARN and my account ID in plain sight. That&#39;s fine because <strong>none of it is a credential.</strong> The role ARN is an identifier, like a street address, it tells you where the door is, not how to open it. And the door only opens for a token proving it came from MishaD8&#39;s portfolio repo on mainwhich nobody else can produce.</p><p>That’s the difference OIDC makes my pipeline went from “must never leak” (stored keys) to “safe to publish in plain sight” (identifiers only). The security moved from a secret I had to protect, to a trust condition AWS enforces.</p><h3>What I took away</h3><p><strong>When the error won’t tell you, read what’s on the wire.</strong> Every failure here looked identical from the outside. The only way through was to decode the actual OIDC token and compare its real claims to the policy. That’s how you debug auth problems, stop inferring, inspect the actual request. It’s the most useful habit I’ve built.</p><p><strong>Check the source of truth, not the file you think you wrote.</strong> Two of my bugs (the unsubstituted variable, the missing colon) were in the live role, and I only found them by querying AWS directly rather than trusting my own file.</p><p><strong>OIDC is the right way to connect CI/CD to the cloud.</strong> Short-lived tokens, a trust condition scoped to your exact repo and branch, and zero stored secrets. If you’re still using long-lived access keys in a pipeline, this is the upgrade worth making.</p><p>My portfolio is live at <a href="https://mykhaylo-dyachenko.dev/"><strong>mykhaylo-dyachenko.dev</strong></a>, and it now deploys with no credentials stored anywhere, just a short-lived token, issued fresh on every push, to a role that trusts only my repo.</p><p><em>I’m documenting my full Cloud Engineering journey publicly. If you’re on a similar path — career transition , self-teaching, or just curious about cloud infrastructure — follow along.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5a28899ee0de" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Part 4: Hardening My Portfolio with AWS WAF — What It Protects, What It Costs, and Why I Tore It…]]></title>
            <link>https://medium.com/@mihaeldyachenko/part-4-hardening-my-portfolio-with-aws-waf-what-it-protects-what-it-costs-and-why-i-tore-it-1e7530b8ac37?source=rss-062c2862795d------2</link>
            <guid isPermaLink="false">https://medium.com/p/1e7530b8ac37</guid>
            <category><![CDATA[aws-waf]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Mykhaylo Dyachenko]]></dc:creator>
            <pubDate>Sun, 27 Sep 2026 18:48:37 GMT</pubDate>
            <atom:updated>2026-09-28T00:54:10.773Z</atom:updated>
            <content:encoded><![CDATA[<h3>Part 4: Hardening My Portfolio with AWS WAF — What It Protects, What It Costs, and Why I Tore It Down</h3><p>My portfolio has been live for a while now (Parts 1–3 cover building the infrastructure, the CI/CD pipeline, and the React site). This part adds a Web Application Firewall in front of it with AWS WAF and it’s the most honest piece in the series, because I want to be straight about what a firewall actually does for a static site, what it costs, and why I didn’t leave it running.</p><p><a href="https://medium.com/@mihaeldyachenko/hosting-my-portfolio-on-aws-s3-cloudfront-and-route-53-all-from-the-cli-e55869ef8fdb"><em>Part 1: Hosting My Portfolio on AWS — S3, CloudFront, and Route 53, All From the CLI</em></a></p><p><a href="https://medium.com/@mihaeldyachenko/part-2-automating-my-portfolio-deployment-with-github-actions-including-the-bug-that-almost-c05011ccec7a"><em>Part 2: Automating My Portfolio Deployment with GitHub Actions</em></a></p><p><a href="https://medium.com/@mihaeldyachenko/part-3-building-and-launching-my-cloud-portfolio-with-react-124975d08fbe"><em>Part 3: Building and Launching My Cloud Portfolio with React</em></a></p><h3>First, an honest question. Does a static site even need WAF?</h3><p>My portfolio is static. There’s no login, no database, no server-side code. The classic things a WAF defends against SQL injection, attacks against an application backend don’t really apply, because there’s no backend to attack. If someone throws a SQL injection string at my site, it hits a static file and does nothing.</p><p>So why do it at all?</p><p>First, WAF still does real things for a static site. It blocks requests from known-malicious IP addresses, it rate-limits abusive traffic before it reaches your CDN, it filters obviously-bad request patterns at the edge, and maybe most usefully it gives you visibility into who’s hitting your site and from where.</p><p>Second, I’ll be straight. This is also a portfolio exercise. “Secure web hosting with S3, CloudFront, and WAF” is a skill worth demonstrating, and since my site already runs on CloudFront, adding WAF is a small extension rather than a project from scratch.</p><p>Knowing why you’re applying a security control and what threat model it actually addresses matters more than bolting one on because it sounds secure. So that’s the frame: edge filtering and visibility, honestly scoped.</p><h3>Defining the rules</h3><p>AWS WAF rules are defined in JSON. I wrote four. Three AWS managed rule groups plus a rate limiter.</p><ul><li><strong>Amazon IP Reputation List</strong> — blocks IPs AWS has flagged as malicious.</li><li><strong>Common Rule Set</strong> — AWS’s baseline protections.</li><li><strong>Known Bad Inputs</strong> — blocks request patterns associated with known exploits.</li><li><strong>Rate limit</strong> — blocks any single IP making more than 2,000 requests in 5 minutes.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*crEjLwcTeIoz1gpbeASKrQ.png" /><figcaption>The four rules in JSON</figcaption></figure><p>Small lesson here. I hand-typed that JSON and made a couple of typos (a missing quote, a misspelled key). Rather than find out through a cryptic AWS error, I validated the file locally first:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*un5y7z732vtGMFWfZUeTQA.png" /><figcaption>Validating the JSON before using it</figcaption></figure><p>valid JSON means AWS will accept it. Validating structured input before feeding it to an API saves you from debugging the wrong layer.</p><h3>Creating the Web ACL</h3><p>One command creates the Web ACL from those rules. The catch that trips people up: for CloudFront, the Web ACL <strong>must</strong> be created with --scope CLOUDFRONT <strong>and</strong> --region us-east-1. CloudFront is global, and its WAF resources live only in us-east-1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EEVxVV6tK71Ntw72pvnqng.png" /><figcaption>Web ACL created — ARN, Id, LockToken</figcaption></figure><p>The response hands back the Web ACL’s ARN and Id. My four rules come to about 930 WCU (Web ACL Capacity Units) comfortably under the 1,500 default limit, so it created without complaint.</p><h3>Attaching it to CloudFront — where I hit a wall (twice)</h3><p>Here’s the part that didn’t go smoothly, and the part worth reading.</p><p>For most resources you’d attach a Web ACL with associate-web-acl. But CloudFront is the exception: you attach it by putting the Web ACL&#39;s ARN into the distribution config&#39;s WebACLId field and updating the distribution the same config-and-ETag dance I used for Origin Access Control back in Part 1.</p><p>I grabbed the ARN into a shell variable:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nXFM7u99BCC530dt7FeW5Q.png" /><figcaption>Capturing the ARN</figcaption></figure><p>Then I tried to attach it. And got this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XqN3b-1Rv3NcggIUlFg2jA.png" /><figcaption>Web ACL is not accessible</figcaption></figure><p>InvalidWebACLId: Web ACL is not accessible. I&#39;d passed the <strong>Id </strong>the short UUID instead of the full <strong>ARN</strong>. CloudFront&#39;s WebACLId field, confusingly, wants the entire arn:aws:wafv2:... string, not the ID.</p><p>So I fixed it and tried again. And got a different failure:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eK67oh7hfIN4eoRDSdkjrQ.png" /><figcaption>Invalid webACL identifier — malformed ARN</figcaption></figure><p>This time the ARN was missing the portfolio-waf/ segment in the middle. The problem: I&#39;d typed the long ARN by hand, and mangled it.</p><p>The fix was to stop typing the value at all. I loaded the ARN straight from the API into a variable, verified its shape with a quick check, and let the variable carry the exact string into the command untouched:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dQItHvFnnAM4wh7frAXIEg.png" /><figcaption>ARN verified, config updated, Status InProgress</figcaption></figure><p>&quot;Status&quot;: &quot;InProgress&quot; — accepted. The lesson: when a value is long and exact (an ARN, a token), don&#39;t retype it. Capture it into a variable, verify it, and let the shell hand it over perfectly every time. Both failures came from human transcription, not from anything wrong with AWS.</p><h3>Verifying it’s live</h3><p>CloudFront takes a few minutes to redeploy. Once it flipped to Deployed, I confirmed the Web ACL was actually attached:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w-nBPgNyt1F78x053IMSBQ.png" /><figcaption>Deployed, with the WebACLId ARN attached</figcaption></figure><p>Then the important check. Does my site still work for real visitors? A quick burst of requests:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hceMYjyMc3QzqQ5UPkKd0g.png" /><figcaption>five requests, all 200</figcaption></figure><p>Five 200s. Legitimate traffic passes straight through WAF is inspecting every request and allowing the good ones. Real visitors notice nothing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Tss8gbYee5WEKaPoiuHjlQ.png" /><figcaption>One more burst</figcaption></figure><h3>Seeing it work</h3><p>This is where WAF earns its place, even on a static site. The visibility. I generated a larger burst of traffic, then looked at the console.</p><p>The rules, with their capacity costs laid out:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7z7JN8THcTxYCIeOoDgBbQ.png" /><figcaption>The four rules and their WCU</figcaption></figure><p>The traffic graph, showing WAF inspecting my request bursts in real time:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YH-4r5xfsRk67iYFQE9nYg.png" /><figcaption>Request totals — the traffic spike</figcaption></figure><p>And the part I didn’t expect to find useful a geographic breakdown of who’s hitting the site:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4mspD5C2dX_kcGN7XleFWg.png" /><figcaption>Top countries by request volume</figcaption></figure><p>That last one is the point. A firewall isn’t just a yes/no gate. It’s a lens on your traffic. Even with nothing malicious happening, I can now see request volume, origin countries, and rule activity. That’s the genuinely valuable part for a static site.</p><h3>What it costs and why I tore it down</h3><p>Here’s the part most WAF tutorials skip. AWS WAF is not free, and for a portfolio it’s expensive relative to everything else:</p><ul><li>Web ACL: <strong>$5.00/month</strong></li><li>Each rule: <strong>$1.00/month</strong> (I have four = $4)</li><li>Requests: <strong>$0.60 per million</strong></li></ul><p>That’s roughly <strong>$9/month and about $108/year</strong>.</p><p>My entire hosting bill is around <strong>$20 a year</strong>. Leaving WAF running permanently would multiply my costs by six, to protect a static site that’s already hard to hurt. That math doesn’t hold up.</p><p>So I did what I’d do with any of these build-and-document projects: I stood WAF up, verified it, captured everything, wrote it down and then tore it down. WAF is billed hourly and prorated, so building and deleting it the same day cost pennies. The skill is demonstrated; I’m not carrying a $9/month bill for it.</p><p>Teardown is the reverse of setup: remove the association from CloudFront (set WebACLId back to empty, and wait for the distribution to redeploy), then delete the Web ACL using its current lock token. You can&#39;t delete a Web ACL while it&#39;s still attached to a resource, so the order matters . Disassociate first, wait, then delete.</p><h3>What I took away</h3><p>Three things.</p><p><strong>Right-size security to the threat model <em>and</em> the budget.</strong> WAF is a good control, but “is this the right control for what I’m actually protecting, at a cost that makes sense?” is the real question. For a static portfolio, the honest answer is: valuable to demonstrate, not worth $108/year to keep. Knowing when <strong>not</strong> to run something is part of the job.</p><p><strong>Don’t retype exact values.</strong> Both of my failures came from typing an ARN by hand. Capture long, precise values into variables, verify their shape, and let the shell carry them. It’s faster and it doesn’t make mistakes.</p><p><strong>Validate before you trust.</strong> Checking that my JSON parsed locally turned a would-be cryptic AWS error into a two-second check.</p><p>That rounds out the secure-hosting side of my portfolio. The site itself is live at <a href="https://mykhaylo-dyachenko.dev/"><strong>mykhaylo-dyachenko.dev</strong> </a>— now documented from the infrastructure all the way up.</p><p><em>I’m documenting my full Cloud Engineering journey publicly. If you’re on a similar path — career transition , self-teaching, or just curious about cloud infrastructure — follow along.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1e7530b8ac37" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Part 3: Building and Launching My Cloud Portfolio with React]]></title>
            <link>https://medium.com/@mihaeldyachenko/part-3-building-and-launching-my-cloud-portfolio-with-react-124975d08fbe?source=rss-062c2862795d------2</link>
            <guid isPermaLink="false">https://medium.com/p/124975d08fbe</guid>
            <category><![CDATA[website-design]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[github-actions]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Mykhaylo Dyachenko]]></dc:creator>
            <pubDate>Thu, 03 Sep 2026 18:53:03 GMT</pubDate>
            <atom:updated>2026-09-03T18:53:03.598Z</atom:updated>
            <content:encoded><![CDATA[<p>My portfolio is live: <a href="https://mykhaylo-dyachenko.dev/"><strong>mykhaylo-dyachenko.dev</strong></a>.</p><p>In <a href="https://medium.com/@mihaeldyachenko/hosting-my-portfolio-on-aws-s3-cloudfront-and-route-53-all-from-the-cli-e55869ef8fdb">Part 1</a>, I built the AWS infrastructure S3, CloudFront, Route 53, and an SSL certificate, all from the terminal. In <a href="https://medium.com/@mihaeldyachenko/part-2-automating-my-portfolio-deployment-with-github-actions-including-the-bug-that-almost-c05011ccec7a">Part 2</a>, I wired up a CI/CD pipeline so every push deploys itself. But both times, the “site” was a single placeholder page that said <em>Pipeline test</em>.</p><p>This is the part where it became a real portfolio. And there’s something fitting about that: the site is itself the first project on the site. The infrastructure and pipeline I built across these three articles are Project #1. I’m showcasing cloud skills on that.</p><h3>The stack, and why</h3><p>I built the front end with React, Vite, and Tailwind CSS.</p><ul><li>React, because it’s the ecosystem I’m learning, and components keep the site easy to extend.</li><li>Vite, because the build is fast and the tooling is modern.</li><li>Tailwind, because I could style directly instead of maintaining a separate pile of CSS.</li></ul><p>Nothing exotic. For a portfolio, boring and maintainable beats clever.</p><h3>Design decisions</h3><p>I wanted minimal and monochrome dark background, no accent colors, strong typography. The kind of clean that gets out of the way and lets the work speak.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K6rPK7WsnrkNtRb-VTxTrQ.png" /><figcaption>The finished homepage (hero + stats)</figcaption></figure><p>A few choices I made on purpose:</p><p>Honest stats. My first instinct was a stats bar bragging “15 projects.” But I’ve shipped one so far, with nine more planned, so the numbers say exactly that: one shipped, nine in the pipeline.</p><p>Content separated from layout. Every project, article, and link lives in a small data file. Adding a finished project is a single entry, I never touch the design. That matters, because I’ll be adding nine more over the coming months.</p><p>A light theme. One toggle flips the whole palette. It remembers your choice and applies before the page paints, so there’s no flash on load.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*syTGUl76w-rGLleOc9C7Pw.png" /><figcaption>Light mode</figcaption></figure><p>Mobile as a first-class citizen. The layout reflows properly on a phone and I checked it on a real device, not just a browser simulator.</p><h3>From files to live</h3><p>The project itself stays simple a handful of components, three data files for the content, and the config. Nothing sprawling.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*gMtaWwyjo2FJeIKXPwEgcQ.png" /><figcaption>The project directory listing</figcaption></figure><p>Install the dependencies, and preview locally. Vite is ready in a couple hundred milliseconds, and its --host flag exposes the dev server on my network so I can open it on my actual phone while I work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8verEo_XiBxqJkpgkhmwLw.png" /><figcaption>Installing dependencies</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3WQ8DEhHYERnghtGgnIFqw.png" /><figcaption>npm run dev — local and network URLs</figcaption></figure><p>Then the part Part 2 set up: commit and push. One command, and the whole project 26 files heads to GitHub.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fsFdjn9GaoJHGLBSYkocSA.png" /><figcaption>git add, commit, and push</figcaption></figure><p>From there the pipeline takes over. It installs dependencies, builds the React app, syncs the output to S3, and invalidates the CloudFront cache. That build-first ordering is a deliberate guardrail: the build has to succeed before the deploy step runs, so a broken build can never publish an empty site over the live one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hi-sWl_y2y8iVGXMFdchOA.png" /><figcaption>The GitHub Actions run — green, earlier failures still in the history</figcaption></figure><p>The first real build went green in under 30 seconds. I pushed code, and my site updated itself.</p><p>And those two red X’s earlier in the history? A misconfigured secret from Part 2 that took two failed runs to sort out. I’m leaving them there on purpose.</p><h3>What it cost</h3><p><strong><em>The whole thing runs on about $20 a year</em></strong>, mostly the domain. S3, CloudFront, and the certificate come to pennies a month at portfolio traffic. No servers, nothing to patch, and it scales on its own if a post ever takes off.</p><h3>Why I did it the hard way</h3><p>I could have used a website builder and been done in an afternoon. But the point wasn’t to <em>have</em> a portfolio, it was to <em>build</em> one with the exact skills I’m trying to get hired for. Every piece of this, I can explain in an interview, because I ran the commands and debugged the failures myself.</p><p>Seven years on cruise ships taught me to work things out with whatever’s in front of me. This was the same instinct, pointed at the cloud.</p><p>The site is live at <a href="https://mykhaylo-dyachenko.dev/">mykhaylo-dyachenko.dev</a>. Nine more projects are on the way, each one will get a write-up here.</p><p>Thanks for following along.</p><p><em>I’m documenting my full Cloud Engineering journey publicly. If you’re on a similar path — career transition , self-teaching, or just curious about cloud infrastructure — follow along.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=124975d08fbe" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Part 2: Automating My Portfolio Deployment with GitHub Actions — Including the Bug That Almost…]]></title>
            <link>https://medium.com/@mihaeldyachenko/part-2-automating-my-portfolio-deployment-with-github-actions-including-the-bug-that-almost-c05011ccec7a?source=rss-062c2862795d------2</link>
            <guid isPermaLink="false">https://medium.com/p/c05011ccec7a</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[aws-iam]]></category>
            <category><![CDATA[cloud-infrastructure]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Mykhaylo Dyachenko]]></dc:creator>
            <pubDate>Wed, 02 Sep 2026 05:24:37 GMT</pubDate>
            <atom:updated>2026-09-02T05:26:34.407Z</atom:updated>
            <content:encoded><![CDATA[<h3>Part 2: Automating My Portfolio Deployment with GitHub Actions — Including the Bug That Almost Stopped Me</h3><p>In <a href="https://medium.com/@mihaeldyachenko/hosting-my-portfolio-on-aws-s3-cloudfront-and-route-53-all-from-the-cli-e55869ef8fdb">Part 1</a>, I built the AWS infrastructure for my portfolio. S3, CloudFront, Route 53, and an SSL certificate, all from the terminal. The site worked, but deploying meant manually running AWS commands every time.</p><p>This part fixes that. By the end, every git push automatically deploys my site. Edit, commit, push, live-in about 15 seconds.</p><p>I’ll also show you the bug I hit along the way. It cost me two failed pipeline runs, and it’s the kind of mistake almost everyone makes the first time they set up GitHub secrets. Most tutorials skip the failures. I think the failures are where the learning happens.</p><h3>The Goal</h3><p>Here’s the workflow I wanted:</p><p>VIM -&gt; git push -&gt; GitHub Actions -&gt; S3 -&gt; CloudFront -&gt; Live</p><p>No manual AWS commands. No clicking through consoles. Just push code and watch it deploy.</p><h3>Step 1: A Dedicated User for the Pipeline</h3><p>GitHub Actions needs permission to touch my AWS account. But I didn’t want to hand it my personal credentials that would be like giving a house key to a contractor who only needs to reach the mailbox.</p><p>Instead, I created a dedicated IAM user with the absolute minimum permissions: upload files to one bucket, and invalidate one CloudFront distribution. Nothing else.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D8j-rT0b3yxrThTclbXv_A.png" /><figcaption>Creating IAM user and attaching the deployment policy</figcaption></figure><p>Look closely at that policy. The user can only:</p><ul><li>Put, delete, and list objects in my portfolio bucket</li><li>Create an invalidation on my specific CloudFront distribution</li></ul><p>It cannot create buckets. It cannot change DNS. It cannot modify security settings or touch any other resource in my account. This is the principle of least privilege if these credentials ever leaked, the blast radius is tiny.</p><p>This connects to a question someone asked on my LinkedIn about Part 1: which infrastructure actions should be allowed to run automatically? My answer is baked right into this policy. The pipeline deploys content. It does not modify infrastructure. Those are two different risk levels, and I keep them separate.</p><h3>Step 2: Access Keys</h3><p>With the user created, I generated access keys, the credentials GitHub will use to authenticate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VDJfqk9HSVDgiS66fm_oRw.png" /><figcaption>Creating access keys for the IAM user</figcaption></figure><p>One important note: AWS shows you the secret access key exactly once. There’s no way to retrieve it later. If you lose it, you delete the key and create a new one. I copied both values somewhere safe, because they were about to go into GitHub.</p><h3>Step 3: The Project Skeleton</h3><p>Time to set up the local project and connect it to GitHub.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ue9toO-4xiU3ozDfB50f_Q.png" /><figcaption>Creating the project directory and initializing git</figcaption></figure><p>I created a dist/ directory with a simple placeholder HTML page. Why dist/? Because that&#39;s the directory will output to when I build the React site later. The pipeline is designed to deploy whatever lives in dist/. Building the pipeline against a simple test page first means I can verify it works without React complexity getting in the way.</p><h3>Step 4: The Pipeline Itself</h3><p>This is the heart of it the GitHub Actions workflow file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hXk4QW8MoVlKDsf4nrOztw.png" /><figcaption>The deploy.yml workflow file</figcaption></figure><p>Let me walk through what each part does.</p><p>The workflow triggers on every push to the main branch. When that happens, GitHub spins up a temporary Ubuntu machine and runs four steps in order:</p><p>First, it checks out my code. Then it configures AWS credentials using the secrets I’ll add to GitHub in a moment. Then it syncs the dist/ directory to my S3 bucket. Finally, it invalidates the CloudFront cache so my changes appear immediately instead of waiting for the cache to expire.</p><p>One detail worth calling out: the S3 sync uses the --delete flag. This keeps my bucket perfectly in sync with my dist/ directory files I remove locally get removed from the live site too. It&#39;s clean, but it&#39;s also worth respecting. If a broken build ever produced an empty dist/ directory, --delete would happily wipe my live site. That&#39;s a guardrail I&#39;m keeping in mind as the project grows: verify the build before trusting the sync.</p><h3>Step 5: Where It Went Wrong</h3><p>I added my three secrets to GitHub, pushed the code, and opened the Actions tab expecting a green checkmark.</p><p>Instead, red X. Failure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E75yBqX_e-szAa7uYelBqw.png" /><figcaption>The failed pipeline run with the error message</figcaption></figure><p>The error was clear enough:</p><p>&#39;aws-secret-access-key&#39; must be provided if &#39;aws-access-key-id&#39; is provided</p><p>GitHub had found my access key ID but couldn’t find the secret access key. Which was strange, because I was sure I’d added it.</p><p>Then I opened my secret to check it. There it was. I had created a single secret named AWS_ACCESS_KEY_ID and pasted all three values into its value field, one per line, like I was writing an env file:</p><p>AWS_ACCESS_KEY_ID: ...<br>AWS_SECRET_ACCESS_KEY: ...<br>CLOUDFRONT_DISTRIBUTION_ID: ...</p><p>That’s not how GitHub secrets work. Each secret is a single name-value pair. The name is the label the workflow references, and the value is the raw credential, nothing else. No label inside the value. No colon. No other secrets bundled in.</p><p>I needed three separate secrets, each holding just its own value.</p><h3>Step 6: The Fix</h3><p>I deleted the mangled secret and created three clean ones:</p><ul><li>AWS_ACCESS_KEY_ID — just the key, nothing else</li><li>AWS_SECRET_ACCESS_KEY — just the secret</li><li>CLOUDFRONT_DISTRIBUTION_ID — just the distribution ID</li></ul><p>Then I triggered the pipeline again with an empty commit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0AcW4UW6xo3KdXKJFVo97g.png" /><figcaption>Triggering the pipeline after fixing the secrets</figcaption></figure><p>An empty commit is a nice trick here. It creates a new commit with no file changes, purely to trigger the workflow. No need to make a fake edit just to test the pipeline.</p><h3>Step 7: Green</h3><p>Success. Thirteen seconds, start to finish. Every step green.</p><p>I now actually understood how GitHub secrets are structured, instead of having copied something that happened to work.</p><h3>Step 8: Trust, But Verify</h3><p>A green pipeline says the commands ran. It doesn’t prove my live site actually changed. So I checked directly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TOxnEV1ENu4VZrSX3G1t-A.png" /><figcaption>Confirming the deployed content with curl</figcaption></figure><p>The text from my HTML page was live, served through CloudFront. The pipeline hadn’t just run, it had genuinely deployed.</p><p>And in the browser:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/713/1*82VspjABNNTHq4FPqQoLqQ.png" /><figcaption>The site loading in the browser</figcaption></figure><h3>Step 9: The Real Test</h3><p>The whole point of this was a workflow I could actually live with. So I tested it the way I’ll use it every day: change a file, push, and see if the site updates on its own.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q1XaszXQqFTn9IvfKfAldQ.png" /><figcaption>Editing the page, pushing, and confirming the new text is live</figcaption></figure><p>I changed one line of text, committed, pushed. About fifteen seconds later, the new text was live on my domain. No AWS commands. No manual steps. Just push.</p><p>Here’s the full history of my pipeline runs, two failures while I sorted out the secrets, then two clean successes:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FaU6s78Vv9ZuXsT7Y3esiA.png" /><figcaption>The workflow run history</figcaption></figure><p>Those two red X’s are staying in the screenshot on purpose. They’re part of the story.</p><h3>What I Learned</h3><p><strong>Least privilege isn’t optional.</strong> The deployment user can only do two things. If the credentials leak, an attacker can mess with my portfolio content and nothing else. Scoping permissions tightly costs a few extra minutes and saves you from disaster.</p><p><strong>GitHub secrets are single name-value pairs. </strong>This was my bug. Each secret holds one value. You don’t bundle multiple credentials into one secret like an env file. The name is the reference, the value is the raw credential, full stop.</p><p><strong>The runner OS isn’t your deployment target.</strong> I briefly wondered if I should use Amazon Linux instead of Ubuntu for the runner. But the runner is just the temporary machine that executes the pipeline, it has nothing to do with where my site is hosted. Ubuntu is free, standard, and comes with the AWS CLI and Node.js preinstalled. It was the right call.</p><p><strong>Empty commits are great for testing pipelines.</strong> When you need to trigger a workflow without changing any files, an empty commit does exactly that.</p><p><strong>A green pipeline is a claim, not a proof.</strong> Always verify the actual outcome. The commands running successfully doesn’t guarantee the result you wanted. A quick check with curl confirmed the deployment was real.</p><h3>Where This Leaves Me</h3><p>The infrastructure is live and the deployment is automated. Two phases down.</p><p>What’s left:</p><ul><li>Build the actual React portfolio</li><li>Add my cloud projects, the about section, and contact details</li><li>Watch every change auto-deploy through the pipeline I just built</li></ul><p>The best part is that from here on, building the site and deploying it are the same action. I write code, I push, it’s live. That’s the workflow I wanted, and now I have it.</p><p>Part 3 is coming to the React build.</p><p><em>I’m documenting my full Cloud Engineering journey publicly. If you’re on a similar path — career transition , self-teaching, or just curious about cloud infrastructure — follow along.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c05011ccec7a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Part 1: Hosting My Portfolio on AWS (S3 + CloudFront + Route 53) — All From the CLI]]></title>
            <link>https://medium.com/@mihaeldyachenko/hosting-my-portfolio-on-aws-s3-cloudfront-and-route-53-all-from-the-cli-e55869ef8fdb?source=rss-062c2862795d------2</link>
            <guid isPermaLink="false">https://medium.com/p/e55869ef8fdb</guid>
            <category><![CDATA[cloud-infrastructure]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[aws-s3]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Mykhaylo Dyachenko]]></dc:creator>
            <pubDate>Sat, 22 Aug 2026 16:24:56 GMT</pubDate>
            <atom:updated>2026-08-22T16:30:25.977Z</atom:updated>
            <content:encoded><![CDATA[<h3>Why This Architecture?</h3><p>When I decided to build a portfolio website, the first question was: where do I host it?</p><p>The obvious answer for many would be EC2. Spin up a server, install nginx, done. But that’s overkill for a static site. You’re paying $10–15/month for a server running 24/7, and you have to patch it, secure it, maintain it.</p><p>Instead, I chose the serverless approach:</p><p><strong>S3</strong> for storing the files. <strong>CloudFront</strong> for global CDN and HTTPS. <strong>Route 53</strong> for DNS. <strong>ACM</strong> for a free SSL certificate.</p><p>Total cost: roughly $20/year. Most of that is the domain registration and the Route 53 hosted zone.</p><h3>Step 1: Domain and DNS</h3><p>I bought mykhaylo-dyachenko.dev from Porkbun for $8.75/year. Route 53 doesn’t support .dev domain registration, so I purchased externally and pointed the nameservers to AWS.</p><p>First, I created a hosted zone in Route 53.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*dLnwdwnJ3nn0JbCrQ_-PTA.png" /><figcaption>DNS nameservers pointing to AWS Route 53</figcaption></figure><p>The command returns four AWS nameservers. I replaced Porkbun’s default nameservers with these. DNS propagation was surprisingly fast — under 10 minutes.</p><h3>Step 2: SSL Certificate</h3><p>CloudFront requires SSL certificates to be in us-east-1, regardless of where your other resources live. This is a common gotcha.</p><p>I requested the certificate using ACM.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tkXC2d158k0TN544XGi_cg.png" /><figcaption>ACM certificate request</figcaption></figure><p>ACM uses DNS validation. It gives you a CNAME record that proves you own the domain. I needed to add this record to Route 53.</p><p>First, I grabbed my hosted zone ID.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/856/1*j7WOIjwMNmDGGd1crUuk8Q.png" /><figcaption>Getting hosted zone ID</figcaption></figure><p>Then I added the validation CNAME record.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qkm7beC4HGQmoq3AH4kCVQ.png" /><figcaption>Adding CNAME validation record</figcaption></figure><p>After a couple of minutes, the certificate status changed from PENDING_VALIDATION to ISSUED.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MiyY-NPg4yQd7cIC6e8l0w.png" /><figcaption>Certificate status ISSUED</figcaption></figure><h3>Step 3: S3 Bucket</h3><p>Creating the bucket is one line.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/803/1*iUKYarRrvmdUFv_IDXC6WQ.png" /><figcaption>Creating S3 bucket</figcaption></figure><p>I named the bucket the same as my domain. This isn’t required, but it keeps things organized.</p><h3>Step 4: CloudFront Distribution</h3><p>This was the longest command. CloudFront has many configuration options: cache behaviors, origin settings, SSL configuration, allowed HTTP methods.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5iKGjnkfRopPmmKhwUTHHA.png" /><figcaption>CloudFront distribution creation</figcaption></figure><p>The key settings:</p><ul><li><strong>ViewerProtocolPolicy: redirect-to-https</strong> — forces HTTPS</li><li><strong>DefaultRootObject: index.html</strong> — serves the homepage</li><li><strong>ACMCertificateArn</strong> — links to the certificate I created earlier</li></ul><p>CloudFront distributions take 5–10 minutes to deploy. The status changes from InProgress to Deployed.</p><h3>Step 5: DNS Record</h3><p>With CloudFront deployed, I needed to point my domain to it. Route 53 supports alias records that map directly to AWS resources without additional DNS lookups.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AdCJRZy3YUudkiYgxiJYVQ.png" /><figcaption>Route 53 A record pointing to CloudFront</figcaption></figure><p>The HostedZoneId is CloudFront’s fixed zone ID — same for everyone.</p><h3>Step 6: Verify Everything</h3><p>I checked that DNS was resolving correctly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/761/1*aiZlGPvjiaEp7gQYjMVbmg.png" /><figcaption>Verifying DNS and CloudFront deployment status</figcaption></figure><p>Four IP addresses from CloudFront’s edge network. The distribution status shows Deployed.</p><h3>Step 7: Enable Public Access</h3><p>S3 buckets are private by default. For a public website, I needed to disable the public access block and add a bucket policy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H2VbEZwxbvsR730tE1g3EA.png" /><figcaption>S3 public access and bucket policy</figcaption></figure><p>The bucket policy allows anyone to read objects. This is fine for a public website.</p><h3>Step 8: Test It</h3><p>I uploaded a simple HTML file and opened my domain in the browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/785/1*1alddyVH0RYSwN0s1TiYgQ.png" /><figcaption>Final result in browser</figcaption></figure><p>HTTPS working. Domain working. File served from S3 through CloudFront.</p><h3>Step 9: Locking Down S3 with Origin Access Control</h3><p>At this point, the site works. But there’s a security gap: anyone can bypass CloudFront and access S3 directly. Not dangerous for public content, but not clean either.</p><p>Origin Access Control (OAC) fixes this. It tells S3 to only accept requests signed by CloudFront.</p><p>First, I created an OAC configuration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/907/1*BNwj6NEWBu0J7H4zGUsFnw.png" /><figcaption>Creating OAC and getting distribution config</figcaption></figure><p>Then I modified the CloudFront distribution to use the regional S3 endpoint and attach the OAC.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OHe8Mh_l7BZkyQRVdsPZgg.png" /><figcaption>Modifying config with jq and updating distribution</figcaption></figure><p>Finally, I updated the S3 bucket policy to only allow requests from my specific CloudFront distribution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hGn4eU045HshTjsbQF4thw.png" /><figcaption>New bucket policy allowing CloudFront only</figcaption></figure><p>Time to test. CloudFront should return 200, direct S3 should return 403 Forbidden.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XmWDt_oSKINndns2Ocb42Q.png" /><figcaption>Testing CloudFront (200) and direct S3 (403 Forbidden)</figcaption></figure><p>CloudFront works. Direct S3 access is blocked. The site is now properly locked down.</p><h3>What I Learned</h3><p><strong>CLI over console.</strong> Every step here is reproducible. I can document it, version it, and understand exactly what’s happening. Clicking through the AWS console teaches you the UI, not the infrastructure.</p><p><strong>Serverless is cheaper.</strong> For a static site, there’s no reason to run a server. S3 + CloudFront costs pennies.</p><p><strong>DNS validation is smooth.</strong> ACM’s DNS validation is elegant. Add a record, wait a minute, certificate issued. No email verification or manual approval.</p><p><strong>CloudFront zone ID is fixed.</strong> Small detail, but it confused me at first. It’s a constant for all CloudFront distributions.</p><p><strong>OAC is worth the extra steps.</strong> Origin Access Control adds real security with minimal effort. Without it, anyone can bypass your CDN and hit S3 directly. With it, all traffic must go through CloudFront.</p><h3>What’s Next</h3><p>This is Part 1. The infrastructure is done, but the website is just a test page.</p><p>Next:</p><ul><li>CI/CD pipeline with GitHub Actions</li><li>React frontend build</li><li>Automatic deployment on git push</li><li>CloudFront cache invalidation</li></ul><p>The goal is a workflow where I push code and the site updates automatically. That article is coming soon.</p><h3>Cost Breakdown</h3><p>Service Cost Domain (Porkbun) $8.75/year Route 53 hosted zone $0.50/month S3 storage ~$0.01/month CloudFront Free tier, then ~$0.10/month ACM certificate Free</p><p><strong>Total: ~$20/year</strong></p><p>Compare that to a basic VPS at $5–10/month, or managed hosting at $15–20/month. Serverless wins.</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p><em>I’m documenting my full Cloud Engineering journey publicly. If you’re on a similar path — career transition , self-teaching, or just curious about cloud infrastructure — follow along.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e55869ef8fdb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day 3 of 7: Teaching the Bot to Listen (and Actually Respond)]]></title>
            <link>https://medium.com/@mihaeldyachenko/day-3-of-7-teaching-the-bot-to-listen-and-actually-respond-a358774ac701?source=rss-062c2862795d------2</link>
            <guid isPermaLink="false">https://medium.com/p/a358774ac701</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Mykhaylo Dyachenko]]></dc:creator>
            <pubDate>Sun, 12 Jul 2026 04:34:09 GMT</pubDate>
            <atom:updated>2026-07-12T04:34:45.423Z</atom:updated>
            <content:encoded><![CDATA[<p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p>I’m back building the Telegram bot that tutors me in English — grammar drills with spaced repetition, writing evaluation through Claude, and now, the hardest piece: speaking.</p><p>Day 1 gave the bot a memory of my mistakes. Day 2 gave it a voice for feedback on my writing. Day 3 was about giving it ears — and then wiring those ears into a complete feedback loop.</p><p>This day ran long enough that I split it into two sessions. Day 3a was about proving the Azure Speech SDK actually works with my own voice, in isolation. Day 3b was about turning that proof into a production feature.</p><h3>Why speaking is the hard part</h3><p>Grammar and writing are forgiving. There’s text, there’s time to think, there’s a clean input for an LLM to evaluate. Speech is none of that. It’s noisy, it’s real-time, and “good enough” pronunciation evaluation requires more than an LLM guessing at a transcript — it requires a model trained specifically to score phonemes against a reference accent.</p><p>That’s where Azure Speech SDK comes in. Before wiring it into the bot, I needed to prove it actually worked in isolation, with my own voice, in the exact unscripted mode I’d be using in production.</p><h3>Day 3a: The smoke test</h3><h3>What “unscripted mode” means</h3><p>Most pronunciation-assessment demos work like this: you give the model a sentence, the user reads it aloud, and the system scores how closely the audio matches the expected script. That’s not useful for a tutor bot — I want to talk freely about cloud infrastructure or my day driving across Manitoba, not read flashcards.</p><p>Azure supports an unscripted mode: no reference text, the model transcribes and scores pronunciation simultaneously. I also turned on prosody assessment (rhythm, stress, intonation) and phoneme-level granularity, since word-level scores alone wouldn’t tell me which sound in which word is the problem.</p><h3>Building the standalone script</h3><p>I wrote scripts/test_azure_speech.py — no bot, no database, no Telegram, nothing. Load a WAV file, send it to Azure, print both the raw JSON response and a parsed flat dict. The goal was to isolate exactly one variable: does the SDK call work the way I think it works.</p><p>The test sentence I recorded:</p><blockquote>“The thirty-three thieves thought that they thrilled the throne throughout Thursday.”</blockquote><p>A classic th-sound stress test. If my pronunciation has weaknesses, this sentence will find them.</p><p>First real run came back with:</p><p>json</p><pre>{<br>  &quot;transcript&quot;: &quot;The 33 thieves thought that they thrilled the term throughout Thursday.&quot;,<br>  &quot;overall_scores&quot;: {<br>    &quot;accuracy&quot;: 90.0,<br>    &quot;fluency&quot;: 93.0,<br>    &quot;pronunciation&quot;: 81.5,<br>    &quot;prosody&quot;: 74.9<br>  },<br>  &quot;problem_phonemes&quot;: [],<br>  &quot;problem_words&quot;: []<br>}</pre><p>Prosody being the lowest score made sense immediately — rhythm and stress are the last things to click when you’re not a native speaker, even once individual sounds are solid. That’s exactly the kind of signal I built this whole project to surface.</p><p>Azure also transcribed “throne” as “term” — a minor STT error on a stressed word, not a real pronunciation failure. Worth knowing the system isn’t perfect.</p><h3>The unglamorous half of Day 3a</h3><p>Most of the day wasn’t about speech at all — it was about going back and fixing things that Day 1 and Day 2 had quietly broken.</p><p><strong>Grammar rotation bug.</strong> Every morning push was sending the same drill item instead of rotating through the bank. The root cause: when the scheduler issued an item, it didn’t create a progress row. So the item stayed with next_review_date = NULL forever and kept ranking first in the query. The fix was a stub INSERT on issue using ON CONFLICT(user_id, grammar_item_id) DO NOTHING — idempotent, so answering the drill still writes real SRS data, but the item immediately exits the NULL pool.</p><p><strong>NOT NULL constraint crash.</strong> The stub insert was setting last_attempt_correct = NULL, but the column had a NOT NULL constraint. Changed the default to 0. The kind of bug that only surfaces after a few days of real use.</p><p><strong>Silent exception swallowing.</strong> The push handlers were catching exceptions, logging a single line, and returning normally. APScheduler reported every failed push as “executed successfully.” Added raise after logger.exception() in both handlers — now failures are visible in logs and APScheduler correctly marks the job as failed.</p><h3>The azure module structure</h3><p>Once the smoke test passed, I extracted the SDK logic into reusable modules rather than leaving it in the script:</p><pre>src/azure/<br>├── __init__.py        # SpeechAssessmentError custom exception<br>├── parser.py           # Pure function: raw Azure JSON → flat dict<br>└── speech_client.py    # SDK setup + asyncio.to_thread() wrapper</pre><p>The key design decision here: recognize_once() is a synchronous blocking call. Wrapping it in asyncio.to_thread() means it runs in a thread pool executor and doesn&#39;t block aiogram&#39;s event loop while Azure processes the audio.</p><p>python</p><pre>async def assess_pronunciation(wav_path: str) -&gt; dict:<br>    raw_json = await asyncio.to_thread(_sync_assess, wav_path)<br>    return parse_azure_response(raw_json)</pre><h3>Day 3b: Wiring it into the bot</h3><p>With Azure proven, Day 3b was the full integration: voice notes in from Telegram, through a conversion pipeline, into Azure, into Claude, into the database, and back out as structured feedback.</p><h3>The database schema change</h3><p>The speaking_submissions table already existed from Day 1&#39;s initial schema but was missing columns for the task type, duration, and raw Azure response. Migration 003 added them.</p><h3>The audio pipeline</h3><p>Telegram delivers voice notes as OGG Opus. Azure needs WAV PCM 16-bit mono 16kHz. The conversion lives in src/utils/audio.py:</p><p>python</p><pre>async def convert_ogg_to_wav(ogg_path: Path, wav_path: Path) -&gt; None:<br>    cmd = [<br>        &quot;ffmpeg&quot;, &quot;-i&quot;, str(ogg_path),<br>        &quot;-ar&quot;, &quot;16000&quot;, &quot;-ac&quot;, &quot;1&quot;, &quot;-c:a&quot;, &quot;pcm_s16le&quot;,<br>        &quot;-y&quot;, str(wav_path),<br>    ]<br>    process = await asyncio.create_subprocess_exec(*cmd, ...)</pre><p>asyncio.create_subprocess_exec rather than subprocess.run — truly async, doesn&#39;t block the event loop while ffmpeg runs.</p><p>Temp files (OGG download, WAV conversion) live in data/audio_tmp/ and are always cleaned up in a try/finally block, even on errors. Permanent WAVs go to data/audio/{submission_id}.wav only after a successful DB write.</p><h3>Two models, two jobs</h3><p>The /speak command generates a fresh task via Claude — four types rotating by day of month:</p><ul><li>free_response — open-ended question, 90 seconds</li><li>picture_description — describe a scenario</li><li>opinion — take and defend a position</li><li>domain_explanation — explain a technical concept to a non-technical audience</li></ul><p>Today’s task type was domain_explanation. Claude generated:</p><blockquote>“Your manager’s manager — a VP of Operations with no technical background — has just asked you in a hallway conversation: ‘I keep hearing about Kubernetes. What actually is it, and why does our team spend so much time on it?’ Explain Kubernetes clearly and simply in about 75 seconds…”</blockquote><p>That’s a realistic prompt. Not a generic ESL exercise — something I might actually face in a job interview.</p><p>Once the voice note arrives, the pipeline runs:</p><ol><li>Download OGG from Telegram</li><li>Convert to WAV via ffmpeg</li><li>Azure pronunciation + prosody assessment</li><li>Parse Azure response → structured dict</li><li>Send transcript to Claude for spoken grammar evaluation</li><li>Write to speaking_submissions table</li><li>Log phoneme errors and grammar errors to shared errors table</li><li>Render and send feedback</li></ol><p>All of this lives in a single, focused service layer — one function per responsibility, no logic duplicated between the smoke script and the production path.</p><h3>The cross-module errors loop</h3><p>This is the piece I’m most proud of architecturally. Every phoneme below 60/100 and every spoken grammar error gets written to the shared errors table with source_module=&#39;speaking&#39;. The same table already holds grammar drill errors and writing errors.</p><p>Eventually, the morning grammar push will be able to pull from this table and prioritize drills that target the same error patterns I’m making in speaking. The modules are already talking to each other — I just haven’t wired the upstream query yet.</p><h3>The handlers layer</h3><p>Then the aiogram handlers — /speak command, voice note handler with FSM state machine, edge cases for text messages instead of voice, and clean error surfacing for Azure or ffmpeg failures.</p><h3>What real feedback looks like</h3><p>Here’s the actual feedback the bot sent back after I explained microservices using a cruise ship analogy:</p><pre> Your response:<br>&quot;Think of our current application like massive single destination cruise <br>ship. Everything, the engine, the kitchen, the cabins... is built into <br>one giant structure. If the kitchen plumbing legs, the entire ship might <br>have to head back to the board...&quot;</pre><pre> Overall pronunciation:<br>Accuracy: 90/100  |  Fluency: 89/100  |  Prosody: 78.4/100</pre><pre>️ Focus phonemes (top 3):<br>  /ih/ in think — 38/100<br>  /ae/ in application — 58/100<br>  /m/ in massive — 47/100</pre><pre> Spoken grammar:<br>[article]: like massive single destination cruise ship →<br>like a massive, single-destination cruise ship</pre><pre>[word_choice]: the kitchen plumbing legs → the kitchen plumbing leaks</pre><pre>[word_choice]: head back to the board → head back to port</pre><pre> Lexical:<br>  &#39;automates the entire process&#39; — clear, accurate verb choice<br>  Could upgrade: multiple computers → a fleet of servers or machines</pre><pre>Scores: Grammar 5/10 | Lexical 5/10 | Coherence 4/10 | Task 3/10</pre><p>Two things jump out. First, Azure transcribed “leaks” as “legs” — a real mispronunciation that broke the analogy mid-sentence. The bot caught it. Second, the response trailed off without completing the three-beat structure (problem → solution → trade-off), which Claude correctly flagged as a coherence failure, not just a grammar slip.</p><p>The cruise ship analogy itself was good. The delivery wasn’t ready yet.</p><h3>One bug I hit in production</h3><p>After deploying to EC2, the first live voice note failed with a JSONDecodeError: Unterminated string. The Claude evaluation response was being truncated — max_tokens=1024 wasn&#39;t enough for a long transcript with detailed feedback. Bumped it to 2048, redeployed, and it worked.</p><p>The lesson: always test with realistic input length, not a short smoke test sentence.</p><h3>What the project looks like now</h3><p>After three days, the bot has:</p><ul><li>/grammar — SM-2 spaced repetition drills, morning push at 07:30</li><li>/write — five writing task types, Claude evaluation, evening push at 19:00</li><li>/speak — four speaking task types, Azure pronunciation scoring, Claude transcript analysis, phoneme and grammar error logging</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/682/1*nw1pK__jXtndb6FPcpds0g.png" /><figcaption>workflow in Telegram</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*L8_jGe_kE6TCYsaUCeKm4w.png" /><figcaption>workflow in Telegram</figcaption></figure><p>All three modules feed the same errors table. The foundation for cross-module learning is in place.</p><p><strong>New files committed on Day 3:</strong></p><pre>src/azure/__init__.py<br>src/azure/parser.py<br>src/azure/speech_client.py<br>src/utils/audio.py<br>src/db/migrations/003_speaking_columns.sql<br>src/modules/speaking/states.py<br>src/modules/speaking/prompts.py<br>src/modules/speaking/service.py<br>src/modules/speaking/handlers.py<br>scripts/test_azure_speech.py</pre><h3>What’s Next</h3><ul><li><strong>Day 4 — Voice capture and intent detection.</strong> A /word-voice command where voice notes get routed through a Claude intent classifier — vocabulary capture, usage question, phrase capture, or ambiguous. Usage questions feed back into the errors table for personalised grammar drills.</li><li><strong>Day 5 — Vocabulary SRS.</strong> Full spaced repetition for vocabulary with four review formats: cloze, paraphrase, collocation, and production. Active-use tracking scans writing submissions for words in the queue. Lexical upgrades flagged by the Day 2 writing module auto-populate the vocab table here.</li><li><strong>Day 6 — Personal Sentence Corpus.</strong> A /narrate command for voice narration. Claude runs a refinement pipeline that upgrades B1 sentences to C1 with full explanations. Domain tagging across kubernetes, cloud, daily life. Audio generated via Azure TTS. SRS hooks included for future /recall and /shadow commands.</li><li><strong>Day 7 — Deployment polish and public launch.</strong> GitHub Actions replaces the manual deploy script. Credentials move to AWS Secrets Manager. CloudWatch forwards logs. A /progress command shows weekly stats. The repo goes public and the first Medium article goes live.</li></ul><p>Seven days. One system that covers grammar, writing, speaking, vocabulary, and sentence production — all feeding the same error database, all getting smarter the longer I use it. Built on the same stack I’m learning for my cloud career. Two problems, one project.</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p><strong><em>The full source code will be published on GitHub at the end of Day 7, alongside the final article in this series. Subscribe / follow to be notified when it goes live.</em></strong></p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p><em>I’m documenting my full Cloud Engineering Academy journey publicly. If you’re on a similar path — career transition , self-teaching, or just curious about cloud infrastructure — follow along.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a358774ac701" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day 2 of 7: Building a Writing Module That Powers My Grammar Drills]]></title>
            <link>https://medium.com/@mihaeldyachenko/day-2-of-7-building-a-writing-module-that-powers-my-grammar-drills-c4de79be602b?source=rss-062c2862795d------2</link>
            <guid isPermaLink="false">https://medium.com/p/c4de79be602b</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Mykhaylo Dyachenko]]></dc:creator>
            <pubDate>Fri, 15 May 2026 04:23:42 GMT</pubDate>
            <atom:updated>2026-05-15T17:40:46.458Z</atom:updated>
            <content:encoded><![CDATA[<p>_________________________________________________________________</p><h4>Day 1 Recap</h4><p>On Day 1 I built a grammar drill module with SM-2 spaced repetition, a morning push at 07:30 Winnipeg time, and a shared errors table that logs every mistake I make. The bot was deployed to EC2 (Amazon Linux 2023, us-east-1) and has been running in production since.</p><p>The errors table was the architectural decision that made Day 2 possible.</p><h4>Day 2 Goal: The Writing Module</h4><p>The headline feature of Day 2 is not the writing module itself — it is the <strong>cross-module integration</strong>.</p><p>Every error I make in a writing submission gets logged to the same errors table that grammar drills use. That means tomorrow morning&#39;s grammar push can prioritize the structures I fumbled in tonight&#39;s writing. The system starts to feel like a system, not a collection of disconnected features.</p><p>Here is what I built today:</p><ul><li>/write command — generates a fresh writing prompt via Claude</li><li>Five rotating task types (professional email, opinion piece, summary, process description, short narrative)</li><li>Claude evaluates my submission and returns structured feedback: corrections, top error patterns, a native-like upgrade sentence, and five sub-scores</li><li>Writing errors logged to the shared errors table with source_module=&#39;writing&#39;</li><li>Lexical upgrades stored for Day 5 (vocabulary module) to consume later</li><li>Evening push at 19:00 Winnipeg time — sends a writing prompt automatically, no command needed</li><li>A migration system to apply schema changes without touching the deployed schema</li></ul><h4>Step 1 — Database Migration</h4><p>Day 1 schema is already deployed on EC2. I cannot edit the original schema file and re-run it — that would wipe production data. So Day 2 starts with a proper migration runner.</p><p>I created a migrations directory with a single SQL file adding two new columns to the writing_submissions table: lexical_upgrades (for Day 5 vocab module to consume later) and task_type (to track the rotation).</p><p>The migration runner tracks applied files in a schema_migrations table and runs any pending migrations on every startup. Safe to call every boot — no-ops if everything is already current.</p><p>One bug I hit: a semicolon inside a SQL comment caused the splitter to treat the comment and the next statement as a single block, which failed. The fix was to strip comment lines before splitting on semicolons — not after.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ps-ob_DPrj23L8g0ByljZA.png" /><figcaption>Migration applied — both new columns confirmed in writing_submissions</figcaption></figure><h4>Step 2 — Claude Prompts</h4><p>The writing module uses two Claude prompts.</p><p><strong>Prompt 1 — Task generation.</strong> Given a task type and register, Claude produces a specific, realistic prompt grounded in my actual life: cloud engineering, trucking, immigration, Canadian job search. The constraint is deliberate — a B2 learner can produce something, but a C1 learner will naturally reach for hedging, nominalization, and discourse markers. Generic ESL topics (dream holidays, favourite colours) are explicitly excluded.</p><p><strong>Prompt 2 — Evaluation.</strong> Sends my submission back to Claude with the original prompt and evaluation focus. Returns top error patterns grouped by category, a native-like upgrade for one sentence, lexical upgrade suggestions, and five scores: content, organization, grammar, vocabulary, naturalness. The instruction to Claude is explicit: be honest, a clear B2-level submission gets 6–7, not 8–9.</p><p>I tested each prompt by calling Claude directly from the terminal before writing any handler code, to confirm the JSON came back clean and parseable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lp3RoalJbWW_hzCpC9_GLQ.png" /><figcaption>Claude returns all 6 required keys — clean JSON, no fences</figcaption></figure><h4>Step 3 — Service Layer</h4><p>The service layer sits between Claude and the database. Three main functions: generate a writing prompt for today’s task type, evaluate a submission, and log the resulting errors to the shared errors table.</p><p>The task type rotation is the simplest possible implementation: five task types in a list, indexed by today’s calendar day ordinal modulo five. No database, no state, fully deterministic. Today was short_narrative. Tomorrow will be professional_email.</p><p>I tested the service layer from the Python REPL before touching any handler code — confirmed the task type rotated correctly and the prompt came back with the right structure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YI_XhMbVbn2VNjfXnVyvHg.png" /><figcaption>Service layer test — task type rotates correctly, prompt structure valid</figcaption></figure><h4>Step 4 — FSM Handlers and the /write Command</h4><p>The writing flow needs FSM (Finite State Machine) because the user’s response comes in a follow-up message, not as a command argument. The flow is simple: /write triggers Claude to generate a prompt, the prompt is cached in FSM state data, the bot sends it and waits. When the user replies, the handler validates length, sends the text to Claude for evaluation, stores the submission, logs errors to the shared table, and sends formatted feedback.</p><p>The prompt is cached in FSM state — not in the database. If the bot restarts mid-session the user gets a fresh prompt on the next /write. Acceptable for a single-user bot at this stage.</p><p>After wiring the writing router into the dispatcher and starting the bot locally, I stopped the EC2 instance to avoid a polling conflict, then tested the full flow from my machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ODUO8w6EdEG3JQJk7PfE7A.png" /><figcaption>Stopping EC2 to avoid polling conflict during local testing</figcaption></figure><p>I sent /write from Telegram, submitted a professional email response, and the feedback arrived formatted cleanly — top issues, native-like upgrade, scores, overall summary.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/556/1*TK5UOEzHzGmX6qDDAKGgQw.png" /><figcaption>Feedback rendered in Telegram — top issues, upgrade, scores in one message</figcaption></figure><p>Then committed and pushed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MnGwCelxlK3AjCWk_9e1hA.png" /><figcaption>Git commit — handlers and service layer</figcaption></figure><h4>The Cross-Module Integration</h4><p>This is the architectural headline of Day 2.</p><p>The errors table has a source_module column. Grammar module writes with source_module=&#39;grammar&#39;. Writing module writes with source_module=&#39;writing&#39;. The grammar service that selects items for morning drills does not filter by source module — it reads from all sources equally.</p><p>This means: if I write a professional email tonight and Claude flags that I consistently use verbal constructions where nominalized forms belong at C1, that pattern is in the errors table by 19:30. Tomorrow at 07:30, the grammar drill can prioritize nominalization exercises.</p><p>The two modules have never imported from each other. They share only a database table. This is the integration.</p><h4>Step 5 — Evening Push</h4><p>The scheduler fires at 19:00 Winnipeg time, generates a fresh writing prompt via Claude, sets the FSM state directly via storage, and sends the prompt. No /write command needed — just reply.</p><p>This follows the exact same pattern as the morning grammar push from Day 1. The only difference is which FSM state gets set: morning sets grammar state, evening sets writing state.</p><p>I tested it by temporarily setting the push time to two minutes from the current Winnipeg time, restarting the bot, and watching the prompt arrive in Telegram automatically — no command sent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U_ndfjZz2dW8WNV7M6c5lw.png" /><figcaption>Evening push arriving at scheduled time — no command sent</figcaption></figure><h4>Deploy to EC2</h4><p>The deploy script pushes to GitHub and SSHes into the EC2 instance to pull and restart the service. Eight files changed. On startup, the migration runner detected 002_writing_columns.sql as pending, applied it to the production database, and recorded it in schema_migrations. Both scheduled jobs — morning grammar push and evening writing push — were registered. Polling started cleanly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pWAM9diyNVBKNPuwrb5pRw.png" /><figcaption>Deploy script — 8 files changed, service restarted on EC2</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*18SmahaAEioysJphESCj8g.png" /><figcaption>EC2 startup — migration applied, both scheduler jobs registered, polling started</figcaption></figure><h4>Production Round-Trip</h4><p>With the bot running on EC2, I sent /write from Telegram, submitted a professional email response, and feedback arrived. The scores were honest — B2+ level, not inflated. The EC2 debug logs confirmed the full chain: evaluation completed, submission stored, three error patterns logged to the shared errors table with source_module=&#39;writing&#39;.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/568/1*osBZUXANc3HytTqfScbyxQ.png" /><figcaption>Production round-trip — feedback arrives on mobile</figcaption></figure><h4>What I Learned Today</h4><p><strong>The shared table pattern works.</strong> Two modules with no direct imports between them, communicating only through a database table. The grammar service was written on Day 1 with no knowledge of the writing module, and it picks up writing errors automatically because it never filtered by source_module.</p><p><strong>Nano and indentation don’t mix.</strong> I hit TabError and IndentationError twice from editing Python in the terminal. Fixed with expand -t 4.</p><p><strong>Token limits matter for structured output.</strong> The default max_tokens=1024 in my Claude client was too low for evaluation JSON. A detailed feedback response for a 150-word email can easily exceed that. Always set explicit limits on calls that return complex structured data.</p><p><strong>Test prompts before building handlers.</strong> Calling Claude directly from the REPL to confirm JSON structure before writing any aiogram code saved me from debugging two problems at once.</p><p>The bot is running in production on EC2 at 07:30 and 19:00 every day. Tonight’s writing errors will feed tomorrow morning’s grammar drill. That’s the loop working.</p><h4>What’s Next</h4><ul><li><strong>Day 3 — Speaking and pronunciation.</strong> A /speak command with free-response prompts. Azure Speech SDK handles per-phoneme accuracy scoring, calibrated specifically for Ukrainian and Russian L1 patterns. Pronunciation errors get their own category in the errors table.</li><li><strong>Day 4 — Voice capture and intent detection.</strong> A /word-voice command where voice notes get routed through a Claude intent classifier — vocabulary capture, usage question, phrase capture, or ambiguous. Usage questions feed back into the errors table for personalised grammar drills.</li><li><strong>Day 5 — Vocabulary SRS.</strong> Full spaced repetition for vocabulary with four review formats: cloze, paraphrase, collocation, and production. Active-use tracking scans writing submissions for words in the queue. Lexical upgrades flagged by the Day 2 writing module auto-populate the vocab table here.</li><li><strong>Day 6 — Personal Sentence Corpus.</strong> A /narrate command for voice narration. Claude runs a refinement pipeline that upgrades B1 sentences to C1 with full explanations. Domain tagging across kubernetes, cloud, daily life. Audio generated via Azure TTS. SRS hooks included for future /recall and /shadow commands.</li><li><strong>Day 7 — Deployment polish and public launch.</strong> GitHub Actions replaces the manual deploy script. Credentials move to AWS Secrets Manager. CloudWatch forwards logs. A /progress command shows weekly stats. The repo goes public and the first Medium article goes live.</li></ul><p>Seven days. One system that covers grammar, writing, speaking, vocabulary, and sentence production — all feeding the same error database, all getting smarter the longer I use it. Built on the same stack I’m learning for my cloud career. Two problems, one project.</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p><strong><em>The full source code will be published on GitHub at the end of Day 7, alongside the final article in this series. Subscribe / follow to be notified when it goes live.</em></strong></p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p><em>I’m documenting my full Cloud Engineering Academy journey publicly. If you’re on a similar path — career transition , self-teaching, or just curious about cloud infrastructure — follow along.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c4de79be602b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Personal English Tutor Bot in 7 Days — Day 1]]></title>
            <link>https://medium.com/@mihaeldyachenko/building-a-personal-english-tutor-bot-in-7-days-day-1-c90d2ab8c52f?source=rss-062c2862795d------2</link>
            <guid isPermaLink="false">https://medium.com/p/c90d2ab8c52f</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <dc:creator><![CDATA[Mykhaylo Dyachenko]]></dc:creator>
            <pubDate>Mon, 11 May 2026 23:17:59 GMT</pubDate>
            <atom:updated>2026-05-15T17:41:29.932Z</atom:updated>
            <content:encoded><![CDATA[<p>_________________________________________________________________</p><h4>Why I’m building an AI English tutor on Telegram</h4><p>English is my third language. I speak it every day, read it constantly, and still sometimes pause mid-sentence wondering if that’s actually how a native speaker would say it. B2 is fine. C1 is where you stop thinking about the language and start just using it.</p><p>I want C1. So I built a tool on Telegram to get me there.</p><p>Not an app subscription. Not Duolingo streaks. A personal Telegram bot powered by Claude, deployed on AWS EC2, that knows my weaknesses, tracks my mistakes, and drills me on exactly the grammar patterns I get wrong.</p><p>This is how Day 1 went.</p><h4>The Idea</h4><p>Generic English apps have the same problem as generic learning platforms in any field — they’re built for the average user, not for you. Same content, same order, same pace. I needed something that understood my specific weaknesses and came after them.</p><p>As someone building in cloud, I also wanted the project itself to be real engineering. Not a script that runs locally. A proper service — modular codebase, database schema designed to last, deployed on AWS, running 24/7. Something I’d put on my GitHub and not be embarrassed by.</p><p><strong>The requirements I set for myself:</strong></p><ul><li>Targets C1-level grammar specifically — the gap between “functional” and “fluent” that separates B2 speakers from people who sound like they lead the room</li><li>Remembers every mistake and brings those items back using spaced repetition — the same algorithm used by Anki</li><li>Pushes a drill to my phone every morning automatically — no willpower required</li><li><strong>Logs errors to a database so the system gets smarter the longer I use it</strong></li><li>Built on the stack I’m learning: Python, AWS EC2, SQLite, Claude API, systemd</li></ul><p>The architecture covers five modules: Grammar, Writing, Speaking (Azure Cognitive Services for pronunciation), Vocabulary, and a personal Sentence Corpus. Seven days to build them all.</p><p>Day 1 is the foundation — project skeleton, complete database schema for all five modules, and the grammar module working end-to-end in production.</p><h4>The Stack</h4><p>Python 3.12<br>aiogram v3 — async Telegram bot framework<br>SQLite — local DB, migrating to Postgres on Day 5<br>Anthropic Claude — grammar generation + grading<br>APScheduler — morning push at 7:30 AM Winnipeg time<br>AWS EC2 t3.small — Amazon Linux 2023, runs 24/7<br>GitHub — source of truth, GitOps deploy pattern</p><p>No frameworks I didn’t understand. No Docker yet. No over-engineering. Just a clean, modular Python project I could build file by file and understand every line.</p><h4>Project Structure</h4><p>The first thing I did was create the full directory tree before writing a single line of code. Every module gets its own folder. Days 2–5 modules are empty stubs today — the structure is there, ready to fill in.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ytTPtIyy2EX8JeK6KwXIXw.png" /><figcaption>mkdir + touch commands creating the full directory tree</figcaption></figure><p>Nineteen files total. Each one committed separately to GitHub so the history tells a story.</p><h4>Building File by File</h4><p>I wrote every file manually — no copy-paste from a generator, no scaffolding tool. Each file went through the same cycle: write it, verify it imports correctly, commit, push.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/533/1*KIuBbYo2_OplG1M8nTRjLw.png" /><figcaption>requirements.txt open in vim with pinned package versions</figcaption></figure><p>Starting with requirements.txt with pinned versions means the bot behaves identically on my local machine and on EC2. No surprise breakages from a package updating overnight.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u8KPzAZ5N4ND3-5IMpexDA.png" /><figcaption>pip installing all packages successfully + git push</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mLHnlalDWSP2UFb8qW_A1Q.png" /><figcaption>config.py verification printing “Config OK” then git push</figcaption></figure><p>config.py is the only file that reads environment variables. Every other module imports constants from here. If a required key is missing it raises a clear error immediately — not a cryptic failure ten calls deep.</p><h4>The Database Schema</h4><p>One of the key decisions on Day 1: design the complete schema for all five modules now, not just grammar. Days 2–7 never need migrations — the tables exist, they’re just empty.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QCWG8F0suQTcKuZkTu8nvw.png" /><figcaption>schema.sql commit: 182 insertions, git push</figcaption></figure><p>Eight tables cover the full five-module system. The errors table is the heart of it — every mistake gets logged with full context: what I wrote, what was correct, why I was wrong. Over time this becomes a personalised weakness map.</p><p>The user_grammar_progress table holds SM-2 spaced repetition state for every item: interval, ease factor, repetitions, next review date. Same algorithm used by Anki.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*shFLYufGVLB0qFD3q1YuIg.png" /><figcaption>connection.py commit + push</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1012/1*FauW1mFxKEMgE7EQX_8dCw.png" /><figcaption>users.py commit + push</figcaption></figure><h4>Connecting to Claude</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JPfDt3dsjOcRDSfTatv1rw.png" /><figcaption>claude/client.py commit + push</figcaption></figure><p>Eight tables cover the full five-module system. The errors table is the heart of it — every mistake gets logged with full context: what I wrote, what was correct, why I was wrong. Over time this becomes a personalised weakness map.</p><p>The user_grammar_progress table holds SM-2 spaced repetition state for every item: interval, ease factor, repetitions, next review date. Same algorithm used by Anki.</p><h4>Seeding: 30 C1 Drill Items on First Boot</h4><p>I didn’t hand-write 30 grammar items. On first boot, the bot calls Claude 8 times — once per grammar structure — and generates them automatically:</p><p>mixed_conditional × 5<br>inversion_negative_adverbial × 5<br>cleft_sentence × 3<br>subjunctive_after_verbs × 4<br>modal_perfect × 5<br>reduced_relative_clause × 3<br>nominalization × 3<br>discourse_marker_advanced × 2</p><p>Each item is generated with a specific constraint: it must discriminate between B2 and C1. A B2 learner should plausibly get it wrong. A C1 learner gets it right intuitively. No textbook sentences — only phrasing that could appear in a professional email or a technical discussion.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nvCqOPjjMZvActZ0H3cDsQ.png" /><figcaption>seeds.py commit: 118 insertions, git push</figcaption></figure><h4>The Grammar Module</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AmeptRVtzooDhqMIqJwOoA.png" /><figcaption>states.py commit + push</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*purpjGnuz9kudH2ImibbDw.png" /><figcaption>srs.py commit: “Add SM-2 SRS algorithm”, git push</figcaption></figure><p>The SM-2 spaced repetition logic lives in one pure function with no database calls, no side effects — just math. Correct answer on first attempt: next review in 1 day. Correct twice: 6 days. Wrong answer: back to 1 day, ease factor drops.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C6mBx4wkybIhbCDWYJkDcw.png" /><figcaption>prompts.py commit + push</figcaption></figure><p>The grading prompt is specific about strictness:</p><p>“Be precise and strict. Do not accept answers that are merely plausible — only genuinely correct forms pass.”</p><p>This matters. A lenient grader is useless for reaching C1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Nw_ykts98DK4HtVtVtAZ1g.png" /><figcaption>service.py commit: 196 insertions, git push</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m4jS2fiv74Tp97bUUE2QlQ.png" /><figcaption>handlers.py commit: 112 insertions, git push</figcaption></figure><p>When I type /grammar, the bot picks the oldest due SRS item first, falls back to unseen items if nothing is due, and sends the drill. When I reply, Claude grades it and the result goes three places: feedback back to me, SM-2 state updated, mistake logged to the errors table if wrong.</p><h4>The Scheduler</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*22oVJkrO0-eol0vHBrn3gQ.png" /><figcaption>jobs.py commit + push</figcaption></figure><p>At 7:30 AM Winnipeg time, APScheduler fires morning_grammar_push. It picks a due item, sets FSM state to awaiting_answer, and sends the drill directly to Telegram. No /grammar command needed — just wake up, see the drill, reply.</p><p>One thing I hit during testing: Telegram’s Markdown parser rejects messages with unescaped special characters. Some of Claude’s generated drill prompts contain apostrophes or backticks that break the parser. The fix was simple — strip all Markdown from the morning push, send plain text only.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FFn01w_BqMfXDU0V6mfx-A.png" /><figcaption>the fix commit: “remove Markdown from morning push to avoid entity parse errors”</figcaption></figure><h4>Wiring Everything Together</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xt4DYA1Lw469MsZBgUVQLQ.png" /><figcaption>main.py commit: 87 insertions, git push</figcaption></figure><p>main.py is the entry point that wires everything in the right order: DB init → seeding if first boot → bot + dispatcher → scheduler → polling. On shutdown it closes cleanly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XtZZhMZzfeuIPdavx_c_lw.png" /><figcaption>deploy.sh commit + push</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L2SjL4LlfCM8RBnzRfqWzw.png" /><figcaption>setup-ec2.sh commit + push</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SR__j_-dH6WaYGfWd_q6cg.png" /><figcaption>tutor-bot.service commit + push</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xv9oATr-8izK7yEWNQHS4w.png" /><figcaption>final “Day 1 complete” commit pushing all init.py files</figcaption></figure><h4>Deploying to EC2</h4><p>The GitOps pattern: code lives on my local machine, GitHub is the source of truth, EC2 runs the bot 24/7. I launched the instance entirely through the AWS CLI — no console.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*klbzLqgVacNwyIe1vfmttA.png" /><figcaption>VPC + subnet query, security group creation, SSH ingress rule all in one terminal</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/934/1*EjyqwneRKUdnVPPMpKH8Pw.png" /><figcaption>aws ec2 create-key-pair + chmod 400</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yX7f2yvasr9RggE9TcIaDg.png" /><figcaption>aws ec2 run-instances + describe-instances returning the public IP</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RfJ9E9lrKTUEWMSbJZT7EA.png" /><figcaption>SSH config setup + first login with Amazon + ssh-keygen generating the EC2 key for GitHub</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lryHbnlSJd0l9QUVoFhKPQ.png" /><figcaption>setup-ec2.sh running on EC2, installing Python 3.12, git, sqlite</figcaption></figure><p>setup-ec2.sh handles everything on the server side in one run: installs Python 3.12, clones the repo, creates the venv, installs dependencies, sets up the systemd service. Run it once, never touch the server setup again.</p><p>The bot runs as a systemd service with Restart=always — crashes come back in 10 seconds automatically.</p><h4>What Actually Happened During Testing</h4><p>The bot registered my Telegram account, pulled a C1 modal perfect drill, and I answered wrong.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/605/1*_NCj9rJHMQmRDj7wQq4cgA.png" /><figcaption>the drill question + Claude’s feedback response</figcaption></figure><p>The logs showed exactly what happened:</p><p>error_category: modal_perfect<br>error_subcategory: infinitive_form_after_modal_perfect<br>user_input: “We should have test the rollback procedure…”<br>correct_form: “We should have tested the rollback procedure…”</p><p>Specific. Honest. No sugar-coating. Exactly what I needed.</p><h4>Day 1 Checklist — All Green</h4><ul><li>/start registers user in DB</li><li>/grammar pulls a C1 item, grades the answer via Claude</li><li>Wrong answers logged to errors table with full context</li><li>SM-2 state updates correctly after each answer</li><li>Morning push fires on schedule, sets FSM state for direct reply</li><li>All 8 schema tables created with indexes</li><li>30 seed grammar items in DB</li><li>Bot running on EC2 under systemd, auto-restarts on failure</li><li>One-command deploy from local machine to production</li></ul><h4>What’s Next</h4><p>Day 1 is the foundation. Here’s what gets built on top of it:</p><p><strong>Day 2 — Writing module.</strong> A /write command with rotating evening prompts — emails, opinions, summaries, data descriptions, narratives. Claude grades each submission with corrections, top errors, a native-like upgrade, and five sub-scores. Writing mistakes feed the same errors table that drives grammar drills, so a bad preposition in your writing shows up as a grammar drill the next morning.</p><p><strong>Day 3 — Speaking and pronunciation.</strong> A /speak command with free-response prompts. Azure Speech SDK handles per-phoneme accuracy scoring, calibrated specifically for Ukrainian and Russian L1 patterns. Pronunciation errors get their own category in the errors table.</p><p><strong>Day 4 — Voice capture and intent detection.</strong> A /word-voice command where voice notes get routed through a Claude intent classifier — vocabulary capture, usage question, phrase capture, or ambiguous. Usage questions feed back into the errors table for personalised grammar drills.</p><p><strong>Day 5 — Vocabulary SRS.</strong> Full spaced repetition for vocabulary with four review formats: cloze, paraphrase, collocation, and production. Active-use tracking scans writing submissions for words in the queue. Lexical upgrades flagged by the Day 2 writing module auto-populate the vocab table here.</p><p><strong>Day 6 — Personal Sentence Corpus.</strong> A /narrate command for voice narration. Claude runs a refinement pipeline that upgrades B1 sentences to C1 with full explanations. Domain tagging across kubernetes, cloud, daily life. Audio generated via Azure TTS. SRS hooks included for future /recall and /shadow commands.</p><p><strong>Day 7 — Deployment polish and public launch.</strong> GitHub Actions replaces the manual deploy script. Credentials move to AWS Secrets Manager. CloudWatch forwards logs. A /progress command shows weekly stats. The repo goes public and the first Medium article goes live.</p><p>Seven days. One system that covers grammar, writing, speaking, vocabulary, and sentence production — all feeding the same error database, all getting smarter the longer I use it. Built on the same stack I’m learning for my cloud career. Two problems, one project.</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p><strong><em>The full source code will be published on GitHub at the end of Day 7, alongside the final article in this series. Subscribe / follow to be notified when it goes live.</em></strong></p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p><em>I’m documenting my full Cloud Engineering Academy journey publicly. If you’re on a similar path — career transition , self-teaching, or just curious about cloud infrastructure — follow along.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c90d2ab8c52f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Week 11: Cloud Security Fundamentals]]></title>
            <link>https://medium.com/@mihaeldyachenko/week-11-cloud-security-fundamentals-f39582dc109c?source=rss-062c2862795d------2</link>
            <guid isPermaLink="false">https://medium.com/p/f39582dc109c</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud-security]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Mykhaylo Dyachenko]]></dc:creator>
            <pubDate>Wed, 06 May 2026 22:41:16 GMT</pubDate>
            <atom:updated>2026-05-06T22:46:42.178Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*8rEDbDpoMqCJx9JWLuuoMg.jpeg" /><figcaption>“ The mantra of any good security engineer is: ‘Security is a not a product, but a process.’ It’s more than designing strong cryptography into a system; it’s designing the entire system such that all security measures, including cryptography, work together.” — Bruce Schneier</figcaption></figure><p>When I saw “Cloud Security Fundamentals” on the Week 11 curriculum, my first thought was something like — okay, IAM policies, MFA, the usual stuff I have heard about a hundred times. I figured it would be review.</p><p>It wasn’t really review. Or rather, it was the same concepts I’d seen before, but this week they connected into a system. Everything that seemed like isolated pieces — VPCs, security groups, IAM, encryption — finally had a framework around it. That’s what this week was about for me.</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><h4>The Foundation: CIA Triad</h4><p>Every security decision in cloud engineering comes back to three things: <strong>Confidentiality</strong>, <strong>Integrity</strong>, and <strong>Availability</strong>.</p><p><strong>Confidentiality</strong> means only the right people can access the right data. <strong>Integrity</strong> means that data hasn’t been tampered with — what you stored is what you get back. <strong>Availability</strong> means the system is actually accessible when you need it. Downtime is also a security failure.</p><p>Why does this matter practically? Because when you’re designing infrastructure — deciding where to put an EC2 instance, whether to encrypt an S3 bucket, how to configure a security group. You are making trade-offs between these three. A system locked down so hard that legitimate users can’t access it has failed on Availability. A database that’s always up but readable by anyone has failed on Confidentiality. The CIA Triad is the lens you use to evaluate those trade-offs.</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><h4>Authentication vs Authorization: Not the Same Thing</h4><p>This sounds basic but it trips people up constantly, so the lecture spent real time on it.</p><p><strong>Authentication</strong> is proving who you are. Think of getting your library card — you show your ID, they verify you exist, they give you the card. In AWS, this is aws configure with your Access Key ID and Secret Access Key. IAM users and roles. Certificates. MFA. Biometrics. All of that is authentication — proving identity.</p><p><strong>Authorization</strong> is what that identity is allowed to do. You have the library card. Which books can you borrow? Which sections can you enter? In AWS, this is your IAM policies. A simple example from my notes:</p><p>{<br> &quot;Effect&quot;: &quot;Allow&quot;,<br> &quot;Action&quot;: [<br> &quot;s3:GetObject&quot;,<br> &quot;s3:PutObject&quot;<br> ],<br> “Resource”: “arn:aws:s3:::my-bucket/*” <br>}</p><p>This policy says: you are allowed to read and write objects in my-bucket . Nothing else. Not delete, not list all buckets, nothing outside that bucket. That’s authorization — precise, scoped permissions.</p><p>The key insight my instructor emphasized: <strong>authentication alone isn’t enough. Authorization must be precise</strong>. A user who can authenticate but has overly broad permissions is a massive security risk. In AWS, this is why least-privilege IAM policies matter so much.</p><p>Access control in AWS comes in three main flavors: Role-Based (RBAC), Attribute-Based (ABAC), and Policy-Based. AWS implements these through IAM Policies, Resource Policies, and Security Groups.</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><h4>Security Controls: Your Three-Layer Defense</h4><p>Once you understand the CIA Triad and the AuthN/AuthZ distinction, you need a framework for actually implementing protection. That’s where security controls come in — and they are organized into three types.</p><p>Preventive Controls — Stop Threats Before They Happen</p><p>These are your first line of defense. Think of them like security guards at the front door — they stop problems before they become problems.</p><p>In practice: Identity &amp; Access Management, MFA enforcement, strong password policies, firewalls (which check IP address like bouncers checking IDs at a club), and encryption.</p><p><strong>Encryption</strong> deserves its own mention here. The notes used a good analogy. It’s like a high-security safe. It protects sensitive data at rest and in transit, and it requires proper keys to open. Without keys, the data is useless even if someone gets their hands on it.</p><p><strong>MFA</strong> is like multiple locks on a door. Something you know (password), something you have (phone/token), something you are (biometrics). All three factors together make unauthorized access exponentially harder.</p><p>Detective Controls — Know When Something Goes Wrong</p><p>These don’t prevent incidents. They make sure you find out about them. Like security cameras. They don’t stop a break-in, but they ensure you know it happened.</p><p>In AWS this means:</p><ul><li><strong>Log Monitoring:</strong> CloudWatch Logs, CloudTrail Events, VPC Flow Logs — reviewing the security camera footage</li><li><strong>Intrusion Detection:</strong> GuardDuty, Security Hub, Inspector — like motion sensors in your house</li></ul><p>Corrective Controls — Fix It After Detection</p><p>When things go wrong, corrective controls kick in. Like having insurance and a repair service on call 24/7.</p><p>This covers:</p><ul><li><strong>Backup &amp; Recovery:</strong> AWS Backup, S3 Versioning, RDS Snapshots — spare keys if you get locked out</li><li><strong>Incident Response:</strong> AWS Systems Manager, Lambda Functions — your emergency playbook</li><li><strong>Auto Patching:</strong> Systems Manager Patch Manager, Auto Scaling — a self-healing system</li></ul><p><strong>Security Auditing</strong> sits on top of all three: AWS Config for compliance checks and security assessments, routine inspections to make sure the controls are actually working.</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><h4>Risk Assessment: What Are You Actually Protecting?</h4><p>Here is where the week got really interesting for me. Security controls are tools. Risk assessment tells you <strong><em>which</em></strong> tools to use, <strong><em>where</em></strong>, and <strong><em>how hard</em></strong> to invest in them.</p><p>The formula is elegant: <strong>Risk = Threat * Vulnerability * Impact</strong></p><p>Four elements go into it:</p><p><strong>Assets</strong> — what needs protection. S3 buckets with customer data. EC2 instances running applications. RDS databases with financial records.</p><p><strong>Threats </strong>— potential dangers. Malicious hackers. System failures. Accidental deletions (this one is underrated — insider threats and human error cause more incidents than external attacks).</p><p><strong>Vulnerabilities</strong> — the weaknesses threats can exploit. Misconfigured security groups. Weak passwords. Public-facing resources that shouldn’t be public.</p><p><strong>Impact </strong>— what happens if a threat exploits a vulnerability. Financial losses. Damaged reputation. Regulatory fines.</p><p>The risk assessment <strong><em>process</em></strong> follows a logical order: identify your assets first (critical applications, sensitive data locations, 24/7 systems, business-critical services), then analyze threats and vulnerabilities against those assets, then decide how to handle each risk.</p><p>Risk handling options:</p><ul><li><strong>Accept</strong> — for low-impact risks where the cost of mitigation exceeds the potential loss</li><li><strong>Mitigate</strong> — implement controls</li><li><strong>Transfer</strong> — insurance, third-party responsibility</li><li><strong>Avoid</strong> — change the approach entirely to eliminate the risk</li></ul><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><h4>Web Application Risk Assessment: A Real Example</h4><p>The lecture put a concrete VPC architecture on the table and walked through its risk profile. This is the kind of thing that makes abstract concepts click.</p><p>VPC with three zones:</p><p><strong>Public Subnet (AZ-1)</strong> — Application Load Balancer sitting here.</p><p>Risks: public exposure, DDoS vulnerability, open security groups.</p><p>Controls: WAF rules, Shield Advanced, NACL restrictions.</p><p><strong>Private Subnet (AZ-1 only — already a risk)</strong> — EC2 server with default security group, RDS database with no encryption running in a single AZ.</p><p>Critical risks: no multi-AZ redundancy, default security groups (too permissive), unencrypted data at rest. Recommended controls: multi-AZ deployment, custom security groups, KMS encryption.</p><p><strong>Security Tools</strong> — AWS Security Hub, GuardDuty, AWS Backup.</p><p>Monitoring controls: CloudTrail enabled, VPC Flow Logs, Security Hub findings.</p><p>The key teaching point: the private subnet being single-AZ isn’t just a reliability problem — it’s a security problem. No redundancy means one failure takes out your defenses. The default security group is another red flag — AWS default groups are deliberately permissive to help people get started quickly, but leaving them in production is like leaving your front door unlocked.</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><h4>Network Security: VPC as Your Security Perimeter</h4><p>We have worked with VPCs before in this program, but this week reframed them specifically as security infrastructure.</p><p>A VPC isn’t just network isolation — it’s your private section of the AWS cloud with complete network control. Key properties:</p><ul><li><strong>Private IP Range:</strong> you define your network space with CIDR notation (e.g., 10.0.0.0/16 — giving you 65,536 available IP addresses)</li><li><strong>Region Specific:</strong> VPCs are bound to a single AWS region, which matters for disaster recovery planning</li><li><strong>Multi-AZ Support:</strong> span multiple Availability Zones within a region for resilient architecture</li><li><strong>Isolation:</strong> complete separation from other AWS customers</li></ul><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><h4>Network Segmentation: Public vs Private Subnets</h4><p>Within a VPC, how you divide your subnets is one of the most important security decisions you make.</p><p>Public Subnets</p><p>A subnet is “public” when its route table has a route to an Internet Gateway. That’s it — that’s the technical definition. Important note from my instructor: <strong>attaching an IGW alone doesn’t make a subnet public. Proper route table configuration is required.</strong></p><p>Public subnets also require careful security group and NACL configuration — just because something <strong><em>can</em></strong> be reached from the internet doesn’t mean everything should be.</p><p>What typically lives in public subnets: Application Load Balancers, Bastion Hosts, NAT Gateways. Web servers can go here too, but better placed in private subnets with the ALB handling public traffic.</p><p>Private Subnets</p><p>No direct route to the Internet Gateway. Resources can’t be directly accessed from the internet. This is where the real security lives.</p><p>Key characteristics:</p><ul><li><strong>No Direct Internet Access</strong> — no direct route to IGW, ensuring isolation from the public internet</li><li><strong>Controlled Outbound Access </strong>— internet access only through NAT Gateway when required (outbound only, no inbound)</li><li><strong>Enhanced Security </strong>— resources can’t be directly reached from the internet</li><li><strong>Strict Access Controls</strong> — more restrictive security groups and NACLs</li></ul><p>The NAT Gateway itself must be placed in a public subnet and requires an Elastic IP address. It allows private resources to initiate outbound connections (like downloading software updates) while blocking all inbound connections from the internet.</p><p>What belongs in private subnets: application servers, database instances, internal services, cache layers, backend systems. Essentially — anything that doesn’t need to be directly reachable from the outside world.</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><h4>Security Best Practices: How It All Fits Together</h4><p>The best practices module brought everything into a single architecture pattern that I want to burn into my memory because this is what production setups actually look like.</p><p><strong>Multi-AZ Architecture</strong> with security groups and NACLs at each layer:</p><p><strong>AZ-1: [Public Subnet] &lt;-&gt; [Private Subnet]<br> AZ-2: [Public Subnet] &lt;-&gt; [Private Subnet]</strong></p><p>Each zone mirrors the other for failover. Security applied at every layer.</p><p>Three principles:</p><p><strong>AZ Distribution</strong> — mirror subnets across availability zones, distribute similar resources, enable failover capability. If AZ-1 goes down, AZ-2 keeps running.</p><p><strong>Security Layers</strong> — resource-level security groups, subnet-level NACLs, AWS Network Firewall. Defense in depth. No single point of failure in your security controls.</p><p><strong>Monitoring</strong> — VPC Flow Logs enabled everywhere, traffic pattern analysis, security alerts configured. You can’t protect what you can’t see.</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><h4>Data Security: Why Encryption Actually Matters</h4><p>Here’s the real-world case the lecture used: Capital One breached, 100 million customer records exposed due to basic data protection failures. Fancy security tools mean nothing without proper data protection.</p><p>Data exists in two states that require different protection approaches:</p><p><strong>Encryption at Rest</strong> — protects data while it’s stored. Storage volumes (EBS), S3 buckets, databases (RDS). Think of it like a locked safe. Even if someone physically gets the drive, they can’t read the data without the key.</p><p><strong>Encryption in Transit</strong> — protects data while it’s moving. API communications, database connections, between services. Like an armored car protecting money during transfer. In practice: API calls, RDS communications, moving data between AWS services.</p><p>Understanding Data Sensitivity Levels</p><p>Not all data needs the same protection level. The course broke it down into four categories:</p><p><strong>Public Data </strong>— marketing materials, product catalogs, public documentation, press releases. Minimal protection needed.</p><p><strong>Internal Data </strong>— employee directories, internal documentation, project plans, meeting notes. Standard access controls.</p><p><strong>Confidential Data</strong> — strategic plans, customer lists, business roadmaps, employee records. Strict access controls and encryption.</p><p><strong>Regulated Data</strong> — anything governed by compliance frameworks (PCI, HIPAA, GDPR) — health records, financial data, personal data. Maximum protection, mandatory encryption, audit trails.</p><p>Why does this matter? Because encryption costs money (compute, key management overhead) and slows things down slightly. You don’t encrypt everything the same way — you match the protection level to the sensitivity level.</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><h4>AWS KMS: The Key to Your Keys</h4><p>KMS (Key Management Service) is how AWS handles encryption keys. The concept that clicked for me: <strong>the security of your encrypted data is only as good as the security of your keys.</strong> KMS solves the key management problem.</p><p>Three types of KMS keys:</p><p><strong>AWS Managed Keys</strong> — fully managed by AWS. Automatic lifecycle, rotation, and policy handling. Used by AWS services internally. Perfect for regulated workloads (HIPAA, etc.). You use them but don’t manage them directly.</p><p><strong>AWS Owned Keys</strong> — managed by AWS services. Managed by AWS across multiple accounts. You don’t touch these at all.</p><p><strong>Customer Managed Keys</strong> — you are in full control. Full lifecycle and policy management, rotation handled by AWS, managed by your AWS account. Best for fine-grained access control per piece of data.</p><p><strong>Envelope Encryption</strong> is a pattern worth understanding: unique data keys are used per piece of data, then those data keys are encrypted with a master key in KMS. Multi-region deployment with consistent encryption across regions.</p><p><strong>ABAC Support</strong> (Attribute-Based Access Control) in KMS: unique data keys for each piece of data, tag-based access control. This lets you say things like “only resources tagged as belonging to Project X can decrypt Project X data.”</p><p><strong>Healthcare Application Example</strong> from the notes: patient records must be encrypted, HIPAA compliance required, multi-region deployment needed, strict access needed at every layer. Customer Managed Keys with ABAC gives you all of this.</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><h4>S3 Security: Locking Down Object Storage</h4><p>S3 has a reputation for being the source of a lot of breaches — not because it’s insecure, but because it’s easy to misconfigure. This section was a practical checklist.</p><p>Access Control (Multi-layer security approach)</p><ul><li><strong>IAM Policies</strong> — control who can access what</li><li><strong>Bucket Policies</strong> — resource-level rules applied directly to the bucket</li><li><strong>Resource-Based Access Control</strong> — fine-grained object-level permissions</li><li><strong>Block Public Access </strong>— enabled by default. Disable only with explicit business justification</li><li><strong>Account and Bucket Level Protections</strong> — identity-based permissions</li></ul><p>Critical Features</p><ul><li><strong>MFA Delete</strong> — requires MFA to delete objects or change versioning state</li><li><strong>Versioning</strong> — protection against accidental deletions and changes. Object Ownership settings control ownership of all new objects automatically</li><li><strong>Critical Operations Control</strong> — versioning tracks every object ownership change for critical operations</li></ul><p>Encryption Options</p><p><strong>SSE-S3 </strong>— AWS managed keys. Simplest option, AWS handles everything, default encryption option.</p><p><strong>SSE-KMS</strong> — KMS managed keys with SSE-S3. Gives you additional controls, audit trail via CloudTrail, additional cost.</p><p><strong>SSE-C </strong>— Customer provided keys. You provide and manage the keys, full key management control. Most complex but maximum control.</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><h4>S3 Security Best Practices</h4><p>The final module pulled together S3-specific practices into four pillars:</p><p><strong>Access Control </strong>— block public access by default, use bucket policies for broad controls, IAM policies for fine-grained access, disable public access only with explicit justification, identity-based permissions with multi-layer security.</p><p><strong>Logging &amp; Monitoring</strong> — Policy Management: comprehensive logging on all buckets, server access logging enabled, enable CloudTrail for API activity. Monitor CloudTrail and VPC Flow Logs, Security Hub findings.</p><p><strong>Data Protection</strong> — enable MFA Delete for critical buckets, use those three for sensitive data retention. Enable versioning &amp; lifecycle, configure lifecycle policies, automated scanning for sensitive data.</p><p><strong>Regular Auditing</strong> — access patterns review, review access logs regularly, review access for unusual activity, configuration policy audits, permission verification.</p><h4>Key Takeaways</h4><p>Coming into this week I thought security was a collection of independent tools and settings. Coming out of it, I see it as a <strong>layered system with a clear logic.</strong></p><p>Start with the CIA Triad — that’s your goal. Use the Risk Formula</p><p><strong>Risk = Threat * Vulnerability * Impact</strong></p><p>to figure out where to focus. Apply Preventive, Detective, and Corrective controls at every layer. Segment your network so a breach in one zone can’t reach everything else. Encrypt data based on its sensitivity level. Manage keys properly because they are the foundation everything else rests on. Lock down S3 because that’s where a lot of real breaches happen.</p><p>None of this is magic. It’s a framework. And now that I have the framework, all those individual services — GuardDuty, Security Hub, KMS, VPC Flow Logs, NACLs — have a clear place to sit in my head.</p><p>Still a lot to practice hands-on, but the mental model is there. That’s what this week built.</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><h4>What’s Next</h4><p>Theory is done. Now comes the part that actually matters.</p><p>The next phase of the program is building a portfolio of 9 real cloud projects — from a static website deployed on S3 and CloudFront all the way up to containerized applications, CI/CD pipelines, and infrastructure as code. Each project builds on the last. Each one goes on GitHub and gets documented publicly.</p><p>If you have been following this series, that is where things get interesting. Stay tuned.</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p><em>I’m documenting my full Cloud Engineering Academy journey publicly. If you’re on a similar path — career transition , self-teaching, or just curious about cloud infrastructure — follow along.</em></p><p><strong><em>GitHub: </em></strong><a href="https://github.com/MishaD8/Cloud_Academy"><strong><em>MishaD8</em></strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f39582dc109c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>