<?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"><channel><title><![CDATA[Ramu Chelloju]]></title><description><![CDATA[As an experienced DevOps Engineer with expertise in both Azure and AWS, I am dedicated to enabling efficient and secure software development and deployment usin]]></description><link>https://blog.learndev.in</link><image><url>https://cdn.hashnode.com/res/hashnode/image/upload/v1769008788637/52337d34-7d2e-4122-858b-1508a9067b98.png</url><title>Ramu Chelloju</title><link>https://blog.learndev.in</link></image><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Apr 2026 22:50:17 GMT</lastBuildDate><atom:link href="https://blog.learndev.in/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[The DevOps & System Design Cheat Sheet: DNS, SQL vs NoSQL, and Queues]]></title><description><![CDATA[While working on real DevOps projects, I realized one thing:
✅ Deploying an app is not only about commands…✅ It’s about understanding what happens behind the scenes
So today I revised and wrote short notes on these important concepts:

HTTP status co...]]></description><link>https://blog.learndev.in/devops-system-design-cheat-sheet-dns-sql-nosql-queues</link><guid isPermaLink="true">https://blog.learndev.in/devops-system-design-cheat-sheet-dns-sql-nosql-queues</guid><category><![CDATA[Devops]]></category><category><![CDATA[System Design]]></category><category><![CDATA[sysadmin]]></category><category><![CDATA[AWS]]></category><category><![CDATA[SQL]]></category><category><![CDATA[NoSQL]]></category><category><![CDATA[queue]]></category><category><![CDATA[dns]]></category><category><![CDATA[Cloud Computing]]></category><dc:creator><![CDATA[Ramu Chelloju]]></dc:creator><pubDate>Wed, 21 Jan 2026 15:35:58 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1769008617670/534a910c-6306-497d-8690-0651e39134c1.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>While working on real DevOps projects, I realized one thing:</p>
<p>✅ Deploying an app is not only about commands…<br />✅ It’s about understanding <strong>what happens behind the scenes</strong></p>
<p>So today I revised and wrote short notes on these important concepts:</p>
<ul>
<li><p>HTTP status codes (1xx to 5xx)</p>
</li>
<li><p>DNS record types</p>
</li>
<li><p>3-tier architecture (Frontend → Backend → Database)</p>
</li>
<li><p>SQL vs NoSQL</p>
</li>
<li><p>Polyglot persistence (multiple databases in one system)</p>
</li>
<li><p>Queues (why they are used in system design)</p>
</li>
</ul>
<p>This post is written in a simple beginner-friendly way, but with real-world understanding.</p>
<p><em>👋 If you found this article helpful and want to follow my</em> <strong><em>DevOps + System Design learning journey*</em></strong>,<br />connect with me on LinkedIn 👉<em> [**</em>Ramu Chelloju<em>*</em>](https://www.linkedin.com/in/ramuchelloju/)</p>
<h1 id="heading-3-tier-architecture-frontend-backend-database">3-Tier Architecture (Frontend → Backend → Database)</h1>
<p>Most real applications follow <strong>3-tier architecture</strong>:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769009138674/1d822b8d-7153-4be8-9edf-53324571294c.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-1-frontend-ui-layer">1) Frontend (UI Layer)</h3>
<ul>
<li><p>Runs in browser</p>
</li>
<li><p>React / Angular / HTML CSS JS</p>
</li>
<li><p>Communicates via APIs</p>
</li>
</ul>
<h3 id="heading-2-backend-application-layer">2) Backend (Application Layer)</h3>
<ul>
<li><p>Implements business logic</p>
</li>
<li><p>REST APIs</p>
</li>
<li><p>Authentication, validation, processing</p>
</li>
</ul>
<h3 id="heading-3-database-data-layer">3) Database (Data Layer)</h3>
<p>Stores data.</p>
<p>Common DB options:</p>
<ul>
<li><p><strong>MySQL/PostgreSQL</strong> (SQL)</p>
</li>
<li><p><strong>MongoDB/DynamoDB</strong> (NoSQL)</p>
</li>
<li><p><strong>Redis</strong> (Caching / sessions)</p>
</li>
<li><p><strong>RabbitMQ/Kafka</strong> (Queue / streaming)</p>
</li>
</ul>
<p>This separation makes the system scalable and manageable.</p>
<hr />
<h1 id="heading-sql-vs-nosql-simple-comparison">SQL vs NoSQL (Simple Comparison)</h1>
<p>There is no “best database”.<br />We choose based on requirement.</p>
<hr />
<h2 id="heading-sql-databases-relational">SQL Databases (Relational)</h2>
<p>Examples:</p>
<ul>
<li><p>MySQL</p>
</li>
<li><p>PostgreSQL</p>
</li>
<li><p>Oracle</p>
</li>
<li><p>MS SQL</p>
</li>
</ul>
<h3 id="heading-features">Features:</h3>
<p>✅ Fixed schema (tables, rows, columns)<br />✅ Strong consistency (ACID)<br />✅ Best for relational data<br />✅ Excellent for transactions and banking</p>
<h3 id="heading-example-use-case">Example use case:</h3>
<ul>
<li><p>Orders</p>
</li>
<li><p>Payments</p>
</li>
<li><p>Billing</p>
</li>
<li><p>User accounts</p>
</li>
</ul>
<hr />
<h2 id="heading-nosql-databases">NoSQL Databases</h2>
<p>Examples:</p>
<ul>
<li><p>MongoDB</p>
</li>
<li><p>DynamoDB</p>
</li>
<li><p>Cassandra</p>
</li>
<li><p>Redis</p>
</li>
</ul>
<h3 id="heading-features-1">Features:</h3>
<p>✅ Flexible schema (JSON documents / key-value)<br />✅ Easy to scale horizontally<br />✅ Faster for certain workloads<br />✅ Best for unstructured or semi-structured data</p>
<h3 id="heading-example-use-case-1">Example use case:</h3>
<ul>
<li><p>product catalogs</p>
</li>
<li><p>activity logs</p>
</li>
<li><p>recommendations</p>
</li>
<li><p>caching</p>
</li>
</ul>
<hr />
<h1 id="heading-polyglot-persistence-modern-system-design-concept">Polyglot Persistence (Modern System Design Concept)</h1>
<p>In modern systems, we don’t use only one database.</p>
<p>Instead we use multiple databases in one application based on needs.</p>
<p>Example architecture:</p>
<p>✅ <strong>MySQL</strong> → core transactional data (users, billing)<br />✅ <strong>Redis</strong> → caching + sessions<br />✅ <strong>MongoDB/DynamoDB</strong> → product catalog or logs<br />✅ <strong>Elasticsearch</strong> → searching and analytics</p>
<p>This approach is called:</p>
<h3 id="heading-polyglot-persistence">✅ Polyglot Persistence</h3>
<p>Meaning:</p>
<blockquote>
<p>Using multiple data storage technologies within a single application.</p>
</blockquote>
<hr />
<h1 id="heading-why-queues-matter-queue-decoupling">Why Queues Matter (Queue = Decoupling)</h1>
<p>A <strong>queue</strong> is like a buffer that holds messages until they are processed.</p>
<h3 id="heading-without-queue-tightly-coupled">Without Queue (Tightly Coupled)</h3>
<p>Service A calls Service B directly using REST.</p>
<p>Problem:<br />If Service B is down → Service A fails → user gets <strong>500 error</strong></p>
<hr />
<h3 id="heading-with-queue-loosely-coupled">With Queue (Loosely Coupled)</h3>
<p>Service A sends message to queue (SQS / RabbitMQ)<br />Service B will process later when it is available.</p>
<p>✅ Even if Service B is down, messages remain safe<br />✅ Service B can come back later and process<br />✅ This improves reliability and scalability</p>
<h3 id="heading-examples-of-queues">Examples of queues:</h3>
<ul>
<li><p>AWS SQS</p>
</li>
<li><p>RabbitMQ</p>
</li>
<li><p>Kafka (event streaming)</p>
</li>
</ul>
<p>This is one of the most important <strong>system design fundamentals</strong>.</p>
<h2 id="heading-quick-devops-troubleshooting-commands-backend-check">✅ Quick DevOps Troubleshooting Commands (Backend Check)</h2>
<p>When your backend service is not responding, these are super useful:</p>
<h3 id="heading-check-service-status">Check service status</h3>
<pre><code class="lang-plaintext">systemctl status &lt;service-name&gt;
</code></pre>
<h3 id="heading-check-which-process-is-running-example-nodejs">Check which process is running (example Node.js)</h3>
<pre><code class="lang-plaintext">ps -ef | grep node
</code></pre>
<h3 id="heading-check-which-port-is-listening">Check which port is listening</h3>
<pre><code class="lang-plaintext">netstat -lntp
</code></pre>
<h3 id="heading-check-application-health-endpoint">Check application health endpoint</h3>
<pre><code class="lang-plaintext">curl http://localhost:8080/health
</code></pre>
<p>In real deployments, these 4 commands are enough to debug many issues quickly.</p>
<hr />
<h1 id="heading-http-status-codes-most-important-for-devops-apis">✅ HTTP Status Codes (Most Important for DevOps + APIs)</h1>
<p>When we call an API, we receive an HTTP response code.<br />Understanding these codes helps you debug issues faster.</p>
<hr />
<h2 id="heading-1xx-informational">1xx — Informational</h2>
<p>These responses mean: “Request received, continuing…”</p>
<p>Example:</p>
<ul>
<li><strong>100 Continue</strong> → server says “you can continue sending request body”</li>
</ul>
<p>Not used very often in day-to-day DevOps debugging, but good to know.</p>
<hr />
<h2 id="heading-2xx-success">✅ 2xx — Success</h2>
<p>These mean the request succeeded.</p>
<p>Common 2xx codes:</p>
<h3 id="heading-200-ok"><strong>200 OK</strong></h3>
<p>✅ Request succeeded</p>
<p>Example:</p>
<ul>
<li><p>GET request returns data</p>
</li>
<li><p>Health API returns status</p>
</li>
</ul>
<h3 id="heading-201-created"><strong>201 Created</strong></h3>
<p>✅ Resource created successfully</p>
<p>Example:</p>
<ul>
<li>POST request created a new expense record</li>
</ul>
<h3 id="heading-204-no-content"><strong>204 No Content</strong></h3>
<p>✅ Request succeeded, but server returns no content</p>
<p>Example:</p>
<ul>
<li>DELETE success but no response body returned</li>
</ul>
<hr />
<h2 id="heading-3xx-redirection">✅ 3xx — Redirection</h2>
<p>These mean the resource is available, but at a different location.</p>
<h3 id="heading-301-moved-permanently"><strong>301 Moved Permanently</strong></h3>
<p>✅ Permanent redirection<br />Example: HTTP → HTTPS</p>
<h3 id="heading-302-found-temporary-redirect"><strong>302 Found (Temporary Redirect)</strong></h3>
<p>✅ Temporary redirection<br />Example: short time redirect to another URL</p>
<h3 id="heading-304-not-modified"><strong>304 Not Modified</strong></h3>
<p>✅ Resource not changed (browser uses cache)</p>
<p>This is why sometimes changes don’t reflect immediately due to caching.</p>
<hr />
<h2 id="heading-4xx-client-side-errors">✅ 4xx — Client Side Errors</h2>
<p>These happen due to wrong request from client (frontend/Postman/user).</p>
<h3 id="heading-400-bad-request"><strong>400 Bad Request</strong></h3>
<p>Client request is wrong<br />Example:</p>
<ul>
<li><p>invalid JSON</p>
</li>
<li><p>missing required field</p>
</li>
</ul>
<h3 id="heading-401-unauthorized"><strong>401 Unauthorized</strong></h3>
<p>Authentication failed / token missing<br />Example:</p>
<ul>
<li>no login token provided</li>
</ul>
<h3 id="heading-403-forbidden"><strong>403 Forbidden</strong></h3>
<p>User is authenticated but has no permission<br />Example:</p>
<ul>
<li>you are logged in but not allowed to access</li>
</ul>
<h3 id="heading-404-not-found"><strong>404 Not Found</strong></h3>
<p>Resource/API endpoint not found<br />Example:</p>
<ul>
<li>wrong API path <code>/api/transacton</code> instead of <code>/api/transaction</code></li>
</ul>
<hr />
<h2 id="heading-5xx-server-side-errors">✅ 5xx — Server Side Errors</h2>
<p>These happen due to issues in server/backend/database.</p>
<h3 id="heading-500-internal-server-error"><strong>500 Internal Server Error</strong></h3>
<p>Backend crashed or unhandled error occurred.</p>
<p>Common reasons:</p>
<ul>
<li><p>Node.js exception</p>
</li>
<li><p>DB connection failure</p>
</li>
<li><p>wrong environment variables</p>
</li>
</ul>
<h3 id="heading-503-service-unavailable"><strong>503 Service Unavailable</strong></h3>
<p>Service is down / overloaded.</p>
<p>Example:</p>
<ul>
<li><p>backend is stopped</p>
</li>
<li><p>load balancer returns 503</p>
</li>
</ul>
<hr />
<h1 id="heading-dns-record-types-most-common-and-practical">✅ DNS Record Types (Most Common and Practical)</h1>
<p>DNS controls how domain names map to services.</p>
<h3 id="heading-ns-record-name-server"><strong>NS Record — Name Server</strong></h3>
<p>NS tells who manages your domain DNS.</p>
<p>Example:</p>
<ul>
<li><p>Route53 gives NS records</p>
</li>
<li><p>You update them at domain registrar</p>
</li>
</ul>
<h3 id="heading-soa-start-of-authority"><strong>SOA — Start of Authority</strong></h3>
<p>Contains domain zone info like:</p>
<ul>
<li><p>primary nameserver</p>
</li>
<li><p>admin email</p>
</li>
<li><p>serial number</p>
</li>
</ul>
<p>Mostly maintained automatically.</p>
<h3 id="heading-a-record-ipv4-address-mapping"><strong>A Record — IPv4 address mapping</strong></h3>
<p>Maps domain → IPv4 address</p>
<p>Example:</p>
<pre><code class="lang-plaintext">learndev.in → 3.110.xx.xx
</code></pre>
<h3 id="heading-aaaa-record-ipv6-mapping"><strong>AAAA Record — IPv6 mapping</strong></h3>
<p>Same as A record but for IPv6.</p>
<h3 id="heading-mx-record-mail-exchange"><strong>MX Record — Mail exchange</strong></h3>
<p>Used for email routing.</p>
<p>Example:</p>
<ul>
<li><p>Gmail setup</p>
</li>
<li><p>Zoho mail setup</p>
</li>
</ul>
<h3 id="heading-txt-record"><strong>TXT Record</strong></h3>
<p>Used for verification and security.</p>
<p>Examples:</p>
<ul>
<li><p>domain ownership verification</p>
</li>
<li><p>SPF / DKIM records for email security</p>
</li>
</ul>
<h3 id="heading-cname-record-alias"><strong>CNAME Record — Alias</strong></h3>
<p>Maps one name to another name.</p>
<p>Example:</p>
<pre><code class="lang-plaintext">blog.learndev.in → hashnode-host-domain
</code></pre>
<h1 id="heading-what-im-going-to-do-next-my-learning-plan">What I’m Going to Do Next (My Learning Plan)</h1>
<p>From today onwards, I’m going to start <strong>System Design concepts from the beginning</strong> and write blogs in a simple easy-to-understand way.</p>
<p>Upcoming topics:</p>
<ul>
<li><p>Load balancer</p>
</li>
<li><p>Caching</p>
</li>
<li><p>Database indexing</p>
</li>
<li><p>Rate limiting</p>
</li>
<li><p>CDN</p>
</li>
<li><p>Queue vs Stream</p>
</li>
<li><p>Microservices basics</p>
</li>
<li><p>Scalability concepts</p>
</li>
</ul>
<hr />
<h2 id="heading-subscribe-follow-for-more">🙌 Subscribe / Follow for More</h2>
<p>If you are also learning DevOps + System Design and want beginner-friendly explanations with real examples, please subscribe and follow my blog 🚀</p>
<p>✅ I’ll be posting regularly as I learn and build.</p>
]]></content:encoded></item><item><title><![CDATA[Nginx + DNS Explained for DevOps Beginners (With Real-World Examples)]]></title><description><![CDATA[If you are learning DevOps, two topics will come again and again:
✅ Nginx (Web server + Reverse Proxy)✅ DNS (Domain → IP resolution)
Today I learned both, and in this blog I’m sharing my notes in a clean way with extra real-world understanding, so it...]]></description><link>https://blog.learndev.in/nginx-dns-explained-for-devops-beginners-with-real-world-examples</link><guid isPermaLink="true">https://blog.learndev.in/nginx-dns-explained-for-devops-beginners-with-real-world-examples</guid><category><![CDATA[nginx]]></category><category><![CDATA[dns]]></category><category><![CDATA[Devops]]></category><category><![CDATA[AWS]]></category><category><![CDATA[route53]]></category><category><![CDATA[Linux]]></category><category><![CDATA[linux for beginners]]></category><category><![CDATA[Cloud Computing]]></category><dc:creator><![CDATA[Ramu Chelloju]]></dc:creator><pubDate>Tue, 20 Jan 2026 14:42:47 GMT</pubDate><content:encoded><![CDATA[<p>If you are learning DevOps, two topics will come again and again:</p>
<p>✅ <strong>Nginx</strong> (Web server + Reverse Proxy)<br />✅ <strong>DNS</strong> (Domain → IP resolution)</p>
<p>Today I learned both, and in this blog I’m sharing my notes in a clean way with extra real-world understanding, so it can help other DevOps learners too.</p>
<p><strong><em>👋 If you found this article helpful and want to follow my DevOps learning journey,<br />connect with me on LinkedIn 👉</em></strong> <a target="_blank" href="https://www.linkedin.com/in/ramuchelloju/"><strong><em>RamuChelloj</em></strong></a><a target="_blank" href="https://www.linkedin.com/in/ramuchelloju/"><strong><em>u</em></strong></a></p>
<hr />
<h2 id="heading-1-whathttpswwwlinkedincominramuchelloju-is-nginx"><a target="_blank" href="https://www.linkedin.com/in/ramuchelloju/">1) What</a> is Nginx?</h2>
<p><strong>Nginx</strong> is a high-performance web server used to serve static files like:</p>
<ul>
<li><p>HTML</p>
</li>
<li><p>CSS</p>
</li>
<li><p>JavaScript</p>
</li>
<li><p>Images</p>
</li>
</ul>
<p>It can also be used as:</p>
<p>✅ <strong>Reverse Proxy</strong><br />✅ <strong>Load Balancer</strong><br />✅ <strong>API Gateway (basic)</strong><br />✅ <strong>TLS/SSL termination</strong></p>
<h3 id="heading-real-use-in-production">Real use in production:</h3>
<p>Most companies use Nginx to serve frontend and route requests to backend applications (Node.js, Java, Python, etc.).</p>
<hr />
<h2 id="heading-2-nginx-vs-apache-quick-difference">2) Nginx vs Apache (Quick Difference)</h2>
<p>Both are web servers, but:</p>
<h3 id="heading-apache">Apache</h3>
<ul>
<li><p>Process/thread-based</p>
</li>
<li><p>Good for dynamic modules</p>
</li>
<li><p>Older and widely used</p>
</li>
</ul>
<h3 id="heading-nginx">Nginx</h3>
<ul>
<li><p>Event-driven and lightweight</p>
</li>
<li><p>Handles high traffic efficiently</p>
</li>
<li><p>Excellent for reverse proxy and load balancing</p>
</li>
</ul>
<p><strong>DevOps takeaway:</strong><br />Nginx is very common in microservices and modern architectures.</p>
<hr />
<h2 id="heading-3-what-is-a-proxy">3) What is a Proxy?</h2>
<p>A <strong>proxy</strong> is a middle server that sits between client and server.</p>
<h3 id="heading-forward-proxy-client-side-proxy">✅ Forward Proxy (Client Side Proxy)</h3>
<p>Forward proxy works on the <strong>client side</strong>.</p>
<p>📌 Use cases:</p>
<ul>
<li><p>VPN</p>
</li>
<li><p>Blocking websites</p>
</li>
<li><p>Monitoring user traffic</p>
</li>
<li><p>Hiding client identity</p>
</li>
</ul>
<p>Example:</p>
<pre><code class="lang-plaintext">Client → Forward Proxy → Internet
</code></pre>
<h3 id="heading-reverse-proxy-server-side-proxy">✅ Reverse Proxy (Server Side Proxy)</h3>
<p>Reverse proxy works on the <strong>server side</strong>.</p>
<p>📌 Use cases:</p>
<ul>
<li><p>Hiding backend server IP</p>
</li>
<li><p>Routing API requests to backend</p>
</li>
<li><p>Load balancing</p>
</li>
<li><p>Security control</p>
</li>
</ul>
<p>Example:</p>
<pre><code class="lang-plaintext">Client → Nginx (Reverse Proxy) → Backend App
</code></pre>
<hr />
<h2 id="heading-4-nginx-reverse-proxy-example-real-scenario">4) Nginx Reverse Proxy Example (Real Scenario)</h2>
<p>Assume we have:</p>
<ul>
<li><p>Frontend is running on <strong>Nginx</strong></p>
</li>
<li><p>Backend Node.js is running on <strong>port 8080</strong></p>
</li>
</ul>
<h3 id="heading-frontend-url">Frontend URL:</h3>
<pre><code class="lang-plaintext">http://frontend-server
</code></pre>
<h3 id="heading-backend-api">Backend API:</h3>
<pre><code class="lang-plaintext">http://backend-server:8080
</code></pre>
<p>Instead of exposing backend to public, we do reverse proxy in Nginx like this:</p>
<pre><code class="lang-plaintext">location /api/ {
    proxy_pass http://backend-server:8080/;
}
</code></pre>
<p>Now the user will access backend like:</p>
<p>✅ <a target="_blank" href="http://frontend-server/api/￼And"><code>http://frontend-server/api/</code><br />And</a> Nginx will forward it internally to backend.</p>
<hr />
<h2 id="heading-5-important-nginx-paths-linux">5) Important Nginx Paths (Linux)</h2>
<p>These paths are important for every DevOps learner:</p>
<h3 id="heading-configuration-folder">✅ Configuration folder</h3>
<pre><code class="lang-plaintext">/etc/nginx/
</code></pre>
<h3 id="heading-default-configs-commonly-used">✅ Default configs (commonly used)</h3>
<pre><code class="lang-plaintext">/etc/nginx/default.d/
</code></pre>
<p>Example:</p>
<pre><code class="lang-plaintext">/etc/nginx/default.d/expense.conf
</code></pre>
<h3 id="heading-default-web-root-static-files-location">✅ Default web root (static files location)</h3>
<pre><code class="lang-plaintext">/usr/share/nginx/html/
</code></pre>
<h3 id="heading-nginx-logs">✅ Nginx logs</h3>
<pre><code class="lang-plaintext">/var/log/nginx/
</code></pre>
<ul>
<li><p><code>access.log</code></p>
</li>
<li><p><code>error.log</code></p>
</li>
</ul>
<hr />
<h2 id="heading-6-what-is-dns-resolver">6) What is DNS Resolver?</h2>
<p><strong>DNS Resolver</strong> is responsible for converting:</p>
<p>✅ Domain name → IP Address</p>
<p>Example:</p>
<pre><code class="lang-plaintext">google.com → 142.250.xx.xx
</code></pre>
<p>Whenever we type a website URL, DNS helps to find the correct server IP.</p>
<hr />
<h2 id="heading-7-how-dns-works-step-by-step-flow">7) How DNS Works (Step-by-Step Flow)</h2>
<p>When you open a domain in browser, DNS resolution happens in this order:</p>
<h3 id="heading-dns-resolution-flow">✅ DNS Resolution Flow</h3>
<ol>
<li><p><strong>Browser Cache</strong></p>
</li>
<li><p><strong>OS Cache</strong></p>
</li>
<li><p><strong>ISP DNS Resolver Cache</strong></p>
</li>
<li><p><strong>Root Servers</strong></p>
</li>
<li><p><strong>TLD Servers</strong></p>
</li>
<li><p><strong>Authoritative Nameserver</strong></p>
</li>
<li><p>Returns IP address back to browser</p>
</li>
</ol>
<hr />
<h2 id="heading-8-root-servers-important-concept">8) Root Servers (Important Concept)</h2>
<p>There are <strong>13 Root Servers</strong> worldwide (logical root server identities).</p>
<p>Root servers do not store every domain record, but they know where to find:</p>
<p>✅ <strong>TLD information</strong> (like .com, .in, .net)</p>
<p>Root servers are part of DNS root zone and are under <strong>ICANN management</strong>.</p>
<hr />
<h2 id="heading-9-what-is-tld">9) What is TLD?</h2>
<p><strong>TLD = Top Level Domain</strong></p>
<p>Examples:</p>
<ul>
<li><p><code>.com</code></p>
</li>
<li><p><code>.in</code></p>
</li>
<li><p><code>.net</code></p>
</li>
<li><p><code>.org</code></p>
</li>
<li><p><code>.us</code></p>
</li>
<li><p><code>.uk</code></p>
</li>
<li><p><code>.edu</code></p>
</li>
<li><p><code>.ai</code></p>
</li>
<li><p><code>.shop</code></p>
</li>
<li><p><code>.online</code></p>
</li>
</ul>
<h3 id="heading-example">Example:</h3>
<p>In <a target="_blank" href="http://example.com"><code>example.com</code></a></p>
<ul>
<li><p><code>example</code> = domain name</p>
</li>
<li><p><code>.com</code> = TLD</p>
</li>
</ul>
<hr />
<h2 id="heading-10-what-is-a-domain-registrar">10) What is a Domain Registrar?</h2>
<p>A <strong>Domain Registrar</strong> is a company where we can buy and manage domains.</p>
<p>Examples:</p>
<ul>
<li><p>GoDaddy</p>
</li>
<li><p>Hostinger</p>
</li>
<li><p>Porkbun</p>
</li>
<li><p>AWS Route53 (Domain registration + DNS)</p>
</li>
</ul>
<p>📌 You can also transfer your domain from one registrar to another.</p>
<hr />
<h2 id="heading-11-domain-purchase-flow-what-happens-in-background">11) Domain Purchase Flow (What Happens in Background?)</h2>
<p>Let’s say you buy:</p>
<p>✅ <a target="_blank" href="http://ramu.com"><code>ramu.com</code></a></p>
<h3 id="heading-steps">Steps:</h3>
<ol>
<li><p>You check domain availability in registrar</p>
</li>
<li><p>Registrar checks with the TLD registry</p>
</li>
<li><p>Payment completed → domain gets assigned to buyer</p>
</li>
<li><p>Registrar updates domain ownership and details</p>
</li>
<li><p>You configure DNS records like <strong>A record</strong></p>
</li>
<li><p>Changes propagate based on TTL</p>
</li>
</ol>
<hr />
<h2 id="heading-12-dns-records-you-must-know">12) DNS Records You Must Know</h2>
<h3 id="heading-a-record">✅ A Record</h3>
<p>Maps domain to IPv4 address</p>
<p>Example:</p>
<pre><code class="lang-plaintext">ramu.com → 54.12.34.56
</code></pre>
<h3 id="heading-ns-record-name-server-record">✅ NS Record (Name Server Record)</h3>
<p>Tells which DNS servers manage the domain.</p>
<p>Example:</p>
<pre><code class="lang-plaintext">ns-123.awsdns-45.com
ns-456.awsdns-12.net
</code></pre>
<h3 id="heading-ttl-time-to-live">✅ TTL (Time To Live)</h3>
<p>TTL means how long the DNS response is cached.</p>
<p>Example:</p>
<ul>
<li>TTL = 3600 seconds = 1 hour</li>
</ul>
<hr />
<h2 id="heading-13-ttl-practical-real-world-tip">13) TTL Practical Real-World Tip</h2>
<p>If you are changing IP address (migration / deployment):</p>
<p>✅ Keep TTL <strong>low</strong> (like 60 seconds)<br />So DNS changes update faster.</p>
<p>After everything is stable:</p>
<p>✅ Set TTL back to <strong>3600s (1 hour)</strong></p>
<hr />
<h2 id="heading-14-aws-route53-easy-explanation">14) AWS Route53 (Easy Explanation)</h2>
<p>Route53 is AWS DNS service.</p>
<h3 id="heading-typical-flow">Typical flow:</h3>
<ol>
<li><p>Create <strong>Public Hosted Zone</strong> in Route53</p>
</li>
<li><p>Route53 gives you <strong>NS records</strong></p>
</li>
<li><p>Update those NS records at your domain registrar</p>
</li>
<li><p>Now Route53 becomes responsible for your DNS</p>
</li>
</ol>
<p>After that you can create:</p>
<ul>
<li><p>A record</p>
</li>
<li><p>CNAME</p>
</li>
<li><p>TXT</p>
</li>
<li><p>etc.</p>
</li>
</ul>
<hr />
<h2 id="heading-15-useful-dns-command">15) Useful DNS Command</h2>
<p>To check domain resolves correctly:</p>
<pre><code class="lang-plaintext">nslookup yourdomain.com
</code></pre>
<p>Example:</p>
<pre><code class="lang-plaintext">nslookup servicowiz.in
</code></pre>
<p>Output will show the IP address.</p>
<hr />
<h2 id="heading-quick-revision-summary">✅ Quick Revision Summary</h2>
<h3 id="heading-nginx-1">Nginx</h3>
<ul>
<li><p>Web server for static content</p>
</li>
<li><p>Reverse proxy for backend services</p>
</li>
<li><p>Config in <code>/etc/nginx/</code></p>
</li>
<li><p>Web root <code>/usr/share/nginx/html/</code></p>
</li>
</ul>
<h3 id="heading-dns">DNS</h3>
<ul>
<li><p>Converts domain → IP</p>
</li>
<li><p>Uses caching (browser → OS → ISP)</p>
</li>
<li><p>Root → TLD → Authoritative NS</p>
</li>
<li><p>A record maps domain → IP</p>
</li>
<li><p>TTL controls caching duration</p>
</li>
</ul>
<hr />
<h2 id="heading-interview-questions-must-prepare">🎯 Interview Questions (Must Prepare)</h2>
<p>✅ What is Nginx and why is it used?<br />✅ Difference between forward proxy and reverse proxy<br />✅ Explain DNS resolution flow step-by-step<br />✅ What are root servers and how many are there?<br />✅ What is TLD?<br />✅ What is a domain registrar?<br />✅ What is A record and NS record?<br />✅ What is TTL and why we change it?</p>
<hr />
<h2 id="heading-final-thoughts">✅ Final Thoughts</h2>
<p>Learning <strong>Nginx + DNS</strong> gave me clear understanding of how real web applications work:</p>
<ul>
<li><p>Frontend served by Nginx</p>
</li>
<li><p>Backend routed via reverse proxy</p>
</li>
<li><p>Domains mapped using DNS records</p>
</li>
</ul>
<p>This is a strong foundation for DevOps and Cloud.</p>
<hr />
]]></content:encoded></item><item><title><![CDATA[🐧 Top Linux Commands Every DevOps Beginner Must Know (With Examples)]]></title><description><![CDATA[📌 Introduction
If you are starting your journey in Linux, DevOps, or Cloud Computing, Linux commands are not optional — they are mandatory.
Most production servers run on Linux, and as a DevOps engineer, you’ll interact with servers daily for:

Depl...]]></description><link>https://blog.learndev.in/top-linux-commands-every-devops-beginner-must-know-with-examples</link><guid isPermaLink="true">https://blog.learndev.in/top-linux-commands-every-devops-beginner-must-know-with-examples</guid><category><![CDATA[Linux]]></category><category><![CDATA[linux for beginners]]></category><category><![CDATA[Devops]]></category><category><![CDATA[Cloud Computing]]></category><category><![CDATA[Scripting]]></category><category><![CDATA[Bash]]></category><dc:creator><![CDATA[Ramu Chelloju]]></dc:creator><pubDate>Sun, 11 Jan 2026 15:14:32 GMT</pubDate><content:encoded><![CDATA[<h2 id="heading-introduction">📌 Introduction</h2>
<p>If you are starting your journey in <strong>Linux, DevOps, or Cloud Computing</strong>, Linux commands are not optional — they are <strong>mandatory</strong>.</p>
<p>Most production servers run on <strong>Linux</strong>, and as a DevOps engineer, you’ll interact with servers daily for:</p>
<ul>
<li><p>Deployment</p>
</li>
<li><p>Monitoring</p>
</li>
<li><p>Debugging</p>
</li>
<li><p>Automation</p>
</li>
</ul>
<p>In this post, I’m sharing a <strong>structured Linux commands cheat sheet (basic + advanced)</strong> with <strong>clear explanations and real examples</strong>, especially useful for <strong>beginners and DevOps learners</strong>.</p>
<blockquote>
<p>👋 If you found this article helpful and want to follow my <strong>DevOps learning journey</strong>,<br />connect with me on <strong>LinkedIn</strong> 👉 <a target="_blank" href="https://www.linkedin.com/in/ramuchelloju/">RamuChelloju</a></p>
</blockquote>
<hr />
<h2 id="heading-1-basic-linux-commands">🧱 1. Basic Linux Commands</h2>
<p>These commands are used <strong>every day</strong> on any Linux system.</p>
<h3 id="heading-list-files-and-directories">🔹 List files and directories</h3>
<pre><code class="lang-plaintext">ls
ls -l
ls -a
</code></pre>
<h3 id="heading-change-directory">🔹 Change directory</h3>
<pre><code class="lang-plaintext">cd /var/log
cd ..
</code></pre>
<h3 id="heading-show-current-path">🔹 Show current path</h3>
<pre><code class="lang-plaintext">pwd
</code></pre>
<h3 id="heading-create-and-remove-directories">🔹 Create and remove directories</h3>
<pre><code class="lang-plaintext">mkdir app
rmdir app
</code></pre>
<h3 id="heading-copy-and-move-files">🔹 Copy and move files</h3>
<pre><code class="lang-plaintext">cp file1 file2
cp -r dir1 dir2
mv oldname newname
</code></pre>
<h3 id="heading-create-empty-file">🔹 Create empty file</h3>
<pre><code class="lang-plaintext">touch test.txt
</code></pre>
<hr />
<h2 id="heading-2-file-operations">📂 2. File Operations</h2>
<p>Used to <strong>read, search, compress, and manage files</strong>.</p>
<h3 id="heading-view-file-content">🔹 View file content</h3>
<pre><code class="lang-plaintext">cat file.txt
less largefile.log
</code></pre>
<h3 id="heading-search-inside-files">🔹 Search inside files</h3>
<pre><code class="lang-plaintext">grep "error" app.log
</code></pre>
<h3 id="heading-archive-and-compress">🔹 Archive and compress</h3>
<pre><code class="lang-plaintext">tar -cvf backup.tar folder/
zip files.zip file1 file2
unzip files.zip
</code></pre>
<h3 id="heading-change-permissions-and-ownership">🔹 Change permissions and ownership</h3>
<pre><code class="lang-plaintext">chmod 755 script.sh
chown user:group file.txt
</code></pre>
<hr />
<h2 id="heading-3-process-amp-system-monitoring">⚙️ 3. Process &amp; System Monitoring</h2>
<p>Helps you understand <strong>what is running on the server</strong>.</p>
<h3 id="heading-view-running-processes">🔹 View running processes</h3>
<pre><code class="lang-plaintext">ps aux
</code></pre>
<h3 id="heading-live-system-usage">🔹 Live system usage</h3>
<pre><code class="lang-plaintext">top
htop
</code></pre>
<h3 id="heading-run-process-after-logout">🔹 Run process after logout</h3>
<pre><code class="lang-plaintext">nohup python app.py &amp;
</code></pre>
<h3 id="heading-process-tree">🔹 Process tree</h3>
<pre><code class="lang-plaintext">pstree
</code></pre>
<h3 id="heading-view-system-logs">🔹 View system logs</h3>
<pre><code class="lang-plaintext">journalctl
journalctl -u nginx
</code></pre>
<hr />
<h2 id="heading-4-disk-amp-memory-commands">💽 4. Disk &amp; Memory Commands</h2>
<p>Used heavily during <strong>production issues</strong>.</p>
<h3 id="heading-disk-usage">🔹 Disk usage</h3>
<pre><code class="lang-plaintext">df -h
du -sh /var/log
</code></pre>
<h3 id="heading-memory-usage">🔹 Memory usage</h3>
<pre><code class="lang-plaintext">free -h
</code></pre>
<h3 id="heading-block-devices">🔹 Block devices</h3>
<pre><code class="lang-plaintext">lsblk
</code></pre>
<h3 id="heading-mount-and-unmount">🔹 Mount and unmount</h3>
<pre><code class="lang-plaintext">mount /dev/xvdf /data
umount /data
</code></pre>
<h3 id="heading-sync-files">🔹 Sync files</h3>
<pre><code class="lang-plaintext">rsync -av source/ destination/
</code></pre>
<hr />
<h2 id="heading-5-networking-commands">🌐 5. Networking Commands</h2>
<p>Used for <strong>server access and debugging</strong>.</p>
<h3 id="heading-check-connectivity">🔹 Check connectivity</h3>
<pre><code class="lang-plaintext">ping google.com
</code></pre>
<h3 id="heading-test-apis-and-urls">🔹 Test APIs and URLs</h3>
<pre><code class="lang-plaintext">curl https://example.com
</code></pre>
<h3 id="heading-download-files">🔹 Download files</h3>
<pre><code class="lang-plaintext">wget https://example.com/file.zip
</code></pre>
<h3 id="heading-connect-to-remote-server">🔹 Connect to remote server</h3>
<pre><code class="lang-plaintext">ssh -i key.pem user@server_ip
</code></pre>
<h3 id="heading-copy-files-between-servers">🔹 Copy files between servers</h3>
<pre><code class="lang-plaintext">scp file.txt user@server:/path
</code></pre>
<hr />
<h2 id="heading-6-permissions-amp-ownership-very-important">🔐 6. Permissions &amp; Ownership (Very Important)</h2>
<p>Most Linux issues happen due to <strong>wrong permissions</strong>.</p>
<h3 id="heading-file-permissions">🔹 File permissions</h3>
<pre><code class="lang-plaintext">chmod 644 file.txt
chmod 755 script.sh
</code></pre>
<h3 id="heading-change-owner">🔹 Change owner</h3>
<pre><code class="lang-plaintext">chown ec2-user:ec2-user file.txt
</code></pre>
<h3 id="heading-sudo-access">🔹 Sudo access</h3>
<pre><code class="lang-plaintext">sudo command
</code></pre>
<h3 id="heading-edit-sudoers-safely">🔹 Edit sudoers safely</h3>
<pre><code class="lang-plaintext">visudo
</code></pre>
<hr />
<h2 id="heading-how-devops-engineers-use-these-commands">🚀 How DevOps Engineers Use These Commands</h2>
<p>As a DevOps engineer, you’ll use Linux commands to:</p>
<ul>
<li><p>Debug production issues</p>
</li>
<li><p>Check server health</p>
</li>
<li><p>Deploy applications</p>
</li>
<li><p>Automate tasks using shell scripts</p>
</li>
<li><p>Manage cloud servers (AWS EC2, GCP, Azure)</p>
</li>
</ul>
<p>👉 <strong>Strong Linux basics = Strong DevOps career</strong></p>
<hr />
<h2 id="heading-learning-tips-for-beginners">🧠 Learning Tips for Beginners</h2>
<ul>
<li><p>Practice daily (don’t just read)</p>
</li>
<li><p>Break things and fix them</p>
</li>
<li><p>Focus on <strong>understanding</strong>, not memorizing</p>
</li>
<li><p>Combine Linux with Git, Docker, and Cloud</p>
</li>
</ul>
<hr />
<h2 id="heading-conclusion">✅ Conclusion</h2>
<p>Linux commands are the <strong>foundation</strong> for DevOps, Cloud, and SRE roles.<br />Once you master these basics, learning tools like <strong>Docker, Kubernetes, Jenkins, and Terraform</strong> becomes much easier.</p>
<p>If you are a beginner — <strong>start slow, stay consistent, and practice daily</strong>.</p>
]]></content:encoded></item><item><title><![CDATA[Automating MediaConvert Jobs with AWS Lambda]]></title><description><![CDATA[In this Demo, we will use Amazon S3 and Lambda to trigger AWS Elemental MediaConvert jobs automatically.
Prerequisites
You must have an Amazon S3 source bucket (for example, ip-tutorial-bucket-1) with videos to be transcoded already stored in it.
And...]]></description><link>https://blog.learndev.in/automating-mediaconvert-jobs-with-aws-lambda</link><guid isPermaLink="true">https://blog.learndev.in/automating-mediaconvert-jobs-with-aws-lambda</guid><category><![CDATA[AWS]]></category><category><![CDATA[aws lambda]]></category><category><![CDATA[Python]]></category><category><![CDATA[Amazon S3]]></category><category><![CDATA[lambda]]></category><dc:creator><![CDATA[Ramu Chelloju]]></dc:creator><pubDate>Sat, 19 Nov 2022 14:24:49 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1669120335980/0wMYnHnwZ.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In this Demo, we will use Amazon S3 and Lambda to trigger AWS Elemental MediaConvert jobs automatically.</p>
<h1 id="heading-prerequisites">Prerequisites</h1>
<p>You must have an Amazon S3 source bucket (for example, <strong>ip-tutorial-bucket-1</strong>) with videos to be transcoded already stored in it.
And Output Bucket (for example,<strong>video-op-bucket-2</strong>)</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1668867542056/ikv1bKJN0.png" alt="image.png" /></p>
<p>Depending on the environment, customer requirements, and marketplace we will use AWS Serverless to deploy Lambda Functions. Currently, MediaConvert has implemented a mechanism that will be invoked when a user uploads a video in the Input Bucket. The Lambda function will then query the MediaConvert service to produce the required video formats and distribution configurations.</p>
<ul>
<li>An Apple HLS adaptive bitrate stream for playout on multiple-sized devices and varying bandwidths.</li>
<li>An MP4 stream</li>
<li>Thumbnails for use in websites to show a video preview at a point in time.</li>
</ul>
<h2 id="heading-step-1-create-an-s3-bucket-for-the-output-media-file">Step 1: Create an S3 bucket for the output media file</h2>
<p>In this step, you'll create an S3 bucket to store the transcoded media files so they can be viewed on any device, then configure CORS rules to allow devices that do not meet the CORS settings to access the files.</p>
<ol>
<li>Create a bucket for the output media files</li>
<li><p>Sign in to the AWS Management Console and open the Amazon S3 console at https://console.aws.amazon.com/s3/.</p>
</li>
<li><p>In the left navigation pane, choose Buckets.</p>
</li>
<li><p>Choose Create bucket.</p>
</li>
<li><p>For Bucket name, enter a name for your bucket (for example, video-op-bucket-2).</p>
</li>
<li><p>For Region, choose the AWS Region where you want the bucket to reside.</p>
</li>
<li><p>To ensure public access to your output media files, in Block Public Access settings for this bucket, clear Block all public access.</p>
</li>
<li><p>Select the check box next to I acknowledge that the current settings might result in this bucket and the objects within becoming public.</p>
</li>
<li><p>Keep the remaining settings set to the defaults.</p>
</li>
<li><p>Choose Create bucket.</p>
</li>
</ol>
<h2 id="heading-add-a-cors-configuration-to-the-s3-output-bucket">Add a CORS configuration to the S3 output bucket</h2>
<ol>
<li><p>In the Buckets list, choose the name of the bucket that you created earlier (for example,video-op-bucket-2).</p>
</li>
<li><p>Choose the Permissions tab.</p>
</li>
<li><p>In the Cross-origin resource sharing (CORS) section, choose Edit.</p>
</li>
<li><p>In the CORS configuration text box, copy and paste the following CORS configuration.</p>
</li>
<li><p>The CORS configuration must be in JSON format. In this example, the AllowedOrigins attribute uses the wildcard character (*) to specify all origins.</p>
</li>
</ol>
<pre><code class="lang-[">    {
        "AllowedOrigins": [
            "*"
         ],
         "AllowedMethods": [
             "GET"
         ],
         "AllowedHeaders": [
             "*"
         ],
         "ExposeHeaders": []

     }
 ]
