<?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 Adeosun Osungbesan on Medium]]></title>
        <description><![CDATA[Stories by Adeosun Osungbesan on Medium]]></description>
        <link>https://medium.com/@samadebisi12?source=rss-61746b167c43------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*boXvWQBIziMHyJUE</url>
            <title>Stories by Adeosun Osungbesan on Medium</title>
            <link>https://medium.com/@samadebisi12?source=rss-61746b167c43------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 01:30:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@samadebisi12/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[Encryption Is Not Security: The Missing Pieces of Secure System Design]]></title>
            <link>https://medium.com/@samadebisi12/encryption-is-not-security-the-missing-pieces-of-secure-system-design-22293c2ccc8b?source=rss-61746b167c43------2</link>
            <guid isPermaLink="false">https://medium.com/p/22293c2ccc8b</guid>
            <category><![CDATA[system-design-concepts]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Adeosun Osungbesan]]></dc:creator>
            <pubDate>Thu, 26 Nov 2026 00:00:55 GMT</pubDate>
            <atom:updated>2026-11-26T00:00:55.857Z</atom:updated>
            <content:encoded><![CDATA[<h4>Can we stop pretending that HTTPS alone makes an application secure?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8wLJQetsDKXnWmMXUykObA.jpeg" /><figcaption>Beyond the HTTPS padlock</figcaption></figure><h4>A letter to you,</h4><p>Let us talk about the invisible architecture behind everything we trust online. Many assume this knowledge is for developers — things they often overlook. Who should know it?</p><p>As a software and cloud engineer, I’ve heard developers associate security, in its broader sense, with HTTPS, encryption, authentication, and passwords without really examining and understanding the entire underlying system. But the more I explored cryptographic engineering, the more I realised that implementing encryption and architecting a secure system are two very different things.</p><p>That little padlock in our browser tells only a fraction of the story. Behind it lies an interconnected architecture of algorithms, cryptographic keys, protocols, certificates, trust relationships, and security controls.</p><p>In this letter, I explore that invisible architecture, drawing insights from J. J. Stapleton’s <a href="https://www.amazon.com/dp/0367657201?lv=shuf&amp;channelId=500&amp;plpRedirect=mhFallback"><em>Security without Obscurity: A Guide to Cryptographic Architectures</em></a><em>.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-b9gcf8xBEgeoQxO9XwQyA.jpeg" /><figcaption>Cryptographic architecture</figcaption></figure><h3>What exactly are we trying to protect?</h3><p>Before throwing around terms like AES-256, RSA, HTTPS, and military-grade encryption, let us establish what we actually mean when we say something is secure. Imagine this is a confidential letter I am sending to you that I want nobody else to read or modify, and you should have credible evidence that it genuinely came from me. Interestingly, these seemingly ordinary expectations introduce some of the most important principles of information security.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tCwVaf-XZP9NviSmeNv2CQ.jpeg" /><figcaption>CIA triad — Fundamental security objectives.</figcaption></figure><p>Confidentiality, Integrity, and Availability are commonly known as the CIA triad. No, not that CIA. We are still talking about computer science here. What fascinates me about these principles is that they represent different problems requiring different solutions.</p><p>Encrypting information might protect its confidentiality, but it does not automatically guarantee its integrity, authenticity, or availability. Imagine a banking application that encrypts every transaction but allows customers to withdraw money from accounts they do not own. The encryption works perfectly. The authorization architecture, however, is having a terrible day.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kclhPIKnVpQjRci83FPmKg.png" /><figcaption>Principles and mechanisms of CIA triad.</figcaption></figure><p>Unlike the CAP theorem, the CIA triad does not force us to choose two out of three. Confidentiality, integrity, and availability can coexist, although achieving them comes with trade-offs in cost, performance, complexity, and risk.</p><p>Personally, in a security-critical system, I would rather temporarily deny access than permit unauthorised access or compromise data integrity. But would I make the same decision in an emergency healthcare system? Probably not. Availability could be a matter of life and death. The objective of secure system design is not to eliminate one principle in favour of another, but to balance all three according to the system’s threat model and business requirements.</p><p>The CAP theorem <strong>(Consistency, Availability, and Partition Tolerance)</strong>, however, presents a mathematical limitation. During a network partition, a distributed system must choose between consistency (CP) and availability (AP), as both cannot be guaranteed simultaneously. A banking system might prioritise consistency to prevent conflicting transactions, while a social media platform might favour availability because temporarily outdated engagement counts are tolerable.</p><p>Ultimately, our architectural decisions should reflect business requirements, acceptable risks, and the consequences of failure.</p><blockquote><strong>Security is not just about keeping attackers out; it is also about keeping legitimate users in.</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eacpqHMtrvSbrcu-19bbwA.png" /><figcaption>CAP theorem</figcaption></figure><h3>A little mathematics won’t hurt, I promise.</h3><p>Cryptography is deeply rooted in mathematics, but we do not necessarily need a mathematics degree to understand its engineering applications.</p><p>Let us start with a few relatively simple concepts.</p><h4>Binary, hexadecimal, and the language of computers</h4><blockquote>Computers represent information using binary digits: zeros and ones.</blockquote><p>For example, the decimal number 237 can be represented in binary as:</p><p>11101101</p><p>And in hexadecimal as:</p><p>ED</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4X3mhLtR1qozmmKW5ygbqQ.png" /><figcaption>Decimal → binary → Hexadecimal</figcaption></figure><p>All three representations describe exactly the same value.</p><pre>number = 237</pre><pre>print(bin(number))  # 0b11101101<br>print(hex(number))  # 0xed</pre><p>Hexadecimal is particularly useful in cryptographic engineering because it provides a compact representation of binary information. Whenever we inspect cryptographic hashes, encryption keys, certificates, network packets, or even in colour styling, we are likely to encounter it.</p><p>Changing the representation of information, however, does not change its security properties.</p><p><em>Keep that in mind. We will return to it shortly.</em></p><h4>Modular arithmetic</h4><p>Modular arithmetic is simply arithmetic involving remainders.</p><p>For instance:</p><p>17 mod 5 = 2</p><p>Think of an analogue clock. If it is currently 10 o’clock and we move forward by five hours, we arrive at 3 o’clock.</p><p>(10 + 5) mod 12 = 3</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HSr00PDL2Uw4aYq0F1ReBA.png" /><figcaption>Modular Arithmetric of Clock Example.</figcaption></figure><pre>print(17 % 5)       # 2<br>print(pow(3, 4, 7)) # 4</pre><p>This seemingly simple mathematical operation forms part of the foundation of public-key cryptographic schemes such as RSA and Diffie–Hellman.</p><p>When combined with large numbers and carefully selected mathematical structures, these operations enable us to perform computations that are relatively efficient in one direction but computationally difficult to reverse without appropriate information.</p><h3>XOR — a surprisingly powerful operation</h3><p>Exclusive OR, commonly written as XOR or ⊕, compares two binary values.</p><p>If the values are different, the result is 1. If they are identical, the result is 0.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QSy-wOlrIViNJYMr84pBXw.png" /><figcaption>A XOR B Truth Table</figcaption></figure><p>For example:</p><p>1010 XOR 0110 = 1100</p><p>Interestingly, applying the same operation again with the same second operand restores the original value.</p><p>1100 XOR 0110 = 1010</p><p>This reversible property makes XOR an important building block in cryptographic algorithms.</p><p>However, XOR alone is not a complete modern encryption scheme. Reusing a simple XOR keystream can expose relationships between protected messages.</p><p>We should understand the mathematics without immediately appointing ourselves inventors of the next encryption standard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ySsr8kzXoK8uYXGP9vpukw.png" /><figcaption>XOR Cryptographic Equations Table</figcaption></figure><pre>plaintext = 0b1010<br>key = 0b0110</pre><pre>ciphertext = plaintext ^ key<br>recovered = ciphertext ^ key</pre><pre>print(f&quot;{ciphertext:04b}&quot;)  # 1100<br>print(f&quot;{recovered:04b}&quot;)   # 1010</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pjGtvIL3uMysvKoDaVBLkQ.jpeg" /><figcaption>The language of cryptography.</figcaption></figure><h3>Encryption: Keeping our secrets secret</h3><p>Encryption is the process of transforming readable information, commonly called plaintext or cleartext, into an unreadable representation called ciphertext using a cryptographic algorithm and an appropriate key.</p><p>The objective is confidentiality.</p><p>Consider a message containing the following information:</p><p>Transfer €500 to account A.</p><p>After encryption, an unauthorised observer should not be able to determine the original message from the ciphertext.</p><p>But how does the intended recipient recover it?</p><p>This brings us to two major categories of cryptography: symmetric and asymmetric.</p><h3>Symmetric encryption — one secret between us</h3><p>In symmetric encryption, the same secret key is used to encrypt and decrypt information.</p><p>Mathematically, we can express this as:</p><pre>C = E(K, P)</pre><pre>P = D(K, C)</pre><p>Where:</p><ul><li>P represents plaintext.</li><li>C represents ciphertext.</li><li>K represents the secret key.</li><li>E represents encryption.</li><li>D represents decryption.</li></ul><p>Think of it as two people having identical keys to the same locked box. One person locks the box, and the other uses their copy of the key to open it. The Advanced Encryption Standard (AES) is a widely used example of symmetric encryption. It supports 128-bit, 192-bit, and 256-bit keys.</p><p>For example, the iPhone is an excellent real-world example of symmetric encryption in action. Apple uses hardware-accelerated AES to protect stored data, while combining asymmetric cryptography, authentication, hardware-backed key management, and access controls to build a comprehensive security architecture. This reinforces the argument that encryption alone is not security.</p><p>We encounter symmetric encryption in database storage, encrypted backups, disk encryption, cloud object storage, and secure network communication.</p><p>The challenge, however, is not simply encrypting the information. How do both parties obtain the secret key securely? Where is it stored? Who has access to it? What happens if somebody steals it?</p><blockquote>Suddenly, our simple locked box has become a key-management problem.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cH9hN_3SWpmGLZ79oZjMdg.jpeg" /><figcaption>Symmetric encryption</figcaption></figure><h4>A practical engineering example</h4><p>Consider a Python application that needs to encrypt sensitive information using AES-GCM. Rather than implementing the mathematical algorithm ourselves, we can use an established cryptographic library.</p><pre>pip install cryptography</pre><pre>import os<br>from cryptography.hazmat.primitives.ciphers.aead import AESGCM</pre><pre>key = AESGCM.generate_key(bit_length=256)<br>aes = AESGCM(key)</pre><pre>nonce = os.urandom(12)<br>plaintext = b&quot;Confidential customer data&quot;</pre><pre>ciphertext = aes.encrypt(nonce, plaintext, None)<br>decrypted = aes.decrypt(nonce, ciphertext, None)</pre><pre>print(&quot;Encrypted:&quot;, ciphertext.hex())<br>print(&quot;Decrypted:&quot;, decrypted.decode())</pre><pre>Encrypted: &lt;variable hexadecimal ciphertext&gt;<br>Decrypted: Confidential customer dataWhat happens when ciphertext is modified?</pre><p><strong>What happens when ciphertext is modified?</strong></p><pre>from cryptography.exceptions import InvalidTag</pre><pre>tampered = bytearray(ciphertext)<br>tampered[0] ^= 1</pre><pre>try:<br>    aes.decrypt(nonce, bytes(tampered), None)<br>except InvalidTag:<br>    print(&quot;Authentication failed!&quot;)</pre><pre>Authentication failed!</pre><p>Here, AES-GCM provides authenticated encryption: confidentiality alongside integrity and authentication of the protected data.</p><p>Notice that we also generate a nonce. A nonce must never be reused with the same AES-GCM key.</p><p>This example is deliberately educational. In a production environment, we would need secure key storage, controlled access, a nonce-management strategy, key rotation, and appropriate error handling.</p><p>We would certainly not commit our encryption keys to GitHub and hope nobody notices.</p><h3>Asymmetric cryptography — two keys, different responsibilities</h3><p>What if we want to communicate securely without first sharing an identical secret key?</p><p>Asymmetric cryptography introduces a mathematically related pair of keys: <em>A public key and a private key.</em></p><p>The public key can be distributed, while the private key must remain protected.</p><p>In a public-key encryption scheme, a sender can encrypt information using the recipient’s public key. The recipient then uses the corresponding private key to decrypt it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yUoRgYRHtPu9HZudpc59ng.png" /><figcaption>Encryption and Decryption Formula Table</figcaption></figure><p>For digital signatures, the private key is used for signing, while the public key is used for verification. These are distinct cryptographic operations.</p><p>RSA is a familiar example of an asymmetric algorithm family. Other public-key schemes support digital signatures and key agreement, rather than necessarily supporting encryption directly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cmiitdxjHy_MjQqO0fMKpg.png" /><figcaption>The Mathematics Behind RSA</figcaption></figure><p><strong>RSA mathematical demonstration</strong></p><pre>p, q = 61, 53</pre><pre>n = p * q<br>phi = (p - 1) * (q - 1)</pre><pre>e = 17<br>d = pow(e, -1, phi)</pre><pre>message = 65</pre><pre>ciphertext = pow(message, e, n)<br>decrypted = pow(ciphertext, d, n)</pre><pre>print(ciphertext)  # 2790<br>print(decrypted)   # 65</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YOZJFZtms2CLthC0mTHObg.png" /><figcaption>RSA Encryption and Decryption Infographic</figcaption></figure><p>Asymmetric cryptography is particularly useful for establishing trust between entities that have never previously communicated.</p><p>However, it introduces another interesting question.</p><p>How do I know that the public key you gave me actually belongs to you?</p><p>We will explore that question properly when we discuss digital certificates and Public Key Infrastructure in the next letter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GkavH44iPMtKRjtIyzalzA.jpeg" /><figcaption>Asymmetric encryption</figcaption></figure><h4>Why not just use asymmetric cryptography for everything?</h4><p>Asymmetric operations are generally more computationally expensive than symmetric operations.</p><p>Consequently, real-world systems often combine both approaches. Public-key cryptography helps authenticate participants or establish shared keying material, while efficient symmetric encryption protects the actual information.</p><p><em>This combination is commonly referred to as hybrid cryptography.</em></p><p>Modern secure communication commonly combines authenticated public-key operations for key establishment with efficient symmetric encryption for application traffic.</p><p><strong>Use cases:</strong> HTTPS, secure messaging, VPNs, and encrypted file exchange.</p><p><strong>Outcome:</strong> Efficient communication without manually distributing a shared secret beforehand.</p><blockquote>That little padlock in the browser is beginning to look considerably more complicated, isn’t it?</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d5_xykqqbm5o8JvQ8KrIsQ.jpeg" /><figcaption>Hybrid Cryptography</figcaption></figure><p><strong>As software engineers, our concern should not simply be whether we use symmetric or asymmetric encryption, but how securely we generate, store, manage, and protect our cryptographic keys.</strong></p><p><em>Strong encryption with weak key management is weak security.</em></p><h3>Hashing: The digital fingerprint of information</h3><p>Have you ever downloaded a software package and encountered a long string of seemingly random hexadecimal characters alongside it?</p><p>That string might be a cryptographic hash.</p><p>A hash function takes an input of arbitrary length and produces a fixed-length output known as a hash value, digest, or fingerprint.</p><p>h = H(m)</p><p>Unlike encryption, cryptographic hashing is not designed to be reversed.</p><p>Let us consider two messages:</p><p>Hello</p><p>hello</p><p>The only difference is the capital letter H.</p><p>However, their SHA-256 hashes are substantially different.</p><p>We can demonstrate this in Python:</p><pre>import hashlib</pre><pre>for message in [&quot;Hello&quot;, &quot;hello&quot;]:<br>    digest = hashlib.sha256(message.encode())<br>    print(message, digest.hexdigest())</pre><pre>Hello 185f8db32271fe25f561a6fc938b2e264<br>      306ec304eda518007d1764826381969</pre><pre>hello 2cf24dba5fb0a30e26e83b2ac5b9e29<br>      e1b161e5c1fa7425e73043362938b9824</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e0Q1ucJFTvQkmLiMIVBcjA.jpeg" /><figcaption>Hashing — a digital fingerprint.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i0S44BbbpN2LFvibOqvtuQ.png" /><figcaption>Three important mathematical properties of secure cryptographic hash functions</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*slzclRkiKUa7kxFrQwxgYQ.png" /><figcaption>Hashing algorithms</figcaption></figure><p>Some older algorithms are no longer suitable for collision-resistant security applications. SHA-256, belonging to the SHA-2 family, remains a familiar choice for general cryptographic hashing.</p><h4>Where do we use hashing in engineering?</h4><p>We use it when verifying downloaded files, generating digital signatures, checking software artifacts, and constructing message authentication mechanisms.</p><p>However, there is a small complication.</p><p>Imagine I download a file and its corresponding hash from the same compromised server. An attacker could replace both the file and the published hash.</p><p>My verification would succeed, but I would still be holding the wrong file.</p><pre># Linux<br>sha256sum backup.tar.gz</pre><pre># macOS<br>shasum -a 256 backup.tar.gz</pre><p>Hashing detects differences relative to a trusted expected value. It does not independently establish who supplied that value.</p><p>And that brings us naturally to authentication and integrity.</p><h3>Please, Base64 is not encryption.</h3><p><strong>I think this deserves a section of its own.</strong></p><p><em>Base64 is a binary-to-text encoding mechanism. It allows binary information to be represented using printable characters that can be transmitted through text-oriented systems.</em></p><p>Let us encode something using Python:</p><pre>import base64</pre><pre>message = b&quot;My secret password&quot;</pre><pre>encoded = base64.b64encode(message)<br>decoded = base64.b64decode(encoded)</pre><pre>print(encoded.decode())<br>print(decoded.decode())</pre><p><strong>Output:</strong></p><pre>TXkgc2VjcmV0IHBhc3N3b3Jk<br>My secret password</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mpG6Ti-Xaxxwgngawfgc9Q.jpeg" /><figcaption>base64-encoding</figcaption></figure><p>Notice that we recovered the original information without providing a cryptographic key.</p><p><strong>That is because Base64 is encoding, not encryption.</strong></p><p>The distinction is important when working with APIs, authentication tokens, certificates, configuration files, and Kubernetes Secrets. An encoded value may look mysterious, but appearances are not security controls.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8Ajwgj-ayQp2KaLgQwQ0gQ.png" /><figcaption>Encoding, Encryption, and Hashing Compared</figcaption></figure><p><strong><em>Base64 is a change of clothes, not a security guard.</em></strong></p><h3>Password hashing: What if the database gets compromised?</h3><p>Let us assume I am building an authentication system.</p><p>Should I encrypt passwords so that I can decrypt them later? Generally, no. Password verification does not require recovering the original password.</p><p>We need a dedicated password-hashing mechanism.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bttT4cMEvT-RXpAoiD5uiA.png" /><figcaption>Password Hashing and Login Verification</figcaption></figure><h4>Practical implementation: Argon2id</h4><pre>pip install argon2-cffi</pre><pre>from argon2 import PasswordHasher</pre><pre>ph = PasswordHasher()</pre><pre>password = &quot;example-password&quot;<br>stored_hash = ph.hash(password)</pre><pre>print(stored_hash)<br>print(ph.verify(stored_hash, password))</pre><pre>$argon2id$v=19$...<br>True</pre><p>Argon2id deliberately consumes computational resources and memory, making large-scale password guessing more expensive.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-GoenpkkhInw7R0PzakXZw.png" /><figcaption>Vulnerability and Mitigation Infographic</figcaption></figure><p><strong>Outcome:</strong> The system verifies passwords without storing them in plaintext or requiring reversible encryption.</p><h3>Integrity and authentication: Did somebody touch my message?</h3><p>Imagine that I send you the following transaction instruction:</p><p>Transfer €500 to Alice.</p><p>Somewhere between my application and yours, the message is modified:</p><p>Transfer €5,000 to Alice.</p><p>How would you know?</p><p>Confidentiality alone does not necessarily solve this problem. We also need a mechanism that allows the recipient to detect unauthorised modifications and authenticate the message’s origin.</p><p>Stapleton introduces the concept of an Integrity Check Value (ICV), alongside Message Authentication Codes (MACs) and Hash-based Message Authentication Codes (HMACs).</p><h3>Message Authentication Code (MAC)</h3><p>A MAC combines a message with a secret cryptographic key to produce an authentication value.</p><p>T = MAC(K, M)</p><p>The sender transmits the message and its authentication value.</p><p>The recipient independently calculates the expected authentication value using the same message and shared secret key.</p><p>If verification succeeds, the recipient has cryptographic evidence that the message was produced by someone possessing the shared secret and has not been improperly altered.</p><p>Unlike encryption, a MAC does not conceal the original message.</p><h3>HMAC — hashing with a secret</h3><p>HMAC is a specific construction that combines a cryptographic hash function with a secret key.</p><p>Unlike a plain hash, an attacker who does not know the secret key cannot ordinarily generate a valid HMAC for a modified message.</p><p><em>This is particularly useful when verifying webhooks.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_86NEJ7XSU7yf1qhdj4Hzw.jpeg" /><figcaption>Message authentication with HMAC</figcaption></figure><p>Imagine I operate an online payment application. When a payment is completed, the payment provider sends a webhook to my backend.</p><p>Before updating a customer’s account, I need to verify that the notification genuinely came from the payment provider.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uwboF1iftiiRp8Suf2-Unw.png" /><figcaption>HMAC Formula and Computation Flow</figcaption></figure><p><strong>Practical use case: Payment webhook verification</strong></p><pre>import hashlib<br>import hmac<br>import secrets</pre><pre>key = secrets.token_bytes(32)</pre><pre>message = b&#39;{&quot;amount&quot;:500,&quot;status&quot;:&quot;paid&quot;}&#39;</pre><pre>signature = hmac.new(<br>    key, message, hashlib.sha256<br>).hexdigest()</pre><pre>def verify(payload, signature):<br>    expected = hmac.new(<br>        key, payload, hashlib.sha256<br>    ).hexdigest()</pre><pre>    return hmac.compare_digest(<br>        expected, signature<br>    )</pre><pre>print(verify(message, signature))</pre><pre>tampered = b&#39;{&quot;amount&quot;:5000,&quot;status&quot;:&quot;paid&quot;}&#39;</pre><pre>print(verify(tampered, signature))</pre><p><strong>Expected output:</strong></p><pre>True<br>False</pre><p>A production implementation must follow the payment provider’s exact signing specification, verify the original request body, validate timestamps where applicable, and protect against replayed or duplicate events.</p><p>Otherwise, I might have successfully verified a genuine payment notification and accidentally processed it ten times.</p><p><em>Cryptography did its job. My business logic did not.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q8AvZm_HN-2eb_Q8v48G4g.png" /><figcaption>Secure Messaging Vulnerability Mitigation Table</figcaption></figure><h3>Digital signatures: Establishing trust without sharing a secret</h3><p>A digital signature is another mechanism for verifying the integrity and authenticity of information.</p><p>However, unlike a MAC, a digital signature uses asymmetric cryptography.</p><p>The signer uses a private key to generate a signature. The verifier uses the corresponding public key to determine whether the signature is valid.</p><p>We can represent these operations conceptually as:</p><p>S = Sign(SK, M)</p><p>Valid = Verify(PK, M, S)</p><p>Where SK is the private signing key, PK is the public verification key, M is the message, and S is the signature.</p><p>Digital signatures are used in software distribution, certificates, financial transactions, signed documents, package verification, and software supply-chain security.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K_u-W-jLi1yvYT7zqIJU9A.jpeg" /><figcaption>Digital signatures</figcaption></figure><h4><strong>Practical implementation: Ed25519</strong></h4><pre>from cryptography.hazmat.primitives.asymmetric.ed25519 import (<br>    Ed25519PrivateKey<br>)</pre><pre>private_key = Ed25519PrivateKey.generate()<br>public_key = private_key.public_key()</pre><pre>message = b&quot;Approved deployment&quot;</pre><pre>signature = private_key.sign(message)</pre><pre>public_key.verify(signature, message)</pre><pre>print(&quot;Signature verified&quot;)</pre><p><strong>Test message tampering</strong></p><pre>from cryptography.exceptions import InvalidSignature</pre><pre>try:<br>    public_key.verify(<br>        signature,<br>        b&quot;Unauthorized deployment&quot;<br>    )<br>except InvalidSignature:<br>    print(&quot;Invalid signature&quot;)</pre><p><strong>Expected output:</strong></p><pre>Signature verified<br>Invalid signature</pre><h3>From theory to DevOps</h3><p>Suppose I build a container image through a CI/CD pipeline and publish it to a container registry.</p><p>How does the deployment environment know that the image was produced by my trusted build pipeline and not substituted by another party?</p><p>One practical approach is to sign the image and require signature verification before deployment.</p><p>A simplified architecture would look like this:</p><p>Source code → CI/CD pipeline → Container image → Signing → Registry → Signature verification → Deployment.</p><p>Tools such as Sigstore Cosign can help implement this process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jaZfnhigIRpatsrbbR_s6w.jpeg" /><figcaption>Signing a container image</figcaption></figure><p>However, a valid signature does not mean the signed software is free from vulnerabilities. It means that the signature verifies under the trusted signing identity or key.</p><p>We still need code review, dependency scanning, vulnerability management, and secure build practices.</p><p>Security appears to have a recurring theme: no single mechanism gets to do everybody else’s job.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zM86GHHThkvOQcFUg8Np6Q.png" /><figcaption>Hand-Drawn CI_CD Image Signing Flowchart</figcaption></figure><h3>Non-repudiation: When a digital signature isn’t enough</h3><p>Suppose a document has been digitally signed using my private key.</p><p>Can we immediately conclude that I personally reviewed the document, understood it, agreed to its contents, and intentionally signed it?</p><p>Not necessarily.</p><p>What if the private key was compromised? What if somebody else had access to the signing device? What if the certificate was incorrectly issued? What if the signing event cannot be reliably associated with the document or its timestamp?</p><p>This is one of the more interesting distinctions in Stapleton’s discussion.</p><p>Digital signatures provide cryptographic evidence, but non-repudiation requires a broader combination of cryptographic, technical, operational, and legal controls.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L6WF8iJa9rmmJaieqmkCbA.png" /><figcaption>Non-Repudiation Framework Diagram</figcaption></figure><p>A digital signature is an important part of this architecture, but it is not the entire architecture.</p><p><em>After all, mathematics can verify a signature. It cannot independently explain every human decision surrounding it.</em></p><h3>Tokenization: What if we simply stopped storing the sensitive information?</h3><p>Here is another interesting way of approaching information security.</p><p>Instead of repeatedly asking how we should encrypt sensitive information, why not ask whether we need to store or expose that information in the first place?</p><p>This introduces tokenization.</p><p>Tokenization replaces an underlying sensitive value (USV) with a surrogate value called a token.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e0azPzKZb2fJYToLrSC4zg.png" /><figcaption>Secure Payment Tokenization Flow</figcaption></figure><p>Imagine an e-commerce platform handling a customer’s payment card information.</p><p>Instead of retaining the actual card number throughout its systems, the application could retain a payment token provided by an appropriate tokenization service.</p><p>The token may then be used for supported business operations without routinely exposing the original card information.</p><p>Stapleton discusses four tokenization methods.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ybprn0QiqCP-g81KzHWvDQ.jpeg" /><figcaption>Four tokenization methods</figcaption></figure><p>Each method has different security assumptions and operational requirements.</p><p>For instance, an encryption-based tokenization service depends on the protection of its token key. A random tokenization service depends on the security of its randomness and mapping vault.</p><p>Tokenization does not eliminate security risk. It changes where that risk resides and can reduce the number of systems exposed to sensitive information.</p><h3>A practical example</h3><p>Imagine an application architecture with the following components:</p><p>Customer → Payment provider → Tokenization service → Application database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wIjslvySAu7UgZjv1E7bYw.jpeg" /><figcaption>Payment tokenization</figcaption></figure><p>The application receives and stores a payment token rather than directly retaining the actual payment card number.</p><p>The payment provider manages the sensitive payment data within its protected environment.</p><p>This reduces unnecessary exposure, although the application still needs to protect the tokens, enforce access controls, and meet applicable payment-security obligations.</p><p>And perhaps this is one of the simplest security principles we can adopt:</p><p>The less sensitive information we unnecessarily collect, retain, and distribute, the less we have to protect.</p><h4><strong>Practical implementation: Random tokenization</strong></h4><pre>import secrets</pre><pre># Educational in-memory vault<br>vault = {}</pre><pre>def tokenize(value):<br>    token = secrets.token_urlsafe(32)<br>    vault[token] = value</pre><pre>    return token</pre><pre>def detokenize(token):<br>    return vault.get(token)</pre><pre>token = tokenize(&quot;sensitive-customer-id&quot;)</pre><pre>print(token)<br>print(detokenize(token))</pre><pre>&lt;random URL-safe token&gt;<br>sensitive-customer-id</pre><h3>So, what does HTTPS actually protect?</h3><p>Let us return to the question that started this letter.</p><p>HTTPS protects communication between a client and a server through Transport Layer Security (TLS). It provides confidentiality, integrity, and ordinarily server authentication for that connection.</p><p>But what happens when the information reaches the server?</p><p><strong>Is the database encrypted? Are passwords stored appropriately? Are users authorised to access the requested resources? Are encryption keys securely managed? Are administrative endpoints protected? Are backups secured? Are dependencies regularly assessed for vulnerabilities?</strong></p><p>HTTPS does not independently answer any of these questions.</p><p><em>Consider the following insecure backend endpoint:</em></p><pre>@app.get(&quot;/users/{user_id}&quot;)<br>def get_user(user_id: int):<br>    return database.get_user(user_id)</pre><p>Imagine I develop an e-commerce application with a perfectly configured TLS connection but accidentally expose an administrative API endpoint without authorisation.</p><p>An unauthorised user could retrieve sensitive customer information through an encrypted connection.</p><p><em>A better implementation enforces resource-level authorization:</em></p><pre>@app.get(&quot;/users/{user_id}&quot;)<br>def get_user(<br>    user_id: int,<br>    current_user=Depends(authenticate_user)<br>):<br>    if current_user.id != user_id:<br>        raise HTTPException(<br>            status_code=403,<br>            detail=&quot;Access denied&quot;<br>        )</pre><pre>    return database.get_user(user_id)</pre><p>This simplified FastAPI example assumes the authentication dependency and database layer have already been securely implemented.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DjkWnpRAsN6LqSt6x5S2XQ.png" /><figcaption>HTTPS Protection Comparison Chart</figcaption></figure><p>That is precisely why we must distinguish between secure communication and secure system design.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NAke0WmdWomlte3vykz6Ag.png" /><figcaption>HTTPS Security Controls Infographic</figcaption></figure><h3>The invisible architecture behind a secure application</h3><p>One of the things I particularly appreciate about Stapleton’s book is his criticism of overly simplistic architectural diagrams, which he describes as network cartoons.</p><p>We have probably encountered them before.</p><p>A user connects to a web server, the web server communicates with an application server, and the application server retrieves information from a database.</p><p>A few rectangles, some arrows, perhaps a cloud icon somewhere, and we proudly call it a system architecture.</p><p>However, where are the security controls?</p><p><em>Which connections are encrypted? Where does TLS terminate? Which components possess cryptographic keys? Where are those keys stored? How are users and services authenticated? Which components are authorised to access sensitive information?</em></p><p>A genuinely useful security architecture should help us answer these questions.</p><p>Stapleton approaches cryptographic architecture through six fundamental questions:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lYIoInsoO3pJqFCGzeD4vw.png" /><figcaption>Secure System Security Controls Diagram</figcaption></figure><p><strong>This is where cryptographic engineering begins to intersect with software architecture, cloud infrastructure, DevOps, information security, and operational risk management.</strong></p><p><em>Before I end this letter… Remember:</em></p><ul><li>Encryption protects confidentiality, but confidentiality is not the entirety of security.</li><li>Hashing produces a digest, but a digest alone does not establish trust.</li><li>Base64 changes the representation of information, but it does not conceal it.</li><li>Message authentication codes verify integrity and authenticity using shared secrets, while digital signatures enable verification using public keys.</li><li>Digital signatures provide cryptographic evidence, but non-repudiation requires additional operational and legal considerations.</li><li>Tokenization reduces unnecessary exposure to sensitive information, but the underlying tokenization environment still requires protection.</li><li>And HTTPS? It secures communication, not every component of your application.</li></ul><p>The more I explore these concepts, the more I appreciate that cryptography is not simply about mathematical algorithms. It is about making deliberate engineering decisions concerning information, identities, trust, and risk.</p><p><em>In my next letter, we will explore the secret life of cryptographic keys: how they are generated, distributed, protected, and used, and why the security of an entire system can depend on something as seemingly insignificant as a sequence of random bits.</em></p><p>Until then, also remember this:</p><p><strong>Encryption is a mechanism. Security is an architecture.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=22293c2ccc8b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[No Public IP, No Access Keys, No Problem: Automated Backups on AWS]]></title>
            <link>https://medium.com/@samadebisi12/no-public-ip-no-access-keys-no-problem-automated-backups-on-aws-30a83f006729?source=rss-61746b167c43------2</link>
            <guid isPermaLink="false">https://medium.com/p/30a83f006729</guid>
            <category><![CDATA[cloud-engineering]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[amazon-web-services]]></category>
            <dc:creator><![CDATA[Adeosun Osungbesan]]></dc:creator>
            <pubDate>Sat, 21 Nov 2026 01:35:16 GMT</pubDate>
            <atom:updated>2026-11-21T02:51:56.756Z</atom:updated>
            <content:encoded><![CDATA[<h4>This is my journey building a hands-on cloud engineering project exploring private networking, least-privilege IAM, Linux automation, S3 VPC endpoints, and serverless audit trails with AWS Lambda and DynamoDB.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lnZhECiGNM1KzcZ2PdkoHQ.jpeg" /><figcaption>Project architecture of a secure and automated backup infrastructure on AWS</figcaption></figure><h3>Here’s how the whole pipeline comes together:</h3><ul><li>I started on your MacBook and hopped through a bastion host to reach the private app server. (No public exposure, just a clean, controlled path in.)</li><li>Every 30 seconds, the app server generates fresh data.</li><li>Every 10 minutes, cron wakes up a backup script to bundle and ship it off to S3.</li><li>Traffic stays inside the network via an S3 Gateway VPC Endpoint.</li><li>Private routing, zero public internet detour.</li><li>The moment an archive lands in S3, it triggers a Lambda function.</li><li>Lambda logs the backup metadata to DynamoDB, while CloudWatch captures the function’s execution logs.</li><li>And for my peace of mind: the app server can upload backups, not delete them. Write-only durability — so a misbehaving script or compromised node can’t wipe my history.</li></ul><h3>PHASE 1: Configure AWS Budget</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kXPbK4x4kQonoi0rwgpg4A.png" /><figcaption>AWS budget alert thresholds</figcaption></figure><p>First up, I set a $1 monthly AWS budget alert with a 70% actual-cost threshold. Cheap insurance, though; I’d rather get a heads-up at $0.70 than wake up to a surprise bill.</p><ol><li>Log in to the <a href="https://console.aws.amazon.com/?utm_source=chatgpt.com">AWS Management Console</a>.</li><li>Search for Billing and Cost Management.</li><li>Select Budgets.</li><li>Click Create budget.</li><li>Select a monthly cost budget.</li></ol><h3>PHASE 2: Create the VPC</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K_zvoI7-G-kvoIl05X9Zwg.png" /><figcaption>karatu-vpc successfully created page</figcaption></figure><h4>Step 1: Create a custom VPC</h4><p>Navigate to AWS Console → VPC → Your VPCs → Create VPC.</p><p>Configure:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*S6dwxhos1mc10hKwmV_xkg.png" /></figure><p>Click Create VPC.</p><p>Select the VPC and ensure DNS resolution and DNS hostnames are enabled under Actions → Edit VPC settings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FQSVuhpng1Wm0WkwSbqh7g.jpeg" /><figcaption>VPC architecture</figcaption></figure><h4>Step 2: Create the public subnet</h4><p>Navigate to VPC → Subnets → Create subnet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*Uj_ZA73dkTqHRBNoUi19HQ.png" /></figure><p>Click Create subnet.</p><p>Select the public subnet:</p><p>Actions → Edit subnet settings → Enable auto-assign public IPv4 address.</p><p>Save the settings.</p><h4>Step 3: Create the private subnet</h4><p>Repeat the previous procedure with these settings:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*4IXWUeTd1XxmCXG0SS_OGg.png" /></figure><h3>PHASE 3: Internet Gateway and route tables</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0MQ8A1AfZwcC1G2D__A9gw.png" /><figcaption>Public route table pointing to the internet gateway.</figcaption></figure><p>Next, I wired up a public route table pointing to the internet gateway. My doorway to the outside world, which is clean, intentional, and ready to route traffic where it belongs.</p><h4>Step 1: Create the Internet Gateway</h4><p>Navigate to VPC → Internet gateways → Create internet gateway.</p><p>Enter:</p><pre>karatu-igw</pre><p>Click Create internet gateway.</p><p>Select Actions → Attach to a VPC and select karatu-vpc.</p><h4>Step 2: Create public route table</h4><p>Navigate to VPC → Route tables → Create route table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*cxDuC0t4gD6uXGPhhhxDwA.png" /></figure><p>Select the newly created route table.</p><p>Go to Routes → Edit routes → Add route.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*_93ifZN3fj4WGCYycUq6OQ.png" /></figure><p>Save the changes.</p><p>Go to Subnet associations → Edit subnet associations.</p><p>Select karatu-public-subnet and save.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lO6FWCr4Piy7cODGeUkajw.png" /></figure><h4>Step 3: Create private route table</h4><p>Create another route table:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*8IJSRQ3t5w8nWMddlexRLg.png" /></figure><p>Under Subnet associations, associate karatu-private-subnet.</p><p>Do not add an Internet Gateway route to this private route table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dF-81XBE-kpYasG2EJS0Hg.png" /><figcaption>karatu-vpc resource map</figcaption></figure><p>Here’s how my VPC resource map looks; however, we will discuss the karatu-nat-gateway plot twist for later. Now, let’s break down the components:</p><p>I mapped out two subnets: karatu-public-subnet links tokaratu-public-rt, which points to karatu-igw for direct internet access. Outbound, wide open.</p><p>Meanwhile, karatu-private-subnet pairs with karatu-private-rt—no direct internet route allowed. When I need outbound access for quick installations, it hops through karatu-nat-gatewayand I reach the private side via my bastion host. Temporary bridge, permanent boundaries.</p><h3>PHASE 4: Create security groups</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MOlf0M9YwXXF50SvUbtjqg.png" /><figcaption>karatu-bastion-sg</figcaption></figure><h4>Step 1: Bastion security group</h4><p>Navigate to EC2 → Security Groups → Create security group.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*VXzz8uwg0ry989JTefOQ7g.png" /></figure><p>Outbound rules: retain the default outbound rule allowing all traffic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ThxzF7WQAirfkE2HY559dg.png" /><figcaption>karatu-app-sg</figcaption></figure><h4>Step 2: Application server security group</h4><p>Create another security group:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*AL0phgotHf9C5iTrRoWRQA.png" /></figure><p>Select the security group ID of the bastion as the source, not its IP address.</p><p>Retain the default outbound rules.</p><h3>PHASE 5: Launch the EC2 instances</h3><h4>Step 1: Create an SSH key pair</h4><p>Navigate to EC2 → Key Pairs → Create key pair.</p><p>Configure:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*pzf6P4CKPMwsUj6AFutY6w.png" /></figure><p>Download the key to your MacBook.</p><h4>Step 2: Launch the bastion host</h4><p>Navigate to EC2 → Instances → Launch instances.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*jAjSaNfkw6mYGWrp6bFs5A.png" /></figure><p>Click Launch instance.</p><h4>Step 3: Launch the private application server</h4><p>Repeat the process with these settings:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*JjTn0mY3HM9PHJMOI5-RxA.png" /></figure><p>Wait until both instances are running and their status checks have passed.</p><p>Record the following values:</p><ul><li>Bastion public IPv4 address.</li><li>Bastion private IPv4 address.</li><li>App server private IPv4 address.</li></ul><p>The app server must have no public IPv4 address.</p><h3>PHASE 6: Create a temporary NAT Gateway</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4lud1eqOHe7884LMrTHdZA.png" /><figcaption>karatu-nat-gateway created</figcaption></figure><p>Now, let us talk about the NAT gateway I mentioned earlier. With a NAT gateway, I let my private server pull updates and packages outbound through temporary internet access without ever giving it a public IP or exposing it to inbound internet traffic. Best of all, it’s a managed AWS workhorse that scales seamlessly so I don’t have to manage a NAT instance just to install the AWS CLI and other Linux packages, and get on with my build.</p><h4>Step 1: Allocate an Elastic IP</h4><p>Navigate to:</p><p>VPC → Elastic IPs → Allocate Elastic IP address.</p><p>Click Allocate.</p><h4>Step 2: Create NAT Gateway</h4><p>Navigate to VPC → NAT gateways → Create NAT gateway.</p><p>Configure:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*3yNcmsYvM2ppaN9YUGFldg.png" /></figure><p>Click Create NAT gateway and wait until its status is Available.</p><h4>Step 3: Update the private route table</h4><p>Open:</p><p>VPC → Route tables → karatu-private-rt → Routes → Edit routes.</p><p>Add:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*_YenF_h85Pug8OKU-BTGKg.png" /></figure><p>Your private server can now initiate outbound internet connections through the NAT Gateway, without having a public IP.</p><h3>PHASE 7: SSH into the private application server</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EBbfiQHSOGLjuA8MFtG5pw.jpeg" /><figcaption>SSH workflow into the private application server</figcaption></figure><p>Starting inside my Vagrant VM on my MacBook, I hopped into the bastion host with ssh -A—forwarding my credentials without exposing keys on the jump box. From there, one more ssh landed me straight inside the private app server. Clean chain of trust, no key exposure.</p><h4>Step 1: Prepare your private key</h4><pre>mkdir -p ~/.ssh<br>mv ~/Downloads/db-client-kp.pem ~/.ssh/<br>chmod 400 ~/.ssh/db-client-kp.pem</pre><h4>Step 2: Start the SSH agent</h4><pre>eval &quot;$(ssh-agent -s)&quot;</pre><p>Add the private key:</p><pre>ssh-add ~/.ssh/db-client-kp.pem</pre><p>Verify:</p><pre>ssh-add -l</pre><h4>Step 3: Connect to the bastion</h4><pre>ssh -A ubuntu@BASTION_PUBLIC_IP</pre><p>The -A option enables SSH agent forwarding.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QhViE7ESGk1AA7p_UGxN2g.png" /><figcaption>Connecting from my local terminal to the bastion server</figcaption></figure><h4>Step 4: Connect from the bastion to the private server</h4><p>Execute inside the bastion:</p><pre>ssh ubuntu@APP_SERVER_PRIVATE_IP</pre><p>For example:</p><pre>ssh ubuntu@10.0.2.50</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q2TpEpx6hvBmi38bDWPImw.png" /><figcaption>Connecting from bastion server to the app server</figcaption></figure><p>Verify that you are on the private application server:</p><pre>hostname</pre><pre>hostname -I</pre><pre>ip addr</pre><p>Do not copy the .pem file to the bastion or application server.</p><h3>PHASE 8: Install AWS CLI and Linux dependencies</h3><p>It’s time to gear up! Every command in this phase runs right inside the private app server, installing the AWS CLI and Linux dependencies so my workload has the tools it needs.</p><h4>Step 1: Update Ubuntu</h4><pre>sudo apt update</pre><p>Install the required packages:</p><pre>sudo apt install -y \<br>  curl \<br>  unzip \<br>  cron \<br>  tar \<br>  gzip \<br>  rsyslog</pre><p>Enable the cron and logging services:</p><pre>sudo systemctl enable --now cron<br>sudo systemctl enable --now rsyslog</pre><h4>Step 2: Test internet connectivity</h4><pre>curl -I -m 5 https://example.com</pre><p>This should work while the NAT Gateway is still live.</p><h4>Step 3: Install AWS CLI v2</h4><p>Check the instance architecture:</p><pre>uname -m</pre><p>For the recommended x86 EC2 instance:</p><pre>curl -L \<br>  &quot;https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip&quot; \<br>  -o awscliv2.zip</pre><p>Extract and install:</p><pre>unzip awscliv2.zip</pre><pre>sudo ./aws/install</pre><p>Verify:</p><pre>aws --version</pre><pre>which aws</pre><p>Expected installation path:</p><pre>/usr/local/bin/aws</pre><p>Configure the AWS region:</p><pre>aws configure set region eu-north-1</pre><pre>sudo aws configure set region eu-north-1</pre><p>Do not run the interactive aws configure command to enter access keys. My EC2 IAM role handles temporary credentials automatically under the hood. This way, it is safer, cleaner, and has zero static secrets sitting on disk.</p><p>Remove the downloaded installation files:</p><pre>rm -rf aws awscliv2.zip</pre><p>You have now completed the software installation that required internet access.</p><h3>PHASE 9: Create a private S3 bucket</h3><h4>Step 1: Create the bucket</h4><p>Navigate to AWS Console → S3 → General purpose buckets → Create bucket.</p><p>Configure:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*0_XnH8rEYCGMrew63ZocUQ.png" /></figure><p>S3 bucket names must be globally unique.</p><p>Click Create bucket.</p><h4>Step 2: Verify public access settings</h4><p>Open your bucket and navigate to Permissions → Block public access.</p><p>Ensure all four public access blocking settings are enabled.</p><p>You do not need to create the backups/ folder manually. It will appear when your application uploads its first backup.</p><h3>PHASE 10: Create EC2 IAM policy and role</h3><p>Next, I set up an EC2 IAM policy and role with strict write-only permissions. My app server can upload backups to S3, but it can’t read, list, or delete them — least privilege in action, so a compromised box can’t rewrite history.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0dDl8mJFFq58WyrPrRJANg.png" /><figcaption>Created EC2 IAM policy and role</figcaption></figure><h4>Step 1: Create an IAM policy</h4><p>Navigate to IAM → Policies → Create policy → JSON.</p><p>And enter the following policy:</p><pre>{<br>  &quot;Version&quot;: &quot;2012-10-17&quot;,<br>  &quot;Statement&quot;: [<br>    {<br>      &quot;Effect&quot;: &quot;Allow&quot;,<br>      &quot;Action&quot;: &quot;s3:PutObject&quot;,<br>      &quot;Resource&quot;: &quot;arn:aws:s3:::karatu-s3-1ai/backups/*&quot;<br>    }<br>  ]<br>}</pre><p>Click Next.</p><p>Policy name:</p><pre>karatu-s3-1ai-backup-policy</pre><p>Description:</p><pre>Allows the private EC2 application server to upload backups only.</pre><p>Click Create policy.</p><h4>Step 2: Create the EC2 IAM role</h4><p>Navigate to IAM → Roles → Create role.</p><p>Configure:</p><ul><li>Trusted entity type: AWS service</li><li>Use case: EC2</li></ul><p>Click Next.</p><p>Search for and select:</p><pre>karatu-s3-1ai-backup-policy</pre><p>Enter the role name:</p><pre>karatu-ec2-backup-role</pre><p>Click Create role.</p><h4>Step 3: Attach the IAM role to the app server</h4><p>Navigate to EC2 → Instances.</p><p>Select karatu-app-server.</p><p>Go to:</p><p>Actions → Security → Modify IAM role.</p><p>Select:</p><pre>karatu-ec2-backup-role</pre><p>Click Update IAM role.</p><p>Do not attach this role to the bastion.</p><h3>PHASE 11: Create the S3 Gateway VPC Endpoint</h3><p>Now for one of the most important parts of this project: creating the S3 Gateway VPC Endpoint. It gives my private EC2 instance a direct, private lane to Amazon S3 — no NAT gateway and no public internet required.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ITMXALuNB79FHUZoafoOSQ.png" /></figure><h4>Step 1: Create S3 endpoint</h4><p>Navigate to VPC → Endpoints → Create endpoint.</p><p>Configure:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*lt2jmGQoOb8fHOQZ_vRgvg.png" /></figure><p>The endpoint’s full-access policy does not override the EC2 role’s restricted permissions.</p><p>Ensure you select Gateway, not Interface.</p><p>Click Create endpoint.</p><h4>Step 2: Verify the private route table</h4><p>Navigate to:</p><p>VPC → Route tables → karatu-private-rt → Routes.</p><p>You should now see three routes:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*aJ-iW4YFCp4Aa5sC3FhSSA.png" /></figure><p>AWS automatically creates the S3 prefix-list route when the Gateway Endpoint is associated with the route table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lO6FWCr4Piy7cODGeUkajw.png" /></figure><h3>PHASE 12: Delete the temporary NAT Gateway</h3><p>With my packages installed and the S3 endpoint live, I deleted the temporary NAT gateway. Job done, bill saved — and my private server is back to total isolation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZdA-SNbvMiBoWx2-VsIVcg.png" /></figure><h4>Step 1: Delete NAT Gateway</h4><p>Navigate to VPC → NAT gateways.</p><p>Select:</p><pre>karatu-nat-gateway</pre><p>Choose Actions → Delete NAT gateway.</p><p>Confirm deletion and wait until its status is Deleted.</p><h4>Step 2: Release Elastic IP</h4><p>Navigate to VPC → Elastic IPs.</p><p>Select the Elastic IP previously assigned to the NAT Gateway.</p><p>Choose Actions → Release Elastic IP addresses.</p><p>Deleting the NAT Gateway does not automatically release its Elastic IP.</p><h4>Step 3: Verify private route table</h4><p>My private route table now resembles:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wbs0CACmEBYFXHq-SwAcsw.png" /><figcaption>My private route table after deleting the temporary NAT gateway</figcaption></figure><p>That blackhole route is a normal side effect of deleting the NAT gateway — AWS keeps the route entry around until I clean it up so I notice the broken target instead of failing silently. Left unchecked, traffic aimed at it goes straight into the void, so I’ll delete the stale route once I’m done verifying.</p><h4>Step 4: Test internet connectivity</h4><p>Inside the private application server:</p><pre>curl -m 5 https://example.com</pre><p>Expected output:</p><pre>curl: (28) Connection timed out after 5000 milliseconds</pre><p>The precise error message may vary, but the connection must fail.</p><h3>PHASE 13: Configure the systemd data generator</h3><p>The application server must append a timestamped line to /var/app/data/app.log every 30 seconds, start automatically on boot, and restart if stopped unexpectedly.</p><h4>Step 1: Create application directory</h4><p>Inside the private application server:</p><pre>sudo mkdir -p /var/app/data</pre><p>Create the initial log file:</p><pre>sudo touch /var/app/data/app.log</pre><h3>Step 2: Create the systemd service</h3><pre>sudo nano /etc/systemd/system/data-generator.service</pre><p>Enter:</p><pre>[Unit]<br>Description=Application Data Generator<br>After=network.target</pre><pre>[Service]<br>Type=simple<br>User=root<br>ExecStart=/bin/bash -c &#39;while true; do echo &quot;$(date -Is) Application running&quot; &gt;&gt; /var/app/data/app.log; sleep 30; done&#39;<br>Restart=always<br>RestartSec=5</pre><pre>[Install]<br>WantedBy=multi-user.target</pre><p>Save with Ctrl + O, press Enter, then Ctrl + X.</p><p>An intentional systemctl stop will stop the service even with Restart=always.</p><h4>Step 3: Reload systemd</h4><pre>sudo systemctl daemon-reload</pre><h4>Step 4: Enable and start service</h4><pre>sudo systemctl enable --now data-generator</pre><h4>Step 5: Verify service status</h4><pre>sudo systemctl status data-generator --no-pager</pre><pre>● data-generator.service<br>  Application Data Generator<br>Loaded: loaded; enabled<br>Active:<br>active (running)<br>Main PID: 1234 (bash)</pre><h4>Step 6: Verify application data</h4><pre>sudo tail -n 5 /var/app/data/app.log</pre><p>Example output:</p><pre>2026-11-18T18:00:00+00:00 Application running<br>2026-11-18T18:00:30+00:00 Application running<br>2026-11-18T18:01:00+00:00 Application running<br>2026-11-18T18:01:30+00:00 Application running<br>2026-11-18T18:02:00+00:00 Application running</pre><p>To monitor the application continuously:</p><pre>sudo tail -f /var/app/data/app.log</pre><p>Press Ctrl + C to exit monitoring.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CBpZM-4MxbWBf3H8z6nf8Q.png" /><figcaption>Created the systemd service</figcaption></figure><h3>PHASE 14: Create DynamoDB table</h3><p>Before I upload a single backup, I’m spinning up the DynamoDB table to catch the audit trail from the start so every archive that lands leaves a receipt.</p><p>Navigate to AWS Console → DynamoDB → Tables → Create table.</p><p>Configure:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*bsybTvd5UxLZLo5Y_1fxvQ.png" /></figure><p>Click Create table.</p><p>Wait until the table status becomes Active.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0MgxHR84ZQ5TdkiUNuIFaw.png" /></figure><h3>PHASE 15: Create Lambda IAM role</h3><p>For my Lambda execution role, I’m keeping permissions razor-thin: write records to DynamoDB and ship logs to CloudWatch. Just enough reach to do the job, nothing extra to abuse.</p><h4>Step 1: Find your AWS account ID</h4><p>Click your account menu in the top-right corner of the AWS Console.</p><p>Copy your 12-digit AWS account ID.</p><h4>Step 2: Create DynamoDB IAM policy</h4><p>Navigate to IAM → Policies → Create policy → JSON.</p><p>Enter:</p><pre>{<br>  &quot;Version&quot;: &quot;2012-10-17&quot;,<br>  &quot;Statement&quot;: [<br>    {<br>      &quot;Effect&quot;: &quot;Allow&quot;,<br>      &quot;Action&quot;: &quot;dynamodb:PutItem&quot;,<br>      &quot;Resource&quot;: &quot;arn:aws:dynamodb:eu-north-1:MY_ACCOUNT_ID:table/backup-log&quot;<br>    }<br>  ]<br>}</pre><p>Click Next.</p><p>Policy name:</p><pre>karatu-dynamodb-write-policy</pre><p>Click Create policy.</p><h4>Step 3: Create Lambda execution role</h4><p>Navigate to IAM → Roles → Create role.</p><p>Configure:</p><ul><li>Trusted entity type: AWS service</li><li>Use case: Lambda</li></ul><p>Attach these two policies:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*Oi8upcCJNKArXYVTmqxk1Q.png" /></figure><p>Role name:</p><pre>karatu-lambda-role</pre><p>Click Create role.</p><p>Do not attach AmazonDynamoDBFullAccess or AdministratorAccess.</p><p>The project calls for strict least-privilege DynamoDB access, so I’m scoping dynamodb:PutItem down to this exact table ARN rather than a wildcard. Surgical permissions—only the right action, only on the right table.</p><h3>PHASE 16: Create and configure Lambda function</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MsNmeIgMGp2uLvI9qgX1gw.jpeg" /></figure><h4>Step 1: Create function</h4><p>Navigate to AWS Lambda → Functions → Create function.</p><p>Configure:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*gKdkB81pae2iy1hNO-JDQw.png" /></figure><p>Click Create function.</p><p>I’m leaving the Lambda function outside my custom VPC; it doesn’t need VPC networking just to react to S3 events or write to DynamoDB. Skipping the extra ENI overhead, no reason to add complexity, where AWS services talk cleanly out of the box.</p><h4>Step 2: Write Lambda code</h4><p>I opened the Code tab and swapped in my new lambda_function.py.</p><pre>import json<br>import logging<br>import urllib.parse</pre><pre>import boto3<br></pre><pre>logger = logging.getLogger()<br>logger.setLevel(logging.INFO)</pre><pre>dynamodb = boto3.resource(&quot;dynamodb&quot;)<br>table = dynamodb.Table(&quot;backup-log&quot;)<br></pre><pre>def lambda_handler(event, context):<br>    logger.info(&quot;Processing S3 backup event&quot;)</pre><pre>    for record in event[&quot;Records&quot;]:<br>        bucket = record[&quot;s3&quot;][&quot;bucket&quot;][&quot;name&quot;]</pre><pre>        key = urllib.parse.unquote_plus(<br>            record[&quot;s3&quot;][&quot;object&quot;][&quot;key&quot;]<br>        )</pre><pre>        item = {<br>            &quot;backup_id&quot;: key,<br>            &quot;size_bytes&quot;: record[&quot;s3&quot;][&quot;object&quot;][&quot;size&quot;],<br>            &quot;uploaded_at&quot;: record[&quot;eventTime&quot;],<br>            &quot;bucket&quot;: bucket,<br>        }</pre><pre>        table.put_item(Item=item)</pre><pre>        logger.info(<br>            &quot;Backup recorded: %s&quot;,<br>            json.dumps(item)<br>        )</pre><pre>    return {<br>        &quot;statusCode&quot;: 200,<br>        &quot;body&quot;: &quot;Backup audit completed successfully&quot;<br>    }</pre><p>Click Deploy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*85A9D0yXeUJ37fqQQBByQQ.png" /></figure><ul><li>I tailored the starter code from the project with extra logging to leave clear CloudWatch evidence.</li><li>When S3 fires an upload event, my function catches it, pulls the bucket name and file name, decodes the URL-encoded object key, and grabs the size and timestamp.</li><li>Then it writes that metadata to DynamoDB and logs the operation to CloudWatch.</li><li>No S3 download permissions needed either — the event payload already hands me the metadata on a silver platter.</li></ul><h4>Step 3: Configure Lambda settings</h4><p>Navigate to Configuration → General configuration → Edit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*EMPhzLDTiv6tT4s3daRKRQ.png" /></figure><h4>Step 4: Add S3 trigger</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xa761Nk-yGaSOJDdrMY9GQ.png" /></figure><p>Navigate to Function overview → Add trigger.</p><p>Select S3.</p><p>Configure:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*5lEg2gC3WH0m4j-WGHmZvA.png" /></figure><p>Acknowledge the recursive invocation warning if displayed.</p><p>Click Add.</p><p>S3 and Lambda must be in the same region for this trigger configuration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-mJ-UX6hces4Uij5StWp3Q.png" /></figure><h3>PHASE 17: Write the Bash backup script</h3><p>Now it’s time to write the Bash backup script on the private app server. It bundles the application data into a timestamped archive, pushes it to S3 through the Gateway VPC Endpoint using the EC2 IAM role’s temporary credentials, records what happened in a log file, and deletes the local archive only after the upload succeeds so a failed upload never wipes out my local copy.</p><h4>Step 1: Create the backup log</h4><p>Inside the private application server:</p><pre>sudo touch /var/log/backup.log</pre><pre>sudo chmod 640 /var/log/backup.log</pre><h4>Step 2: Create backup script</h4><pre>sudo nano /usr/local/bin/backup.sh</pre><p>Then, enter the following script.</p><pre>#!/bin/bash</pre><pre>set -euo pipefail</pre><pre># Configuration<br>BUCKET=&quot;karatu-s3-1ai&quot;<br>REGION=&quot;eu-north-1&quot;<br>DATA_DIR=&quot;/var/app/data&quot;<br>LOG_FILE=&quot;/var/log/backup.log&quot;<br>AWS_CLI=&quot;/usr/local/bin/aws&quot;</pre><pre># Generate backup filename<br>TIMESTAMP=$(date -u +&quot;%Y-%m-%d-%H%M&quot;)<br>FILENAME=&quot;backup-${TIMESTAMP}.tar.gz&quot;<br>S3_KEY=&quot;backups/${FILENAME}&quot;</pre><pre>WORK_DIR=&quot;not-created&quot;</pre><pre># Logging function<br>log_message() {<br>    printf &#39;[%s] %s\n&#39; \<br>        &quot;$(date -u -Is)&quot; &quot;$*&quot; &gt;&gt; &quot;$LOG_FILE&quot;<br>}</pre><pre># Error handling<br>handle_error() {<br>    local exit_code=&quot;$1&quot;<br>    local line_number=&quot;$2&quot;</pre><pre>    log_message &quot;FAILURE: ${FILENAME}; line=${line_number}; exit=${exit_code}; work_dir=${WORK_DIR}&quot;</pre><pre>    exit &quot;$exit_code&quot;<br>}</pre><pre>trap &#39;handle_error &quot;$?&quot; &quot;$LINENO&quot;&#39; ERR</pre><pre>log_message &quot;START: ${FILENAME}&quot;</pre><pre># Create a temporary backup directory<br>WORK_DIR=$(mktemp -d /var/tmp/app-backup.XXXXXX)<br>ARCHIVE=&quot;${WORK_DIR}/${FILENAME}&quot;</pre><pre># Copy application data before compression<br>cp -a &quot;$DATA_DIR&quot; &quot;$WORK_DIR/data&quot;</pre><pre># Compress application data<br>tar -czf &quot;$ARCHIVE&quot; \<br>    -C &quot;$WORK_DIR&quot; data</pre><pre># Upload the archive to S3<br>&quot;$AWS_CLI&quot; s3api put-object \<br>    --bucket &quot;$BUCKET&quot; \<br>    --key &quot;$S3_KEY&quot; \<br>    --body &quot;$ARCHIVE&quot; \<br>    --if-none-match &quot;*&quot; \<br>    --region &quot;$REGION&quot; \<br>    --no-cli-pager &gt; /dev/null</pre><pre>log_message &quot;SUCCESS: s3://${BUCKET}/${S3_KEY}&quot;</pre><pre># Delete local archive after successful upload<br>rm -rf -- &quot;$WORK_DIR&quot;</pre><h4>Step 3: Set file permissions</h4><pre>sudo chown root:root /usr/local/bin/backup.sh</pre><pre>sudo chmod 750 /usr/local/bin/backup.sh</pre><h4>Step 4: Check Bash syntax</h4><pre>sudo bash -n /usr/local/bin/backup.sh</pre><p>If there is no output, the syntax check passed.</p><h4>Step 5: Execute the script manually</h4><pre>sudo /usr/local/bin/backup.sh</pre><p>I checked the backup log:</p><pre>sudo cat /var/log/backup.log</pre><p>Expected output:</p><pre>[2026-11-18T18:10:00+00:00] START: backup-2026-11-18-1810.tar.gz<br>[2026-11-18T18:10:02+00:00] SUCCESS: s3://karatu-s3-1ai/backups/backup-2026-11-18-1810.tar.gz</pre><h4>Step 6: Verify S3 upload</h4><p>Navigate to: S3 → Your bucket → backups/.</p><p>The uploaded .tar.gz archive should be visible.</p><h4>Step 7: Verify DynamoDB record</h4><p>Navigate to:</p><p>DynamoDB → Tables → backup-log → Explore table items → Run scan.</p><p>The first audit record should appear automatically after the upload notification has been processed.</p><p>Do not manually insert DynamoDB records.</p><h3>PHASE 18: Prove least-privilege IAM restrictions</h3><p>Time to put the EC2 IAM role to the test and prove least privilege actually bites when it should. From inside the private app server, I upload a test object through the S3 Gateway VPC Endpoint to confirm write access works, then try to delete it — expecting a clean AccessDenied rejection.</p><h4>Step 1: Identify an existing backup</h4><p>Check the log:</p><pre>sudo tail -n 5 /var/log/backup.log</pre><p>Copy an actual S3 backup path.</p><h4>Step 2: Attempt to delete the backup</h4><p>Execute on the private application server:</p><pre>sudo aws s3 rm \<br>  s3://karatu-s3-1ai/backups/backup-2026-11-19-2318.tar.gz \<br>  --region eu-north-1</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pvgWC1IRxYGhTLbCa6V4ZQ.png" /><figcaption>IAM restriction least-privilege example</figcaption></figure><p>This failure is intentional and demonstrates that the IAM policy works.</p><p>You can also test listing:</p><pre>sudo aws s3 ls \<br>  s3://karatu-s3-1ai/backups/ \<br>  --region eu-north-1</pre><p>This should also produce AccessDenied, because the role does not have s3:ListBucket.</p><h3>PHASE 19: Configure Cron backup automation</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oKGTu1MFtboogcz6qtqWkg.jpeg" /><figcaption>Automated backup with Cron</figcaption></figure><h4>Step 1: Edit the root crontab</h4><pre>sudo crontab -e</pre><p>Select Nano if prompted for an editor.</p><h4>Step 2: Add a scheduled job</h4><pre>*/10 * * * * /usr/local/bin/backup.sh &gt;&gt; /var/log/backup.log 2&gt;&amp;1</pre><p>Save and exit.</p><p>This executes the backup script every ten minutes using an absolute path.</p><h4>Step 3: Verify crontab</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8pJqTuqVhBIN37Dne-W5qg.png" /></figure><pre>sudo crontab -l</pre><p>Expected output:</p><pre>*/10 * * * * /usr/local/bin/backup.sh &gt;&gt; /var/log/backup.log 2&gt;&amp;1</pre><h4>Step 4: Verify cron service</h4><pre>sudo systemctl status cron --no-pager</pre><h4>Step 5: Monitor backup execution</h4><pre>sudo tail -f /var/log/backup.log</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UozeHEjnE0qzz8c5soAuig.png" /><figcaption>Backup execution log</figcaption></figure><p>Do not repeatedly execute manual backups within the same minute, because the filenames use minute-level timestamps and the conditional upload prevents overwriting a previous backup.</p><h3>Step 6: Inspect cron logs</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZvSh-j0eQLK6VaDanUDomg.png" /></figure><pre>sudo grep CRON /var/log/syslog | tail -n 20</pre><p>Alternatively:</p><pre>sudo journalctl -u cron -n 30 --no-pager</pre><h3>PHASE 20: Verify the complete pipeline</h3><h4>Test 1: Internet access fails after NAT deletion</h4><p>On the app server:</p><pre>curl -m 5 https://example.com</pre><p>Expected: connection timeout or another network connection failure.</p><h4>Test 2: S3 upload still succeeds</h4><p>Execute in a minute for which no backup has already been created:</p><pre>sudo /usr/local/bin/backup.sh</pre><pre>sudo tail -n 4 /var/log/backup.log</pre><p>The successful upload proves that the S3 Gateway Endpoint is working.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WKFFjIRNFjN8T-FBXJgzlA.png" /></figure><h3>Test 3: Check at least three S3 backups</h3><p>Navigate to:</p><p>S3 → My bucket → backups/.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wvgg6KHvLR3gJsQTX8sPEg.png" /></figure><h4>Test 4: Check three DynamoDB records</h4><p>Navigate to DynamoDB → backup-log → Explore table items.</p><p>Run a scan.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1lcaP-UbvhDSDiUkWQ0I5A.png" /></figure><h3>Test 5: Verify CloudWatch logs</h3><p>Navigate to Lambda → karatu-backup-audit → Monitor → View CloudWatch logs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bkjDTqBK7GdoEuMihrK0rQ.png" /></figure><p>Alternatively:</p><p>CloudWatch → Log groups → /aws/lambda/karatu-backup-audit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xLjbbhrxPPuyzRo9UOeSMg.png" /></figure><h3>PHASE 21: Clean up all AWS resources</h3><p>With my cloud infrastructure successfully tested, it was time to wrap things up responsibly: I stopped all services. Finally, I checked for leftover resources and potential charges because in cloud engineering, deploying smart is only half the job; cleaning up smart keeps the cloud — and my wallet — under control!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5SRdiDEH6aFca8aqjpFDOQ.png" /></figure><h4>Step 1: Stop backup automation</h4><p>Before terminating the application server:</p><pre>sudo crontab -e</pre><p>Remove the backup cron entry.</p><p>Stop the data generator:</p><pre>sudo systemctl disable --now data-generator</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OuP2uOODjGNwTdLIsnoqbw.png" /></figure><h4>Step 2: Terminate EC2 instances</h4><p>Navigate to EC2 → Instances.</p><p>Select both project instances:</p><pre>karatu-bastion<br>karatu-app-server</pre><p>Choose Instance state → Terminate instance.</p><p>Verify that their EBS volumes have also been deleted under EC2 → Volumes.</p><h4>Step 3: Delete serverless resources</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jDk157cjXU92WgU4cJIU9A.png" /></figure><p>Remove the S3 event notification under my bucket’s Properties → Event notifications, then delete:</p><ul><li>Lambda function.</li><li>Lambda CloudWatch log group.</li><li>DynamoDB table.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cDyxaojJ2HdDKViVK4e7tA.png" /></figure><h4>Step 4: Delete S3 bucket</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pxFMATr4eaf_J-GbkDxgGg.png" /></figure><ul><li>Navigate to the project bucket.</li><li>Click Empty and confirm.</li><li>After emptying, select Delete and confirm the bucket name.</li></ul><p>This was done using my AWS management account, not the restricted EC2 role.</p><h4>Step 5: Delete networking resources</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IBpMgMbi-TE1D9099z4tlA.png" /></figure><ul><li>Delete the S3 VPC Endpoint first.</li><li>Delete the project security groups, route tables, subnets, Internet Gateway, and VPC.</li><li>If AWS reports a dependency error, ensure no EC2 network interfaces or other resources remain attached.</li></ul><h4>Step 6: Verify billing resources</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8Pa5z-oouWHPuk2HlI9Yow.png" /></figure><p>Verify that there are no remaining project</p><ul><li>Active EC2 instances.</li><li>NAT Gateways.</li><li>Elastic IP addresses.</li><li>EBS volumes.</li><li>S3 buckets.</li><li>Lambda functions.</li><li>DynamoDB tables.</li></ul><p>I can keep my AWS budget alert active to monitor future costs or delete it after capturing the required evidence if I want a complete cleanup. My goal is simple: no unused resources, no unexpected bills!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*feoUftCI2oY2wHXfMXa44Q.png" /></figure><p>This project showed me that cloud engineering is more than deploying resources; it’s about building secure, reliable systems that work together seamlessly. From private networking to automated backups and serverless auditing, I gained hands-on experience turning AWS services into a practical, secure solution. My biggest takeaway? <strong>Build smart, automate wisely, secure everything, and never forget to clean up!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=30a83f006729" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Build a Bulletproof AWS Bastion Host]]></title>
            <link>https://medium.com/@samadebisi12/how-to-build-a-bulletproof-aws-bastion-host-7f57c9a91ee6?source=rss-61746b167c43------2</link>
            <guid isPermaLink="false">https://medium.com/p/7f57c9a91ee6</guid>
            <category><![CDATA[bastion-host]]></category>
            <category><![CDATA[aws-ec2]]></category>
            <category><![CDATA[aws-internet-gateway]]></category>
            <category><![CDATA[private-and-public-subnet]]></category>
            <category><![CDATA[aws-vpc]]></category>
            <dc:creator><![CDATA[Adeosun Osungbesan]]></dc:creator>
            <pubDate>Sat, 24 Oct 2026 22:56:46 GMT</pubDate>
            <atom:updated>2026-10-24T22:56:46.771Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Step-by-step instructions for provisioning secure, isolated access to your private subnet.</strong></h3><p>In this guide, I’ll break down what a bastion host is, why it’s essential, and walk you through how I built a secure, two-tier AWS network from scratch.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z41JbvZBKlaKS1UK4Q-ndQ.jpeg" /><figcaption>A complete breakdown of how inbound internet traffic flows across public and private AWS subnets.</figcaption></figure><h3>What Is a Bastion Host?</h3><p>A bastion host is an EC2 instance in a public subnet with a public IP that serves as a secure, single entry point for administrators to manage private servers without exposing them to the internet.</p><p>From the archichetural design above, the AWS environment includes: 1 VPC with separate public and private subnets, 1 internet Gateway, public and private route tables, 2 EC2 instances (1 bastion, one private).</p><p><strong>Key Benefits:</strong></p><ul><li>Minimized Attack Surface: Only one server faces the public internet.</li><li>Isolated Infrastructure: Private instances stay completely hidden from external access.</li><li>Strict Access Control: SSH is restricted to trusted IP addresses and monitored easily.</li></ul><h4>Step-by-Step Implementation</h4><h4>Step 1: Create the VPC</h4><p>Set up a dedicated VPC to cleanly isolate all project resources.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MN0IFDfKrAx1bpdpyo11jA.png" /></figure><h4>Step 2: Create Subnets</h4><p>Inside the VPC, create two subnets in the same Availability Zone:</p><ul><li>Public subnet for the bastion host.</li><li>Private subnet for the internal EC2 instance.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2tNNE17PZB8WRaqM4034dw.png" /></figure><h4>Step 3: Configure the Internet Gateway &amp; Route Tables</h4><ol><li>Attach an Internet Gateway to the public subnet.</li><li>Create a public route table (0.0.0.0/0 pointing to the Internet Gateway) and a private route table (no internet access).</li><li>Associate each subnet with its corresponding route table.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ab7qrIw7EKoYc54pQYgs4w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6ZoUGLw2lAGDPcZck9CBiA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ngh-OsN5_1dzOu92uAvVXA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NKDxqWvyG5pyNnk4zplOTg.png" /></figure><h4>Step 4: Launch the Bastion Host</h4><p>Deploy an EC2 instance in the public subnet:</p><ul><li>Enable Auto-assign Public IP.</li><li>Attach a security group allowing inbound SSH (port 22) only from your local IP</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cQ-oZuTPmdsUOLliDegNjA.png" /></figure><h4>Step 5: Launch the Private EC2 Instance</h4><p>Deploy a second EC2 instance in the private subnet:</p><ul><li>Leave public IP disabled.</li><li>Configure a security group allowing SSH only from the bastion host’s security group.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sGabGLXMt1Hc_Ecr9tH2eA.png" /></figure><h4>Step 6: Connect to the Private Instance</h4><p>Log in securely using SSH agent forwarding, ensuring your private key never leaves your local machine:</p><ol><li>SSH from your local computer into the bastion host.</li><li>Forward your SSH key.</li><li>SSH from the bastion host into the private instance.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VqgxWRwwVltiyReGN1kCkg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TlHyvUNZ9sySsyXHsfXHOg.png" /></figure><h4>Troubleshooting &amp; Lessons Learned</h4><ul><li>The Issue: Initial SSH connections to the private instance failed.</li><li>The Fix: I updated the private instance’s security group to accept traffic exclusively from the bastion’s security group, verified the public route table association, and confirmed my local IP matched the bastion’s inbound rule.</li></ul><h4>Conclusion</h4><p>This project highlights a fundamental AWS security pattern: locking down sensitive workloads behind a single, hardened entry point. Mastering VPC design, subnet isolation, and security groups is essential for building robust, production-ready cloud environments.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7f57c9a91ee6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Importance of Data Collection for Map Visualization]]></title>
            <link>https://medium.com/@samadebisi12/the-importance-of-data-collection-for-map-visualization-8fbd90c88465?source=rss-61746b167c43------2</link>
            <guid isPermaLink="false">https://medium.com/p/8fbd90c88465</guid>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[maps]]></category>
            <category><![CDATA[power-bi]]></category>
            <dc:creator><![CDATA[Adeosun Osungbesan]]></dc:creator>
            <pubDate>Sat, 27 May 2023 15:14:48 GMT</pubDate>
            <atom:updated>2023-05-27T15:14:48.462Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bI0byf9K0do-n6er4cMxGg.png" /></figure><p><strong>Introduction</strong></p><p>Geographic information systems (GIS) provide a comprehensive framework for collecting, storing, querying, analysing, and displaying spatial data in a wide variety of contexts (Choi et al., 2020). One application of a GIS-based decision-making system is the evaluation of the City of Forssa waste management datasets for visualizing properties, contractors, and disposal facilities on maps for effective decision-making. The City of Forssa’s waste management board serves as a combined waste management agency for municipalities in the Loimi-Hämeen Jätehuolto Oy cooperative area. Waste transportation is organized by property and the region. Septic tank sludge and septic tanks are municipal waste regulated by the Finnish Waste Act, and municipalities are responsible for waste management. Permanent residences and non-drainage holiday homes must have their septic tanks drained at least once a year. The waste transportation company is responsible for emptying a property’s septic tank at a particular time. These key performance indicators are mapped, and they are satisfactory if the sludge is managed properly.</p><p><strong>Gathering geographic data for Maps</strong></p><p>There are different ways to collect geographic data for maps. The most common methods are aerial surveys, satellite imagery, and ground surveys. Geographic data can be used to create many different types of maps, including topographic maps, street maps, and climate maps. Whether the data is from a government, private sources, or open data, it is important to understand the type of data, where it comes from, how it is collected, and for what purpose. The truth is that you can group geographic data into as many topics as you want. Currently, there is not a single website that contains all the geographic data in the world. Instead, they branch out into what they specialize in the most. (Wolf et al., 2014)</p><p><strong>The problems and difficulties of GIS</strong></p><p>The GIS database is having some problems. Many companies or agencies are putting a lot of effort into setting up a digital spatial database from paper and statistical data, but it seems very few of them are willing to spend a lot of money to modify the data. (Fischer et al., 2019)</p><p>Most data source types of administrative information currently are on a sheet basis (not digital). Limited weather conditions, high flight and printing costs make it impossible to take frequent aerial photography (usually every 3–5 years worldwide) with a wide range. The speed of the laser rangefinder is still not enough for practical use in urban areas. On the other hand, mobile interface with GPS is also a potential method to capture feature changes. However, since GPS signals may not be available in many urban areas, improvement is needed.</p><p>Most of man-made object extraction can be difficult to operate automatically and efficiently. Trees, cars, congestion, as well as other objects on the road or around the road destroy uniformity making automatic extraction very difficult. Also, an image (central projection) and map (orthogonal projection) cannot overlap directly.</p><p>It is hard to compare between data from customer to data on reference maps. We believe that a single data source is generally not sufficient to modify a dynamic GIS database. That is, it is necessary to integrate or merge different data sets. However, since each dataset has its own special properties (resolution, precision, etc.) and reference system, integrating them is not an easy task.</p><p><strong>Methodology of the City of Forssa waste management data analysis</strong></p><p>Data cleaning is an important and time-consuming aspect of the project; the data received for analyzing the City of Forssa waste management datasets are from contractors, and there are several Excel files. Many issues emerged because of the inconsistency of these formats. The first step is raw data cleaning, in which we deleted columns. Following rough cleaning, we moved on to more extensive cleaning, in which we went through Excel files row by row, identifying any problematic rows and fixing them. Then we included details on the contractors and disposal of waste. There could be a quick and easy solution to clean up the data, but for now, we needed to do it manually in Excel.</p><p><strong>Result and discussion</strong></p><p>For a specific property to appear on a map, the address, postal code, and postal district were used in Power Bi. The addresses were confirmed via Google Maps. Some addresses were correct but appeared in wrong places in the visualization.</p><p><strong>Maps and visualization</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-pDhij6tBUjwSjiSCADC4g.png" /></figure><p>Addresses, postal codes, and postal districts were combined in Power BI. For map visualization, we used a tool in Power BI called “ArcGIS Maps for Power BI”. ArcGIS is a software developed by Esri (Environmental Systems Research Institute). It can be used to manage geographic data and aid in map analytics. (GIS Geography, n.d.).</p><p>The visualizations include the locations of properties around Forssa area, which properties contractors work in, the type of sludge wells and tanks in the property and the location that the sludge is taken to for processing.</p><p>After the data had been cleaned, the transferring of Excel data into geographic data on a map was a relatively streamlined process. This highlights the significance of delivering data that is of a consistent form between data sources, such as between different contractors. That way it is easier and faster to build the visualization.</p><p><strong>Problems in the data and suggested solutions</strong></p><p>Data mining from customers and waste transport companies is insufficient to support analytical performance. Columns will be easier to process if the data is more connected and of uniform quality from all contractors. In the future, it would be ideal to provide a sample for data collection. Another difficulty we encountered was the address provided by the contractors. There were challenges due to typographical errors and inconsistencies among the datasets. To avoid similar difficulties in the future, we suggest using a form to collect information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WKqPbG7aqMvHulD4F-qCgQ.jpeg" /></figure><p><strong>Recommendations</strong></p><p>Given the tremendous effort involved in creating databases in a geographic information system, it is important that they are as accurate and error-free as possible. Unfortunately, it is very easy to have errors and inaccuracies if the data used is not collected using the most appropriate spatial scale, measurement system, and currency. More importantly, in any application, secondary data can account for more than 90% of all data, so it is necessary to evaluate the quality of these datasets and design data collection activities for primary data.</p><p>The City of Forssa waste management board can categorize and manage the wastewater treatment system by following the steps outlined below:</p><p>Are sewers available? If yes, then provide a gravity or pumped-flow connection to a nearby sewer, if not then apply for a new sewerage system. After applying then the next question: is the application accepted? If yes, then provide a new sewerage system, if not as well as if the customer didn’t apply for a new sewerage system, then on-site treatment or storage is required. After that: is the site location suitable for septic tank and drainage field? If yes, is discharge acceptable? If not as well as if the site location is not suitable for a septic tank and drainage field, then answer the next question: does the site have a suitable outlet for treated effluent? If yes, obtain discharge consent. If not, install a cesspool. After obtaining discharge consent, we can move on to treatment works selection. In this part, we have two options: to consider a package plant and a site-constructed treatment system. Then we also have a question: will the proposed option meet consent? If yes, then install a package plant or a site-constructed system, if not, install a cesspool. Without clean, uniform data, mapping data is difficult. To provide a clear client visualization, all recommendations were carefully considered.</p><p><strong>References</strong></p><p>Choi, Y., Baek, J., &amp; Park, S. (2020). Review of GIS-Based Applications for Mining: Planning, Operation, and Environmental Management. <em>Applied Sciences</em>, <em>10</em>(7), 2266. MDPI AG. Retrieved from <a href="http://dx.doi.org/10.3390/app10072266">http://dx.doi.org/10.3390/app10072266</a></p><p>Fischer, M. M., Scholten, H. J., &amp; Unwin, D. (2019). Geographic information systems, spatial data analysis and spatial modelling: an introduction. In <em>Spatial analytical perspectives on GIS</em> (pp. 3–20). Routledge.</p><p>GIS Geography. (n.d.). <em>What is ArcGIS?</em> <a href="https://gisgeography.com/what-is-arcgis/">https://gisgeography.com/what-is-arcgis/</a></p><p>Wolf, P. R., Dewitt, B. A., &amp; Wilkinson, B. E. (2014). <em>Elements of Photogrammetry with Applications in GIS</em>. McGraw-Hill Education.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8fbd90c88465" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[EFFECTIVE WAYS TO REDUCE CO2 EMISSIONS IN A CIRCULAR BIOECONOMY]]></title>
            <link>https://medium.com/@samadebisi12/effective-ways-to-reduce-co2-emissions-in-a-circular-bioeconomy-569378f5cf8a?source=rss-61746b167c43------2</link>
            <guid isPermaLink="false">https://medium.com/p/569378f5cf8a</guid>
            <category><![CDATA[climate-change]]></category>
            <category><![CDATA[carbon-emissions]]></category>
            <category><![CDATA[carbon-capture]]></category>
            <category><![CDATA[circulareconomy]]></category>
            <category><![CDATA[bioeconomy]]></category>
            <dc:creator><![CDATA[Adeosun Osungbesan]]></dc:creator>
            <pubDate>Sat, 27 May 2023 13:53:31 GMT</pubDate>
            <atom:updated>2023-05-27T13:53:31.789Z</atom:updated>
            <content:encoded><![CDATA[<h4>Direct Air Carbon Capture and Storage (DACCS)</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ek7LP57XxM94NRsdpkeJwA.jpeg" /><figcaption>In Iceland, a Climeworks project is absorbing carbon dioxide emissions directly from the air and storing it underground. The energy-intensive process is powered by geothermal energy. <em>Arnaldur Halldorsson/Bloomberg via Getty Images</em></figcaption></figure><p><strong>Abstract</strong></p><p>The current scenario of rising greenhouse gas emissions throughout the past decade (2010–2019), with total net CO2 emissions climbing by roughly 12%, is described in the Intergovernmental Panel on Climate Change’s Special Report on Global Warming of 1.5 °C. The process of extracting carbon dioxide (CO2) from the air and burying it underground, known as carbon dioxide removal (CDR), has emerged as a pressing issue throughout the globe. Achieving the full scope of the Paris Agreement’s goals without CDR is quite improbable. Reforestation, soil carbon sequestration, biochar, bioenergy with carbon capture and storage (BECCS), enhanced weathering, ocean alkalinization, and direct air capture and storage are only few of the processes that need to be developed before this can become a reality.</p><p>Utilizing CO2 is sometimes promoted as a strategy to increase the scope of mitigation or removal efforts by decreasing the net costs (or raising the profits) of doing so. Wood products for construction, higher plant yields due to better soil carbon absorption, the production of biofuel, and the development of bio-derived compounds are all examples of how CO2 might be usefully put to use in a biological or land-based context.</p><p>It has been proposed that using carbon capture and storage (CCS) technologies could reduce the rate at which large, stationary sources of carbon dioxide (CO2) emit CO2 into the atmosphere by capturing CO2 from gas mixtures prior to their release into the atmosphere and depositing the captured CO2 in underground reservoirs. Therefore, they may be used in industries where the process itself makes CO2 emissions inevitable (such as steel and cement manufacture, chemical manufacturing, and the final remnants of fossil fuel power generation).</p><p>Increased CO2 usage may be hazardous to the climate, thus policymakers and practitioners must keep that in mind. In order to promote climate-beneficial CO2 utilisation, policy should aim to reward actual emission reductions and removals across the life cycle rather than just encouraging utilisation per se.</p><p><strong>Introduction</strong></p><p>The concept of carbon dioxide removal (CDR), in which CO2 is sucked out of the air and stored underground, has acquired considerable traction as a pressing global issue. Greenhouse gas emissions increased throughout the recent decade (2010–2019), with total net CO2 emissions rising by roughly 12%, according to the Intergovernmental Panel on Climate Change’s Special Report on Global Warming of 1.5 °C (2022, pp. 2–10). Emissions of carbon dioxide (CO2) from the burning of fossil fuels and other industrial processes (CO2-FFI) declined slightly in the first half of 2020 as a result of reactions to the COVID-19 pandemic, but then rose again by year’s end. In 2020, we managed to cut our CO2 and FFI emissions by roughly 5.8 percent each year on average, which equates to around 2.2 gigatons of carbon dioxide. Since no information was available for non-CO2 GHG emissions in 2020, it was impossible to determine the entire effect of the COVID-19 epidemic on GHG emissions. It’s quite unlikely that the goals of the Paris Agreement can be met in their entirety without CDR. (IPCC, 2022, pp. 2–10)</p><p>Indeed, the scenario pathways in the report that limit warming to 1.5 °C rely heavily on carbon dioxide removal. The net global GHG emissions are projected to fall from 2019 levels by approximately 30 percent by 2030 and approximately 70 percent by 2050 in global medelled pathways that limit warming to 2 °C and assuming immediate actions are taken. The most recent estimates place yearly human CO2 emissions at 44 GtCO2, therefore the amount of CDR that is being contemplated is on the order of nearly 20 years’ worth of emissions from today. However, the processes that are required to make this a reality, such as reforestation, soil carbon sequestration, biochar, bioenergy with carbon capture and storage (BECCS), enhanced weathering, ocean alkalinization, and direct air capture and storage, are still a long way from being ready for widespread use. (IPCC, 2022, pp. 2–10)</p><p>The risks and ambiguities of carbon removal are of widespread concern because it is assumed, without evidence, that CDR would be deployed at the large scales used in global mitigation scenarios to limit climate warming to 1.5–2 degrees Celsius, using only one or two CDR methods, namely BECCS and afforestation. Mitigation scenarios that keep global warming below 2 °C often rely on the rapid and huge expansion of low-carbon energy sources, such as solar, wind, biomass, hydro, or nuclear power, and the usage of fossil fuels with carbon capture and storage. Most people are against it because of the enormous amount of space, energy, power, and water that would be required, as well as the possible harm it may do to animals and the environment. While these are valid worries, they may not be more significant than the need for massive ‘conventional’ climate change mitigation efforts if we are to keep global warming below 2 degrees Celsius. (Bellamy &amp; Geden, 2019, pp. 2–3)</p><h4><strong>CO2 Utilisation</strong></h4><p>Using negative emission technologies (NETs) to remove CO2 from the atmosphere and put it to productive use is preferable because of our reliance on fossil fuels and the low likelihood that our global economy will completely eliminate all emissions. Since using CO2 as a feedstock can be a cheaper or cleaner production process than using conventional hydrocarbons, the scientific community is showing a growing interest in CO2 utilization. CO2 utilisation is often advocated as a means to scale mitigation or removal efforts by decreasing net costs (or increasing profits) associated with lowering emissions or removing carbon dioxide from the atmosphere. Depending on who you ask, CO2 utilisation is either a necessary first step toward full-scale carbon capture and storage (CCS) deployment or a diversionary tactic that will slow down the process. Understanding the potential economic, social, political and environmental impact of these technologies before they are deployed is therefore essential. (Hepburn et al., 2019, p. 1)</p><p>We define CO2 utilisation in this paper as the creation of one or more economically valuable products from CO2, where the CO2 may have originated from fossil-derived waste gases, industrial capture of atmospheric CO2, or biological capture of atmospheric CO2. The biological or land-based utilisation of CO2 can generate value in the form of, for example, wood products for construction, increased plant yields due to increased soil carbon uptake, and the production of biofuel and bio-derived chemicals. We use this broader definition on purpose; we want to encourage communication between fields of study, compare costs and benefits across pathways, and consider common techno-economic characteristics across pathways that could aid in identifying routes to climate change mitigation. (Hepburn et al., 2019, p. 2)</p><p>Within this perspective, we take into account 10 potential CO2 use routes. We provide an open evaluation of each pathway’s potential size and cost, namely:</p><p>(i) CO2-based chemical products, including polymers;</p><p>(ii) CO2-based fuels;</p><p>(iii) microalgae fuels and other microalgae products;</p><p>(iv) concrete building materials;</p><p>(v) CO2 enhanced oil recovery (CO2-EOR);</p><p>(vi) bio-energy with carbon capture and storage (BECCS);</p><p>(vii) enhanced weathering (EW)</p><p>(viii) forestry techniques including afforestation/reforestation (AF/RF), forest management and wood products;</p><p>(ix) land management via soil carbon sequestration (SCS) techniques; and</p><p>(x) biochar. (Hepburn et al., 2019, p. 2)</p><p>Table 1 shows ten CO2 utilisation pathways that may be characterised as “cycling,” “closed,” or “open.” The majority of common industrial utilisation pathways, including those for CO2-based fuels and chemicals, are cyclical, which means that carbon is transported through industrial systems over timescales of days, weeks, or months. However, industrial CO2 capture may reduce emissions by substituting the use of fossil fuels, thus both technologies have appeal. “Closed” pathways, on the other hand, consume and store CO2 for extended periods of time in locations such as the lithosphere (through CO2-EOR or BECCS), the deep waters (via terrestrial EW), or mineralized carbon in both constructed and natural environments. Finally, ‘open’ routes are often biological in nature, with strong removal potentials and storage in ‘leaky’ natural systems such as biomass and soil, but they also represent a significant risk of large-scale flux back to the atmosphere. These paths were selected after much discussion at a meeting of the National Academy of Sciences in the United States and the Royal Society in the United Kingdom. There are more paths that are consistent with our study but are not included here (Sackler Forum, 2017). (Hepburn et al., 2019, p. 2)</p><p>When considering the net climate benefit after accounting for indirect and other impacts, it is important to distinguish between the carbon dioxide utilized by a pathway (CO2u) and the carbon dioxide removed from the atmosphere (CO2r) and the carbon dioxide stored in a repository (CO2s). Each thought is unique, although it has some degree of overlap with others and some relationship to the others. Carbon dioxide removal (CDR) is an outcome of certain carbon capture and utilisation (CCU) procedures. Carbon capture and storage (CCS) are components of several procedures. Direct air carbon capture and storage (DACCS) and carbon capture and storage (CCS) are two methods for removing carbon dioxide from the atmosphere, however CCS does not imply CDR. The potential climatic benefit of CCS and CDR is also subject to failure. (Hepburn et al., 2019, p. 2)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0JS4iZRu08pK_WdQcGgLJQ.jpeg" /><figcaption>Table1: Ten (10) CO2 utilisation and removal pathways (Hepburn et al., 2019, p. 5)</figcaption></figure><p><strong>Carbon Capture and Storage (CCS)</strong></p><p>It has been proposed that carbon capture and storage (CCS) technologies can be used to slow the rate at which large, stationary sources of carbon dioxide (CO2) release their emissions into the atmosphere by removing a substantial amount of CO2 from gas mixtures before they enter the atmosphere and storing the captured CO2 in underground reservoirs. Therefore, they may be used in industries (including steel and cement production, chemical manufacturing, and the last residues of fossil fuel power generation) where CO2 emissions are inevitable due to the nature of the process. Technological advancements in carbon dioxide removal (CDR) aim to take things a step further by getting rid of CO2 that already exists in the air. One definition of a NET is a CDR technology that generates zero net CO2 emissions since it runs on renewable energy and stores the collected CO2. Two notable NETs are CCS variants: bioenergy with carbon capture and storage (BECCS) and direct air carbon capture and storage (DACCS). (Erans et al., 2022, p. 1363)</p><p>Producing energy (usually electricity or perhaps liquid fuels) while simultaneously sequestering carbon dioxide from the atmosphere is the goal of bioenergy with carbon capture and storage (BECCS) (Langholtz et al., 2020, p. 2). Bioenergy with carbon capture and storage (BECCS) relies on photosynthetic processes to extract carbon from the atmosphere, with the resulting biomass then being utilised to generate energy or fuel. By 2050, 100–300 EJ yr-1 of primary energy equivalent of biomass might be deployed, notwithstanding significant uncertainty over the total amount of accessible biomass (especially in light of concerns over land use competition with food crops). BECCS offers not one but two different benefits to the world: bioenergy and CO2 removal from the air. (Hepburn et al., 2019, p. 2)</p><p>While this study does include a variety of cost estimates, most of them implicitly assume that no income is collected for the bioenergy services produced by the CO2 removal service. We estimate breakeven costs of between $60 and $160/t CO2 used, based on an approximation of those revenues derived from a range of wholesale energy prices across nations well-suited to host BECCS systems. In spite of the fact that researchers have developed models that include negative emissions technologies, scaling up bioenergy combined with carbon capture and storage remains a formidable obstacle. (Hepburn et al., 2019, p. 2)</p><p>The same quantity of carbon dioxide (CO2) must be sequestered by growing biomass for bioenergy technologies to be considered a net-zero emissions technology. The whole system (i.e., BECCS) may produce negative emissions if the combustion emissions are caught and stored (using, for example, typical CCS technology). Land, biomass, and storage availability are the key bottlenecks to widespread BECCS implementation. Emissions from land use change, such as those caused by deforestation and land use change driven by economic forces, are a negative aspect of BECCS. (Erans et al., 2022, p. 1365)</p><p>Because of its similarities, CCS and direct air carbon capture and storage (DACCS) are commonly used as synonyms. Whereas carbon capture and storage (CCS) aims to slow the rate at which a given process emits carbon dioxide (CO2), direct air capture and storage (DACCS) seeks to remove atmospheric CO2. CCS methods are thus advocated for large, stable sources of CO2, but not for dispersed and mobile sources. However, DACCS is increasingly being recommended as a NET since dispersed sources account for over half of worldwide CO2 emissions. Therefore, it is recommended that DACCS and CCS technologies be seen as mutually supportive, with DAC presenting some distinct potential benefits. For instance, the pollutants found in flue gases (SO2,NOx, etc.) that often decrease the performance and life span of CO2 sorbents are typically at lower levels in air processed by DAC plants. As an added bonus, DAC is not restricted to areas with big, stationary CO2 sources; it may be used almost anyplace (however, ideally this would be in proximity with both an energy source and CO2 storage site). (Erans et al., 2022, pp. 1365–1366)</p><p>DAC facilities can be co-located with renewable energy generation facilities to reduce transmission losses, and/or with CO2 storage facilities to minimise transport costs and infrastructure, which can have multiple benefits. For example, existing industries that operate on a relatively small scale won’t need to modify their processes, and facilities that produce CO2 in remote locations won’t need extensive CO2 transport infrastructure. DAC has several promising applications, but it also comes with some unknowns. The unique DAC-related issues on the financial, energy, and materials needs, as well as the social and political acceptability, should be addressed, as should the environmental hazards and uncertainties connected with CO2 storage (cost, long term monitoring, induced seismicity, and leaking). (Erans et al., 2022, p. 1365)</p><p>As of June of 2021, there are primarily two distinct DAC technologies in use. Carbon Engineering is the primary manufacturer of the first kind, which filters out CO2 from the air using a chemical process. With Carbon Engineering’s equipment, the cost per tonne of captured carbon dioxide is around $100. Climeworks, a Swiss company, has created a second form of DAC technology that makes use of amine absorbents in miniature, modular reactors. Current prices for this kind of DAC range from $600 to $800 per tonne of CO2 removed, however it is anticipated that these costs may be reduced because to the modular design and the utilisation of waste heat in place of extra energy. Climeworks’ biggest facility in Switzerland now removes 900 tonnes of CO2 per year, which is the carbon sequestration equivalent of almost 36,000 trees. (Yoshida, 2021)</p><p><strong>Ways to use direct air captured</strong></p><p>CO2 taken from the air may be used directly or used as a feedstock in the creation of valuable goods such as chemicals or fuels, although geological storage of CO2 should be the main target of climate change mitigation measures (i.e., DACCS). By reusing a resource that would otherwise be buried underground, reusing CO2 may reduce the overall costs of DAC technologies. (Erans et al., 2022, p. 1365)</p><p><strong>Enhanced Oil Recovery (EOR)</strong></p><p>Oil from partially exhausted oil fields may be recovered using captured CO2 and a process called enhanced oil recovery (EOR). If the CO2 is caught from the air via DAC, it seems counterintuitive to utilise it to extract additional oil that would create CO2 by burning. (Erans et al., 2022, p. 1366)</p><p><strong>CO2 Conversion to Fuels and Chemicals</strong></p><p>Capturing CO2 and using it to make gasoline, diesel, and jet fuel as well as compounds like methanol, methane, formic acid, and formaldehyde is an attractive option to enhanced oil recovery (EOR) in certain circumstances. In one way or another, these goods may take the place of more common fossil fuels. The use of fuels allows for the continued use of existing transportation infrastructure and has the potential to decarbonize traditionally difficult-to-target industries like shipping and flying. Methane is already a vital component in the generation of renewable energy, thermal energy, and chemical products. Sustainable sources of methane, which are typically found in natural gas, are referred to as substitute natural gas (SNG). (Erans et al., 2022, p. 1366)</p><p><strong>Products from microalgae</strong></p><p>Algae are being used in new designed applications. One such proposal is ABECCS (algae and bioenergy with carbon capture and storage), in which terrestrial biomass is burned to generate power, with some of the collected CO2 being utilised in algae production and the remainder being stored. Second, research into microbial carbon capture cells (MCCs) for reducing CO2 emissions has shown that by diverting the off gas to an algal cathode chamber, waste water can be treated, algae can grow, and electricity can be generated through a voltage change with no further energy input. (Erans et al., 2022, p. 1366)</p><p>Autotrophic organisms, including algae, convert CO2 into organic carbon via a process called “biological carbon fixation.” Forty percent of the planet’s yearly carbon fixation comes from photosynthesis in the water. This means that algae may be grown and used in designed systems, such as DAC or with CO2-enriched air. Microalgae grow rapidly, doubling in population on the timeframe of a few hours, and have 10 times greater solar energy conversion efficiency into biomass than terrestrial plants. Also, microalgae may be used to make a wide variety of useful items, including food, biofuels, cosmetics, etc. But the fundamental problem is that the medium can’t absorb enough air to make up for the mass transfer to the air. Algae’s ability to absorb CO2 is also influenced by environmental factors including temperature and light levels. CO2 fixation rates have been shown to increase with both temperature and light intensity. (Erans et al., 2022, p. 1366)</p><p>As of June of 2021, there are primarily two distinct DAC technologies in use. Carbon Engineering is the primary manufacturer of the first kind, which filters out CO2 from the air using a chemical process. With Carbon Engineering’s equipment, the cost per tonne of captured carbon dioxide is around $100. Climeworks, a Swiss company, has created a second form of DAC technology that makes use of amine absorbents in miniature, modular reactors. Current prices for this kind of DAC range from $600 to $800 per tonne of CO2 removed, however it is anticipated that these costs may be reduced because to the modular design and the utilisation of waste heat in place of extra energy. Climeworks’ biggest facility in Switzerland now removes 900 tonnes of CO2 per year, which is the carbon sequestration equivalent of almost 36,000 trees.</p><p><strong>Conclusion</strong></p><p>If carbon dioxide were caught and utilised to produce valuable things, the net costs of reducing emissions or removing carbon dioxide from the atmosphere may be decreased. In this article, we explored ten distinct options. While chemicals, fuels, and microalgae may all help reduce emissions, they provide no means of removing carbon dioxide from the atmosphere. Agricultural production and carbon dioxide removal may both be improved through land-based routes. Still, substantial obstacles and limited resources prevent the simultaneous implementation of all approaches. (Hepburn et al., 2019, p. 1)</p><p>Improved energy efficiency, the creation of a circular economy, conventional decarbonization, and the adoption of more sustainable habits are all necessary in addition to DAC (and other NETs). Among the several NETs and CCS-related technologies, DAC stands out for a few key benefits. It is important to take full use of these benefits, but there is still more that can be done. For instance, CO2 utilisation is a key technical enabler in almost all situations of DAC adoption. Nonetheless, it is well-known that CO2 use (in comparison to storage) is less-than-ideal for reducing greenhouse gas emissions and hence, climate change. As a result, DAC combined with geological storage (DACCS) should be actively pushed for implementation. In the short-term, it may be helpful to showcase DAC technology in settings where CO2 use is economically advantageous, but this shouldn’t be a distraction. (Erans et al., 2022, p. 1395)</p><p>It’s important for policymakers and practitioners to keep in mind that increasing CO2 utilisation might not be good for the climate. Instead of trying to promote utilisation per se, policy should aim to incentivize genuine emission reductions and removals on a life cycle basis, thereby providing incentives for the deployment of CO2 utilisation that is climate beneficial. (IPCC, 2022, pp. 2205–2207)</p><p><strong>References</strong></p><p>Beerling, D. J., Kantzas, E. P., Lomas, M. R., Wade, P., Eufrasio, R. M., Renforth, P., Sarkar, B., Andrews, M. G., James, R. H., &amp; Pearce, C. R. (2020). Potential for large-scale CO2 removal via enhanced rock weathering with croplands. <em>Nature</em>, <em>583</em>(7815), 242–248.</p><p>Bellamy, R., &amp; Geden, O. (2019). Govern CO2 removal from the ground up. <em>Nature Geoscience</em>, <em>12</em>(11), 874–876.</p><p>Erans, M., Sanz-Pérez, E. S., Hanak, D. P., Clulow, Z., Reiner, D. M., &amp; Mutch, G. A. (2022). Direct air capture: Process technology, techno-economic and socio-political challenges. <em>Energy &amp; Environmental Science</em>, <em>15</em>(4), 1360–1405. <a href="https://doi.org/10.1039/D1EE03523A">https://doi.org/10.1039/D1EE03523A</a></p><p>Hepburn, C., Adlen, E., Beddington, J., Carter, E. A., Fuss, S., Mac Dowell, N., Minx, J. C., Smith, P., &amp; Williams, C. K. (2019). The technological and economic prospects for CO2 utilization and removal. <em>Nature</em>, <em>575</em>(7781), 87–97.</p><p>IPCC. (2022). Summary for policy makers. Climate change: Mitigation of climate change. IPCC.</p><p>Langholtz, M., Busch, I., Kasturi, A., Hilliard, M. R., McFarlane, J., Tsouris, C., Mukherjee, S., Omitaomu, O. A., Kotikot, S. M., &amp; Allen-Dumas, M. R. (2020). The economic accessibility of CO2 sequestration through bioenergy with carbon capture and storage (BECCS) in the US. <em>Land</em>, <em>9</em>(9), 299.</p><p>Sackler Forum. (2017). <em>Sackler Forum: Dealing with carbon dioxide at scale</em>. 32.</p><p>Yoshida, H. (2021). Direct air capture: costs, benefits, and the future. The University of Pennsylvania. <a href="https://riskcenter.wharton.upenn.edu/lab-notes/directaircapture/">https://riskcenter.wharton.upenn.edu/lab-notes/directaircapture/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=569378f5cf8a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Coffee Shortage on the Horizon: Why We Should Increase Imports]]></title>
            <link>https://medium.com/@samadebisi12/coffee-shortage-on-the-horizon-why-we-should-increase-imports-fe0c6743f062?source=rss-61746b167c43------2</link>
            <guid isPermaLink="false">https://medium.com/p/fe0c6743f062</guid>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[coffee]]></category>
            <category><![CDATA[power-bi]]></category>
            <category><![CDATA[data-analysis]]></category>
            <dc:creator><![CDATA[Adeosun Osungbesan]]></dc:creator>
            <pubDate>Sat, 27 May 2023 13:16:53 GMT</pubDate>
            <atom:updated>2023-05-27T13:16:53.412Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qNkkbwYed6DZap22YuQRmw.jpeg" /><figcaption>Image of a coffee cafe.</figcaption></figure><p><strong>Introduction</strong></p><p>Coffee is the second most traded and consumed commodity in the world, after oil. This drink is enjoyed by a substantial proportion of the world’s population. The coffee crop is made up of the seeds of a cherry-like fruit on a tree native to the equatorial and subtropical regions that can grow up to 1,800 meters in altitude. A mature coffee tree can grow to be over 20 meters tall and remain green all year. There are two main varieties. Arabica and Robust are the varieties available. The global production ratio of Arabica to Robusta is 80:20. Arabica is the more delicate of the two, requiring higher elevations (at least 900 meters) and greater precision than Robusta. This means that Arabica is often grown in mountainous places that are well-suited to coffee growth. Arabica is grown in the tropics and equatorial regions of America, Africa, and Asia during the spring or the hot and humid summer. The Robusta variety is more resistant to tropical heat and parasites, and it is grown at a lower altitude, resulting in a lower price. This article focuses on the supply and demand aspects of the worldwide coffee market. (Slavova &amp; Georgieva, 2019)</p><p><strong>Data used for this analysis</strong></p><p>The coffee datasets utilized in this analysis are from the International Coffee Organisation. The dataset contains information about coffee production and consumption, including green coffee inventories and industry export and import data. JupyterLab Python notebook transformed the data into a usable form. However, the datasets were obtained as cleaned data from the Kaggle website. The zip file containing the coffee dataset contains seven Excel files: coffee domestic consumption, coffee export, coffee green coffee inventories, coffee import, coffee importers consumption, coffee production, and coffee re-export.</p><p><strong>Data Analysis</strong></p><p>The datasets have no empty cells because they were filled during the cleaning procedure. The data types were configured correctly. There are 55 coffee-producing countries, which correspond to coffee exporting countries and the consumption of coffee producers. Coffee-importing nations are the same as coffee-consuming countries and coffee-re-exporting countries. The final table shows the coffee green coffee inventories, which include reserves from importing countries, while some European coffee reserves are listed as Unspecified EU stocks.</p><p>Microsoft Power BI was used to analyze and visualize the Excel files. Power Query Editor was used for transforming the datasets. The last column of the seven Excel files, which represented the total values of the years’ results, was appropriately removed. Then, in the coffee domestic consumption and coffee production tables, the date (year) columns were renamed to a single year. For example, 1990/91 to 1990, and so on.</p><p>The date (year) columns were then unpivoted in all of the files to form two columns having the year attributes and values. As a result, the files had numerous occurrences of countries in the rows. The attribute was named year, and the values were named based on the file content. The year table and the country’s table were both created and added to the files.</p><p>In model view, relationships were established between the tables by using the country columns as the primary and foreign keys. Using the country column, coffee production was linked to coffee domestic consumption and coffee export. Coffee import was linked to importer consumption, coffee re-export, and green coffee inventories. Individual country and year tables were linked to coffee production and coffee import. These relationship connections were active. There are two inactive relationship links between the year table and coffee domestic consumption and coffee export. The datasets were used to create ten pages of visualization.</p><p><strong>Results and discussion</strong></p><p>The most prominent coffee-producing country from 1990 to 2019 as depicted in Figure 1 below, is Brazil. Brazil has been the leader in coffee production over the whole thirty-year period. Its production levels surpassed seventy billion sixty-kilogram bags of coffee during the period and have averaged around three billion per year since 2010. This country is the main producer of the two distinct coffee types. Around 80% of coffee beans grown in Brazil are Arabica varieties. The country is the world’s largest coffee grower but it also has a high consumption and export rate. Vietnam is the next largest producer, although with comparatively low consumption compared to significant exportation. Colombia is the third producer, with low consumption relative to significant exportation.</p><p>The second clustered column demonstrates that the United States of America is the largest importing country while having such a high consumption rate in comparison to the re-export rate. Germany is the second largest importer, with a consumption rate that is nearly identical to the re-export rate. Other countries in this group have a low rate of re-export and a high rate of consumption of imported coffee. Finland consumed approximately 90% of its imported coffee and had a low rate of re-export.</p><p>Figure 2 depicts the rise in coffee consumption rates in both producing and importing countries using a line graph visualization. In 2019, the producers’ consumption is estimated to be 3 billion, while importers’ consumption is estimated to be 5 billion. Figure 3 depicts a decrease in coffee production in 2019. The second line graph shows a significant reduction in exports in 2019, from approximately 7.8 billion to approximately 3.5 billion.</p><p>Figure 4 depicts coffee production by country. Brazil was proven to be the single determinant of the coffee business. Brazil’s production fell sharply in 2019, causing a significant reduction in global exports. Figure 5 depicts the consumption of coffee producers by country and the consumption of coffee importers by country. It demonstrates that coffee consumption in Brazil is steadily increasing. On the other hand, despite being an importer, coffee consumption in the United States is steadily increasing.</p><p>Figure 6 depicts the importing countries’ green coffee inventories. Total inventories for 2019 were a little less than 1.5 billion, far less than the consumption value of 5.5 billion in 2019. As a result, inventories cannot match demand in 2020 if demand remains constant, which is unlikely given the rising consumption rate. The United States, on the other hand, has 0.4 billion inventories, which will not be enough to meet demand in 2020 if current trends continue.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AFVRLpvsZPHy1WxeQz7Jtg.jpeg" /><figcaption>Figure 1</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gaTVz86OM6rUSE0kZ0wchA.jpeg" /><figcaption>Figure 2</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jqXsTpHEIXu21AllQI-Rzw.jpeg" /><figcaption>Figure 3</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aLe9_t28_ssWo4Ee2MLyFg.jpeg" /><figcaption>Figure 4</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hxOluwyCz8RFfOvYZJYsvQ.jpeg" /><figcaption>Figure 5</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-XlyLzycMElT9A-D-mnOKg.jpeg" /><figcaption>Figure 6</figcaption></figure><p><strong>Recommendation</strong></p><p>To prepare for the impending coffee draught, it is recommended that we stock more than usual, from high-producing but low-consuming countries like Vietnam and Colombia, in order to stay in business and also to position ourselves for greater advantage in re-exporting more to countries in need, particularly the United States.</p><p><strong>References</strong></p><p>Slavova, G., &amp; Georgieva, V. (2019). World production of coffee imports and exports in Europe, Bulgaria and USA. <em>Trakia J Sci</em>, <em>17</em>(Suppl 1), 619–626.</p><p><em>Coffee dataset</em>. (n.d.). Retrieved May 9, 2023, from <a href="https://www.kaggle.com/datasets/michals22/coffee-dataset">https://www.kaggle.com/datasets/michals22/coffee-dataset</a> (All data are available from the official ICO website: <a href="https://www.ico.org/new_historical.asp">https://www.ico.org/new_historical.asp</a> Data were brought into usable form by JupyterLab Python notebook. For more details about notebook visit repo: <a href="https://github.com/MSI17819/Coffee_data_analysis/blob/main/Coffee_codeimpro.ipynb">https://github.com/MSI17819/Coffee_data_analysis/blob/main/Coffee_codeimpro.ipynb</a>)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fe0c6743f062" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The concept of programming]]></title>
            <link>https://medium.com/@samadebisi12/the-concept-of-programming-dbdbf04d5368?source=rss-61746b167c43------2</link>
            <guid isPermaLink="false">https://medium.com/p/dbdbf04d5368</guid>
            <category><![CDATA[c-language]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Adeosun Osungbesan]]></dc:creator>
            <pubDate>Sun, 27 Nov 2022 10:30:37 GMT</pubDate>
            <atom:updated>2022-11-27T11:18:58.438Z</atom:updated>
            <content:encoded><![CDATA[<h4>Steps involved in writing a computer program</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ewyIKofU7KuZgOEP5EA9dQ.jpeg" /></figure><p>A programming language is a formal framework for specifying the actions to be performed by a computer. However, there is more than one programming language available. Both syntax and semantics are essential to the functioning of a computer language. When discussing a language’s syntax and semantics, syntax refers to how the language’s well-formed programs look and semantics to what those programs really imply. A grammar or syntax chart formalizes the syntax of a language; you may find one in the back of most language guides. A formalization of a language’s semantics is necessary so that it may be included in the reference manual. <em>(Schmidt, 1996, p. 1)</em></p><p><strong>Tasks Performed by Programmers</strong><br><br>In most cases, a programmer’s duties include translating human-created solutions to problems into machine-readable form. To put it another way, a programmer is the person responsible for creating, testing, and refining a computer program, from its first conception to its final execution. A report about the application is also written by the developer. Paying workers, charging consumers, and enrolling students are all examples of these kinds of operations done to assist users meet a demand. <em>(Sanner, n.d.)</em></p><p><strong>How Computers Are Programmed</strong></p><p>Program creation follows a process that’s familiar to anybody who’s ever solved an issue. In general, programming requires the following five things:<br>1) Problem Statement<br>2) Formulate a strategy<br>3) Writing the Program Code<br>4) Testing the Program<br>5) Program Documentation</p><p>Let’s discuss them in detail.<br><strong>1) Problem Statement</strong><br>A systems analyst or client-side users are consulted for insight into the project at hand. To define the issue, you must first determine the information you already possess (the input) and the outcome you’re hoping to achieve (output-the result). Sometime later, you arrive at a formal agreement that includes such details as the acceptable forms of input, the nature of the processing to be performed, and the desired results. As you can see, this is no easy task. <em>(Ince et al., 2012)</em></p><p><strong>2) Formulate a strategy</strong><br>Creating a flowchart or writing pseudocode are two basic approaches to problem-solving planning. A flowchart is a visual depiction of a process that may be followed to solve an issue. It’s has arrows that point where the program goes and boxes and other symbols that stand in for the things that are done. A program’s design document lays out the steps that will be taken to implement the program’s intended functionality. Standard flowchart symbols have been created by the American National Standards Institute (ANSI). The symbols and their potential applications in a simple flowchart of a mundane but necessary task, such as preparing a letter for sending, are shown in Figure 1 below. <em>(Pryor, 1981)</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/516/1*G243Zsj9g7_Yqbkb-Alljg.jpeg" /><figcaption>Figure 1: A representation of flowchart symbols and a sample messaging flowchart.</figcaption></figure><p>Pseudocode is a non-standard language that is similar to English and allows you to explain your answer with more accuracy than you would be able to use regular English but with less precision than is necessary when using a formal programming language. By using pseudocode, you may concentrate on the logic of your program without worrying about the syntax of any one programming language just yet. On the other hand, computers cannot really run pseudocode. <em>(Pryor, 1981)</em></p><p><strong>3) Writing the Program Code<br></strong>The next step for you as the programmer is to write the code for the program, or to describe your answer in a computer programming language. You&#39;ll be converting the reasoning shown in a flowchart, pseudocode, or another tool into an actual computer language. Previously, we established that a programming language is a collection of rules that allows us to tell a computer what to do. Examples of programming languages include BASIC, COBOL, Pascal, FORTRAN, and C.</p><p>Programming languages are grammatically structured like English, but they are significantly more exact. If you want your code to run correctly, you must adhere strictly to the syntax of the language you&#39;re using. Even if you use perfect grammar in English, it doesn&#39;t ensure you know what you&#39;re talking about or that your code will run without errors. The gist is that proper language use is a necessary prerequisite. Next, your program&#39;s code must be entered in a form that the computer can comprehend, most often on a terminal or personal computer. <em>(‘Structure and Interpretation of Computer Programs, (Second Edition)’, 1997)</em></p><p><strong>4) Testing the Program<br></strong>Many professionals argue that it is possible to produce a flawless first draft of a well-thought-out computer program. In reality, they argue, it is possible to demonstrate the correctness of a program by mathematical means. However, because the world is still imperfect, most programmers resign themselves to the fact that their freshly developed programs will likely include some flaws. Given that most programmers are detail-oriented perfectionists who take great pleasure in their work, this might be disheartening to hear at first. However, there are several entry points for error in software, and you, like many others before you, will likely discover plenty of them.</p><p>After the software has been written, it must be tested on a computer. These stages make up this step:</p><p><strong>• Desk-checking.</strong> Like proofreading, this step is occasionally skipped by a programmer who is anxious to have their code running on the computer as soon as possible. However, if you inspect your desk thoroughly, you just could find multiple mistakes and save yourself some time. Desk-checking is sitting at a computer and mentally tracing the program&#39;s logic to look for bugs and make sure it will function as intended. A walkthrough is a step further that is taken by many companies at this phase, in which a team of other programmers reviews your code and provides ideas in a friendly and constructive manner. <em>(‘Structure and Interpretation of Computer Programs, (Second Edition)’, 1997)</em></p><p><strong>• Translating.</strong></p><p>i. A translator is a piece of software that takes the source code you&#39;ve written and converts it into a format that computers can comprehend, after first checking for syntax errors and providing you with diagnostics on where you went wrong. A side effect of using a translator is that it will inform you if you have made any mistakes in the way you have utilized the programming language. Syntax errors are made when the language&#39;s rules are broken. Common names for these languages include scripting languages and interpreted languages. These languages allow for the extension and modification of ongoing applications without the need to stop the program, recompile it, or restart it. Even if only a tiny portion of the whole program has been created, code may be run and tested as it is written, allowing for the quick exploration of innovative hypotheses and the early discovery of design problems. <em>(Sanner, n.d.)</em></p><p>ii. A compiler is the tool most often used to translate programs. With the help of a compiler, you may have your complete program translated at once. Your original software, known as a source module, is converted by a compiler into an object module during the translation process. During the link/load step, a load module may be created by including prewritten programs from a system library. The computer will be able to run the load module after this. The compiler&#39;s changes to a program shouldn&#39;t alter its intended functionality. The most straightforward approach is to insist that the modified program executes the same set of instructions as the original, but in the specific sequence dictated by the language&#39;s semantics. There is little potential for growth, though, with such a literal reading. <em>(Bacon et al., 1994)</em></p><p><strong>• Debugging.</strong> Debugging is a common programming phrase that refers to the process of finding and fixing errors in a program during execution. These flaws are logical mistakes, such as instructing a machine to do an action several times without providing instructions on when to stop. At this point, you put the software through its paces using mock data. In order to ensure that the whole program is tested, careful planning of the test data is required. <em>(Ince et al., 2012)</em></p><p><strong>5) Program Documentation<br></strong>Although you may share the sentiment of many programmers and be anxious to move on to other interesting computer-centered pursuits, documentation is a continual, important activity. Documentation is a written record of the development process and the program&#39;s specifics. The history and context of the issue, a high-level overview of the program, logic aids like flowcharts and pseudocode, data-record descriptions, program listings, and test results are all part of the standard fare of program documentation resources. Documentation is not limited to just the printed page, however; comments inside the code itself are crucial. As they work, many programmers provide detailed documentation. The documentation for a system may include the documentation for its programs. <em>(Pryor, 1981)</em></p><p>Throughout the phases of software design, development, and testing, a sage programmer keeps detailed documentation. To aid in program planning and to augment human memory, documentation is essential. Program documentation is also important for sharing information with interested parties, such as other programmers who could be working on the project. As a result, written documentation is required so that others who follow after you may make any necessary changes to the software or hunt down any faults that you missed due to the high rate of turnover in the computer business. <em>(Ince et al., 2012)</em></p><p>Classifying and describing programming languages by where they fall on a spectrum from low to high level is another viable option. We shall consider a language to be &quot;high-level&quot; if it includes: high-level data structures like lists and associative arrays; exception handling to avoid program termination on error; array boundary checking; and automated memory management. Any given language will rise in the rankings depending on how many of these elements it offers. As a rule, interpreted languages are more advanced than compiled ones. <em>(Sanner, n.d.)</em></p><p><strong>References </strong><br>Bacon, D. F., Graham, S. L., &amp; Sharp, O. J. (1994). Compiler transformations for high-performance computing. ACM Computing Surveys, 26(4), 345–420. https://doi.org/10.1145/197405.197406<br>Ince, D. C., Hatton, L., &amp; Graham-Cumming, J. (2012). The case for open computer programs. Nature, 482(7386), 485–488. https://doi.org/10.1038/nature10836<br>Pryor, L. L. (1981). DEVELOPING AND MANAGING A LARGE COMPUTER PROGRAM. 6.<br>Sanner, M. F. (n.d.). The Python interpreter as a framework for integrating scientific computing software-components. 12.<br>Schmidt, D. A. (1996). Programming Language Semantics. ACM Computing Surveys, 28(1), 3.<br>Structure and interpretation of computer programs, (second edition). (1997). Computers &amp; Mathematics with Applications, 33(4), 133. https://doi.org/10.1016/S0898-1221(97)90051-1</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dbdbf04d5368" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>