</code></pre>
<p> Choose Save changes.</p>
<h1 id="heading-step-2-create-an-iam-role-for-mediaconvert">Step 2: Create an IAM role for MediaConvert</h1>
<p>In order for you to use the MediaConvert console to transcode videos in your S3 bucket, you need IAM service roles to grant MediaConvert the ability to read and write video files from and to your source and destination buckets. Related entities, including metadata objects, automatically use these roles, allowing MediaConvert to automatically conform to your S3 access control rules.</p>
<h2 id="heading-to-create-an-iam-role-for-mediaconvert">To create an IAM role for MediaConvert</h2>
<p>Sign in to the AWS Management Console and open the IAM console at https://console.aws.amazon.com/iam/.</p>
<p>In the navigation pane of the IAM console, choose Roles, and then choose Create role.</p>
<p>Choose the AWS service role type, and then choose the MediaConvert service.</p>
<p>Choose the MediaConvert use case for your service. Then choose Next: Permissions. The service has already defined the permissions used by the role. These permissions grant MediaConvert the following permissions:</p>
<ul>
<li><p>Full access to your Amazon S3 resources</p>
</li>
<li><p>API Gateway invoke full access</p>
</li>
</ul>
<p>Choose Next: Review.</p>
<p>For the Role name, enter a name that describes the purpose of the role. If you use the name MediaConvert_Default_Role, then the MediaConvert console will use this role by default when you run jobs.</p>
<p>On the Summary page, copy the Role ARN (which starts with arn:aws:iam::), and save the ARN for use later.</p>
<p>Review the role, and then choose to Create a role.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1668864350547/XEH8Ch0o9.png" alt="image.png" /></p>
<h1 id="heading-step-3-create-an-iam-role-for-your-lambda-function">Step 3: Create an IAM role for your Lambda function</h1>
<p>To batch-transcode videos with  MediaConvertand S3, you must create an IAM role in order to connect the roles to MediaConvert and S3 Batch. The correct step is to practice IAM role that grants the Lambda function permissions to access MediaConvert and S3 Batch Operations</p>
<ol>
<li>Create an IAM role for your Lambda function</li>
<li><p>Sign in to the AWS Management Console and open the IAM console at https://console.aws.amazon.com/iam/.</p>
</li>
<li><p>In the left navigation pane, choose Roles, and then choose Create role.</p>
</li>
<li><p>Choose the AWS service role type, and then under Common use cases, choose Lambda.</p>
</li>
<li><p>Choose Next: Permissions.</p>
</li>
<li><p>On the Attach permissions policies page, enter AWSLambdaBasicExecutionRole in the Filter policies box. To attach the managed policy AWSLambdaBasicExecutionRole to this role to grant write permissions to Amazon CloudWatch Logs, select the check box next to AWSLambdaBasicExecutionRole.</p>
</li>
<li><p>Choose Next: Tags.</p>
</li>
<li><p>(Optional) Add tags to the managed policy.</p>
</li>
<li><p>Choose Next: Review.</p>
</li>
<li><p>For Role name, enter tutorial-lambda-transcode-role.</p>
</li>
<li><p>Choose Create role.</p>
</li>
<li><p>Type the role name into the filter box on the Roles page which you created</p>
</li>
</ol>
<p>On the Permissions tab, click on the Add Inline Policy link and choose the JSON tab.
Copy and paste the following JSON in the Policy Document Box. You will need to edit this policy in the next step to fill in the resources for your application.</p>
<pre><code class="lang-{">    "Version": "2012-10-17",
    "Statement": [
        {
            "Action": [
                "logs:CreateLogGroup",
                "logs:CreateLogStream",
                "logs:PutLogEvents"
            ],
            "Resource": "*",
            "Effect": "Allow",
            "Sid": "Logging"
        },
        {
            "Action": [
                "iam:PassRole"
            ],
            "Resource": [
                "&lt;ARN for MediaConvert_Default_Role&gt;"
            ],
            "Effect": "Allow",
            "Sid": "PassRole"
        },
        {
            "Action": [
                "mediaconvert:*"
            ],
            "Resource": [
                "*"
            ],
            "Effect": "Allow",
            "Sid": "MediaConvertService"
        }
    ]
}
</code></pre>
<ul>
<li><p>Choose Review Policy.</p>
</li>
<li><p>For Name, enter tutorial-lambda-policy.</p>
</li>
<li><p>Choose Create Policy.</p>
</li>
</ul>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1668865299610/Dy52mmxjo.png" alt="image.png" /></p>
<h1 id="heading-step-4-create-a-lambda-function-for-converting-videos">Step 4: Create a Lambda function for converting videos</h1>
<p>AWS Lambda will run your code in response to events such as a putObject into S3 or an HTTP request. In this step you'll build the core function that will process videos using the MediaConvert python SDK. The lambda function will respond to putObject events in your S3 source bucket. Whenever a video file is added, the lambda will start a MediaConvert job.</p>
<p>Make sure to configure your function to use the tutorial-lambda-transcode-role IAM role you created in the previous section.</p>
<h2 id="heading-step-by-step-instructions">Step-by-step instructions</h2>
<ol>
<li><p>Choose Services then select Lambda in the Compute section.</p>
</li>
<li><p>Choose Create function.</p>
</li>
<li><p>Choose the Author from scratch button.</p>
</li>
<li><p>On the Author from Scratch panel, enter tutorial-lambda-convert in the Function name field.</p>
</li>
<li><p>Select Python 3.8 for the Runtime.</p>
</li>
<li><p>Expand the Choose or create an execution role.</p>
</li>
<li><p>Select Use an existing role.</p>
</li>
<li><p>Select tutorial-lambda-transcode-role from the Existing Role dropdown.</p>
</li>
<li>click on Create function.</li>
</ol>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1668866235134/FDrSHc0i8.png" alt="image.png" /></p>
<ol>
<li><p>On the Configuration tab of the tutorial-lambda-convert page, in the function code panel:</p>
</li>
<li><p>Select Upload a file from Amazon S3 for the Code entry type Enter the following for the URL: https://rodeolabz-us-west-2.s3-us-west-2.amazonaws.com/vodconsole/lambda.zip.</p>
</li>
<li><p>Note that this zip file is simply the convert.py script and the job JSON file provided in this repo that you could zip up yourself if desired.</p>
</li>
<li><p>Enter convert.handler for the Handler field.</p>
</li>
</ol>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1668866482952/wHlq8bay4.png" alt="image.png" /></p>
<ul>
<li>On the Environment Variables panel of the tutorial-lambda-convert page, enter the following keys and values:</li>
</ul>
<blockquote>
<p>DestinationBucket = video-op-bucket-2 (or whatever you named your bucket )</p>
<p>MediaConvertRole = arn:aws:iam::ACCOUNT NUMBER:role/MediaConvert_Default_Role</p>
<p>Application = Batch-Transcoding</p>
</blockquote>
<ul>
<li><p>On the Basic Settings panel, set Timeout to 2 minutes.</p>
</li>
<li><p>Scroll back to the top of the page and click on the Save button.</p>
</li>
</ul>
<h1 id="heading-step-5-create-a-s3-put-event-trigger-for-your-convert-lambda">Step 5: Create a S3 Put Event Trigger for your Convert lambda</h1>
<h2 id="heading-step-by-step-instructions-1">Step-by-step instructions</h2>
<ol>
<li><p>In the Configuration-&gt;Designer panel of the tutorial-lambda-convert function, click on Add trigger button.</p>
</li>
<li><p>Select S3 from the Trigger configuration dropdown.</p>
</li>
<li><p>Select <strong>ip-tutorial-bucket-1</strong> or the name you used for the Source bucket you created earlier.</p>
</li>
<li><p>Select PUT for the Event type.</p>
</li>
<li><p>Leave the rest of the settings as the default and click the Add button.</p>
</li>
</ol>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1668866931529/DkylTYbsW.png" alt="image.png" /></p>
<h1 id="heading-final-step-test-the-mediaconvertip-tutorial-bucket-1-automation">Final Step: Test the MediaConvert(ip-tutorial-bucket-1) automation</h1>
<p>You can use your own video or use the test.mp4 video included in this folder to test the workflow.</p>
<ol>
<li><p>Open the S3 console overview page for the ip-tutorial-bucket-1 S3 bucket you created earlier.</p>
</li>
<li><p>Select Upload and then choose the file test.mp4 from your computer.</p>
</li>
<li><p>Note the time that the upload was completed.</p>
</li>
<li><p>Open the <a target="_blank" href="console.aws.amazon.com/mediaconvert">MediaConvert jobs</a> page and find a job for the input 'test.mp4' that was started near the time your upload was completed.</p>
</li>
</ol>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1668867138515/86IVg2pQZ.png" alt="image.png" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1668867223000/-VPAIiMvj.png" alt="image.png" /></p>
<p>Navigate to the MP4 or HLS output and play the test video by clicking on the test.mp4 output http resource.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1668867265770/b0W05zJx8.png" alt="image.png" /></p>
<h3 id="heading-summary">Summary</h3>
<p>In this post, I have shown you how to convert any video file to HLS or MP4 format using MediaConvert and Lambda.</p>
]]></content:encoded></item></channel></rss>