<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Prashanth Mangipudi </title>
    <description>The latest articles on DEV Community by Prashanth Mangipudi  (@prashanthm07).</description>
    <link>https://dev.to/prashanthm07</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1121461%2F60094510-1ed6-42bd-8f0f-f6c23807b2ee.jpeg</url>
      <title>DEV Community: Prashanth Mangipudi </title>
      <link>https://dev.to/prashanthm07</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/prashanthm07"/>
    <language>en</language>
    <item>
      <title>Sparse &amp; Dense Indexes in DBMS</title>
      <dc:creator>Prashanth Mangipudi </dc:creator>
      <pubDate>Tue, 20 May 2025 14:45:04 +0000</pubDate>
      <link>https://dev.to/prashanthm07/sparse-dense-indexes-in-dbms-l5l</link>
      <guid>https://dev.to/prashanthm07/sparse-dense-indexes-in-dbms-l5l</guid>
      <description>&lt;p&gt;Database Indexes are most crucial for efficient query performance, as discussed in my previous post,&lt;a href="https://dev.to/prashanthm07/understanding-database-indexes-a-library-analogy-15p4"&gt;Understanding Database Indexes: A Library Analogy&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Continuing with the library analogy, let's explore two types of indexes: &lt;strong&gt;dense and sparse&lt;/strong&gt;, focusing on the book_title column as a unique key.&lt;br&gt;
Here is the  table from the previous post.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Book Title&lt;/th&gt;
&lt;th&gt;Stream&lt;/th&gt;
&lt;th&gt;Section&lt;/th&gt;
&lt;th&gt;Rack&lt;/th&gt;
&lt;th&gt;Position&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Database Internals&lt;/td&gt;
&lt;td&gt;Engineering&lt;/td&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SQL Performance Tuning&lt;/td&gt;
&lt;td&gt;Engineering&lt;/td&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;NoSQL Databases: A Practical Guide&lt;/td&gt;
&lt;td&gt;Engineering&lt;/td&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Quantum Circuits&lt;/td&gt;
&lt;td&gt;Engineering&lt;/td&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Regenerative Medicine&lt;/td&gt;
&lt;td&gt;Medical&lt;/td&gt;
&lt;td&gt;B&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Dense Indexing
&lt;/h2&gt;

&lt;p&gt;In &lt;strong&gt;dense indexing&lt;/strong&gt; , there's an entry for every record in the table. Imagine a library catalog listing every book with its exact location (e.g., Section A, Rack 5, Position 2). The index table stores the key (book_title) and a &lt;strong&gt;record pointer&lt;/strong&gt;- a reference to the record's location on disk.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqbicpcrkyxrjseqreuyc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqbicpcrkyxrjseqreuyc.png" alt="Dense Indexing" width="800" height="187"&gt;&lt;/a&gt;&lt;br&gt;
Caption: A catalog listing every book in the library, with each entry pointing to its exact location.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pros
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Fast Lookups:&lt;/strong&gt; Direct access to every record makes queries like &lt;code&gt;SELECT * FROM books where book_title='Database Internals';&lt;/code&gt; extremely quick. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ideal for Random Access:&lt;/strong&gt; Perfect for frequent lookups on unique keys, such as &lt;code&gt;product_id&lt;/code&gt; in an e-commerce database.
### Cons&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;High Storage Overhead:&lt;/strong&gt; As the table grows, the index table grows proportionally, consuming significant disk space.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Slow Write Operations:&lt;/strong&gt; Insertion, deletions and updates require modifying both the main table and the index table, increasing memory and time costs.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Sparse Indexing
&lt;/h2&gt;

&lt;p&gt;In &lt;strong&gt;sparse indexing&lt;/strong&gt; , the index table stores entries for only a subset of records-typically one per &lt;strong&gt;data block&lt;/strong&gt; (a group of records stored together on disk). Think of a library catalog listing only the first book on each shelf, requiring you to search within the shelf to find the exact book. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq5imkrkjsrwija8dbxfr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq5imkrkjsrwija8dbxfr.png" alt="Sparse Indexing" width="800" height="199"&gt;&lt;/a&gt;&lt;br&gt;
Caption: A catalog listing only the first book on each shelf, requiring a search within the shelf to find the exact book. &lt;/p&gt;

&lt;h3&gt;
  
  
  How does Sparse index work?
&lt;/h3&gt;

&lt;p&gt;Let's look up &lt;code&gt;Regenerative Medicine&lt;/code&gt;. The sparse index has entries for &lt;code&gt;Quantum Circuits&lt;/code&gt; and &lt;code&gt;SQL Performance Tuning&lt;/code&gt;. Since &lt;strong&gt;Regenerative Medicine&lt;/strong&gt; falls alphabetically between these, the database starts at the block pointed to by &lt;strong&gt;Quantum Circuits&lt;/strong&gt; and performs a sequential scan within that block and find a record.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Sparse indexes  work effectively when the data is ordered (e.g., in a clustered index or a B-tree), as this ensures records within blocks are predictable.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pros
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Low Storage Overhead:&lt;/strong&gt; Indexes only a subset of records, making it space-efficient for large database. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Efficient for Range Queries:&lt;/strong&gt; Ideal for queries &lt;code&gt;SELECT * FROM books WHERE book_title BETWEEN 'Quantum Circuits' AND 'SQL Performance Tuning';&lt;/code&gt; as it scans fewer index entries.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lower Maintainance:&lt;/strong&gt; Insertions and deletions have less impact since the index table updates less frequently.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Cons
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Slower Lookups for Random Access:&lt;/strong&gt; Requires scanning within a block to find the exact record, making it slower than dense indexes for specific lookups. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Requires Ordered Data:&lt;/strong&gt; Sparse indexes are most effective when the data is ordered, which may not always be the case.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Dense and sparse indexes offer distinct trade-offs in DBMS. Dense indexes excel in random lookups but consume more space, while sparse indexes save storage and optimize range queries.&lt;/p&gt;

</description>
      <category>database</category>
      <category>sql</category>
      <category>systemdesign</category>
    </item>
    <item>
      <title>Understanding Database Indexes: A Library Analogy</title>
      <dc:creator>Prashanth Mangipudi </dc:creator>
      <pubDate>Sat, 17 May 2025 13:14:11 +0000</pubDate>
      <link>https://dev.to/prashanthm07/understanding-database-indexes-a-library-analogy-15p4</link>
      <guid>https://dev.to/prashanthm07/understanding-database-indexes-a-library-analogy-15p4</guid>
      <description>&lt;p&gt;Imagine searching for a book on databases in a massive library with thousands of books. Without organization, finding that book could take hours. This is where &lt;strong&gt;indexes&lt;/strong&gt; come in, both in libraries and databases. In this post, we’ll use a library analogy to explain why indexes are essential for efficient data retrieval in relational databases, focusing on books about databases.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scene 0: No Organization
&lt;/h2&gt;

&lt;p&gt;Picture a library where thousands of books are stacked randomly—no labeled sections, no catalog. To find a book like &lt;em&gt;Database Internals&lt;/em&gt;, you’d need to check the title of nearly every book. This is slow and inefficient, much like searching a database without an index.&lt;/p&gt;

&lt;p&gt;In a relational database, the library is the database, each book is a &lt;strong&gt;row&lt;/strong&gt; in a table, and the table might look like this:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Book Title&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Database Internals&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SQL Performance Tuning&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;NoSQL Databases: A Practical Guideाण&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Quantum Circuits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Regenerative Medicine&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Without any structure, the database must perform a &lt;strong&gt;full table scan&lt;/strong&gt;, checking every row to find a specific book. This is computationally expensive, especially for large tables.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scene 1: Basic Organization
&lt;/h2&gt;

&lt;p&gt;Now, the library has labeled sections, such as Engineering, Medical, and Psychology. The librarian also maintains a catalog (an &lt;strong&gt;index&lt;/strong&gt;) that lists books by their &lt;code&gt;Stream&lt;/code&gt;, a category like Engineering. When you ask for database books, the librarian checks the catalog and directs you to the Engineering section, narrowing your search to a smaller subset of books.&lt;/p&gt;

&lt;p&gt;In a database, this is like adding a column to categorize rows and creating an index on that column. Here’s how the table might look:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Book Title&lt;/th&gt;
&lt;th&gt;Stream&lt;/th&gt;
&lt;th&gt;Section&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Database Internals&lt;/td&gt;
&lt;td&gt;Engineering&lt;/td&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SQL Performance Tuning&lt;/td&gt;
&lt;td&gt;Engineering&lt;/td&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;NoSQL Databases: A Practical Guide&lt;/td&gt;
&lt;td&gt;Engineering&lt;/td&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Quantum Circuits&lt;/td&gt;
&lt;td&gt;Engineering&lt;/td&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Regenerative Medicine&lt;/td&gt;
&lt;td&gt;Medical&lt;/td&gt;
&lt;td&gt;B&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The database creates an index on the &lt;code&gt;Stream&lt;/code&gt; column—a separate data structure (often a &lt;strong&gt;B-tree&lt;/strong&gt;) that maps &lt;code&gt;Stream&lt;/code&gt; values to row locations. Querying for &lt;code&gt;Stream = 'Engineering'&lt;/code&gt; is now much faster because the database uses the index to skip irrelevant rows, avoiding a full table scan.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scene 2: Full Indexing
&lt;/h2&gt;

&lt;p&gt;The library takes organization further. The librarian maintains a detailed catalog that pinpoints each book’s exact location: section, rack, and position. When you ask, “Where’s &lt;em&gt;Database Internals&lt;/em&gt; by Author?”, the librarian replies, “Section A, Rack 5, Position 2.” You walk straight to the book, saving time.&lt;/p&gt;

&lt;p&gt;In a database, this is like creating indexes on multiple columns, such as &lt;code&gt;Book Title&lt;/code&gt; or &lt;code&gt;Stream&lt;/code&gt;. The table might include location details for clarity, but the index is a separate structure:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Book Title&lt;/th&gt;
&lt;th&gt;Stream&lt;/th&gt;
&lt;th&gt;Section&lt;/th&gt;
&lt;th&gt;Rack&lt;/th&gt;
&lt;th&gt;Position&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Database Internals&lt;/td&gt;
&lt;td&gt;Engineering&lt;/td&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SQL Performance Tuning&lt;/td&gt;
&lt;td&gt;Engineering&lt;/td&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;NoSQL Databases: A Practical Guide&lt;/td&gt;
&lt;td&gt;Engineering&lt;/td&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Quantum Circuits&lt;/td&gt;
&lt;td&gt;Engineering&lt;/td&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Regenerative Medicine&lt;/td&gt;
&lt;td&gt;Medical&lt;/td&gt;
&lt;td&gt;B&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;An index on &lt;code&gt;Book Title&lt;/code&gt; allows the database to quickly locate a specific row, like finding &lt;em&gt;Database Internals&lt;/em&gt; in milliseconds. This is the power of &lt;strong&gt;indexing&lt;/strong&gt;: transforming a slow search across thousands of rows into a fast, targeted lookup.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note&lt;/em&gt;: The &lt;code&gt;Section&lt;/code&gt;, &lt;code&gt;Rack&lt;/code&gt;, and &lt;code&gt;Position&lt;/code&gt; columns are for illustration. In a real database, the index itself stores pointers to rows, not physical locations.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Indexes Work in Databases
&lt;/h2&gt;

&lt;p&gt;A database &lt;strong&gt;index&lt;/strong&gt; is a data structure that speeds up queries by mapping column values to row locations. Most indexes use a &lt;strong&gt;B-tree&lt;/strong&gt;, which organizes data for rapid lookups, similar to a phonebook. For example, an index on &lt;code&gt;Book Title&lt;/code&gt; lets the database find &lt;em&gt;SQL Performance Tuning&lt;/em&gt; without scanning the entire table.&lt;/p&gt;

&lt;p&gt;Common index types include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Primary Key Index&lt;/strong&gt;: Ensures unique values (e.g., a book’s ISBN).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unique Index&lt;/strong&gt;: Enforces uniqueness (e.g., a book’s title in a simplified system).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Composite Index&lt;/strong&gt;: Indexes multiple columns (e.g., &lt;code&gt;Stream&lt;/code&gt; and &lt;code&gt;Book Title&lt;/code&gt;) for complex queries.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;However, indexes have trade-offs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Faster Reads&lt;/strong&gt;: Queries run faster because the database uses the index.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Slower Writes&lt;/strong&gt;: Inserting or updating rows requires updating the index, adding overhead.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Storage Overhead&lt;/strong&gt;: Indexes consume additional disk space.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What Happens Without an Index?
&lt;/h2&gt;

&lt;p&gt;Without an index, the database performs a &lt;strong&gt;full table scan&lt;/strong&gt;, checking every row for a match. Imagine a table with 1 million customer records. Querying for a customer by email (e.g., &lt;code&gt;email = 'jane@example.com'&lt;/code&gt;) could take seconds or minutes. With an index on the &lt;code&gt;email&lt;/code&gt; column, the database locates the row in milliseconds, vastly improving performance.&lt;/p&gt;

&lt;p&gt;For example, in our library table, searching for &lt;em&gt;Database Internals&lt;/em&gt; without an index requires checking every row. An index on &lt;code&gt;Book Title&lt;/code&gt; makes the search near-instantaneous.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Indexes are the backbone of efficient database queries, acting like a library’s catalog to transform slow searches into fast lookups. By organizing data in structures like B-trees, indexes save time and resources, especially for large datasets. To dive deeper, explore index types or query optimization in resources like &lt;em&gt;Database System Concepts&lt;/em&gt; by Silberschatz et al. or online courses on platforms like Coursera.&lt;/p&gt;

&lt;p&gt;Next time you query a database, think of the library catalog guiding you to the perfect book—database indexes work the same magic!&lt;/p&gt;

</description>
      <category>database</category>
      <category>sql</category>
      <category>programming</category>
    </item>
    <item>
      <title>Using Authorization Mechanisms and API Keys in AWS API Gateway</title>
      <dc:creator>Prashanth Mangipudi </dc:creator>
      <pubDate>Thu, 25 Jul 2024 13:02:04 +0000</pubDate>
      <link>https://dev.to/prashanthm07/using-authorization-mechanisms-and-api-keys-in-aws-api-gateway-2ol</link>
      <guid>https://dev.to/prashanthm07/using-authorization-mechanisms-and-api-keys-in-aws-api-gateway-2ol</guid>
      <description>&lt;p&gt;&lt;code&gt;before starting, a small introduction on what Amazon API gateway does.&lt;/code&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Amazon API gateway provides a robust mechanisms to create, maintain and monitor HTTP, REST, WebSocket API's(Application Programming Interface) at any Scale.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This article is intended to explain on how to use authorization mechanisms like Lambda authorizers, Cognito Pool and IAM roles for authentication and fine-grained authorization. In addition to that, the usage of API keys for access control, including rate limiting and throttling are covered. &lt;/p&gt;

&lt;h2&gt;
  
  
  Lambda Authorizers for Authentication &amp;amp; Authorization
&lt;/h2&gt;

&lt;p&gt;Lambda authorizers, formerly known as custom authorizers, control access to your API's. When a client makes a request to your API's method, API Gateway calls your lambda authorizer, which takes the caller's identity as input and returns an IAM policy as output. &lt;/p&gt;

&lt;p&gt;The Lambda authorizer's authorization workflow is as follows:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The client calls a method on an API Gateway API, passing a bearer token or request parameters.&lt;/li&gt;
&lt;li&gt;API Gateway checks if the method request is configured with a Lambda authorizer. If it is, API Gateway calls the Lambda function. 
The Lambda function authenticates the caller. The function can authenticate in several ways, such as by calling out to an OAuth provider to get an OAuth access token, by calling out to a SAML provider to get a SAML assertion, by generating an IAM policy based on the request parameter values, or by retrieving credentials from a database.&lt;/li&gt;
&lt;li&gt;The Lambda function returns an IAM policy and a principal identifier. If the Lambda function does not return that information, the call fails¹.&lt;/li&gt;
&lt;li&gt;API Gateway evaluates the IAM policy. If access is denied, API Gateway returns a suitable HTTP status code, such as 403 ACCESS_DENIED. If access is allowed, API Gateway invokes the method.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjjzwc3dxtkjd2ob8j070.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjjzwc3dxtkjd2ob8j070.png" alt="API Gateway Lambda Authorizer workflow" width="780" height="399"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  API Keys for Access Control
&lt;/h2&gt;

&lt;p&gt;API keys are used in the REST API's to control access and can be used alongside usage plans to implement tracking and throttling. They can be directly generated within API Gateway or can be imported from external sources, if custom key needs to be enforced. &lt;/p&gt;

&lt;p&gt;A usage plan specifies who can access one or more deployed API stages and methods and optionally sets the target request rate to start throttling requests. Multiple API keys can be associated with a usage plan.&lt;br&gt;
Quota Limit : 10,000 keys/AWS Region/ Account&lt;br&gt;
To use API keys alongside of Lambda Authorizer, an additional header needs to be passed, &lt;code&gt;X-API-KEY&lt;/code&gt; is the key.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example Scenario
&lt;/h3&gt;

&lt;p&gt;An Industrial IoT sensors organization is collecting huge amounts of data from the RTUs(Real Time Unit) and storing the data in the database. Assuming there is already an application which shows the data, the clients would want to have the flow of that real time/historical data to their Analytics Systems. &lt;br&gt;
For instance let say that there is no access-control mechanism like rate limiting and all the clients will be requesting for the data using the APIs. Now, you don't want the premium clients to wait for long time, as multiple reads are happening on the database table. &lt;br&gt;
Instead, limit the request based on the usage plan allowing the premium customers send more number of requests/second without any delay.&lt;/p&gt;

&lt;p&gt;&lt;a href=""&gt;Video Explanation Link&lt;/a&gt; - Watch this space. &lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Use authorization mechanisms (e.g., Lambda authorizers, IAM roles) for authentication and fine-grained authorization.&lt;/li&gt;
&lt;li&gt;Use API keys for access control (e.g., rate limiting, throttling).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Resources
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Use API Gateway Lambda authorizers - Amazon API Gateway. &lt;a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-use-lambda-authorizer.html" rel="noopener noreferrer"&gt;https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-use-lambda-authorizer.html&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Usage plans and API keys for REST APIs in API Gateway. &lt;a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html" rel="noopener noreferrer"&gt;https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Best Practices for API keys and Usage Plans &lt;a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html#apigateway-usage-plans-best-practices" rel="noopener noreferrer"&gt;https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html#apigateway-usage-plans-best-practices&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>aws</category>
      <category>architecture</category>
      <category>serverless</category>
    </item>
    <item>
      <title>AWS Lambda Function Explained!!</title>
      <dc:creator>Prashanth Mangipudi </dc:creator>
      <pubDate>Thu, 20 Jul 2023 17:09:02 +0000</pubDate>
      <link>https://dev.to/prashanthm07/aws-lambda-function-explained-58a9</link>
      <guid>https://dev.to/prashanthm07/aws-lambda-function-explained-58a9</guid>
      <description>&lt;p&gt;AWS Lambda is a AWS Serverless service that lets you run code without actually thinking about the servers. In this post, the core features and configurational abilities are discussed. &lt;/p&gt;

&lt;h3&gt;
  
  
  Timeout
&lt;/h3&gt;

&lt;p&gt;A lambda function can run from 3 seconds (default) to 15 minutes or 900 seconds. When considering lambda function during the design, the use case should align with this constraint. After 15 minutes, the lambda execution environment gets terminated. &lt;/p&gt;

&lt;h3&gt;
  
  
  Runtime Environment
&lt;/h3&gt;

&lt;p&gt;Runtime Environment is the actual environment in which the code is supposed to be executed. Lambda supports a wide range of runtime environments including Python, Java, Nodejs, .NET, Ruby, go, C# and various others. In the chosen environment, only the default packages are included. If your script requires any other third-party libraries, then either those dependencies should be included as a part of deployment or a lambda layer can be utilized. &lt;/p&gt;

&lt;h3&gt;
  
  
  Layers
&lt;/h3&gt;

&lt;p&gt;A lambda layer is a ZIP archive or the collection of dependencies needed for a lambda function to run. With the help of these layers, the dependencies and the actual business code can be isolated. Instead of including all the dependencies as a part of each lambda function, the lambda layer can be utilized. &lt;/p&gt;

&lt;h3&gt;
  
  
  Versioning
&lt;/h3&gt;

&lt;p&gt;A lambda function once published can be versioned and aliased. This provides the flexibility to either roll back to a working version or point different services to unique versions if required. &lt;/p&gt;

&lt;h3&gt;
  
  
  Integrations
&lt;/h3&gt;

&lt;p&gt;Lambda function can either be triggered manually to perform the task or ideally the lambda function is configured to a trigger event. If the result needs to be further processed then a destination service can also be configured. Lambda almost provides integration with most of the AWS Services.&lt;/p&gt;

&lt;h3&gt;
  
  
  Monitoring
&lt;/h3&gt;

&lt;p&gt;The lambda executions can be monitored by using AWS CloudWatch Logs, AWS X-ray Services. By default, the lambda function creates a CloudWatch log group and start logging the execution logs. Other monitoring services needs to be explicitly configured and the necessary permissions has to be added to the lambda execution policy.  &lt;/p&gt;

&lt;h3&gt;
  
  
  Concurrency
&lt;/h3&gt;

&lt;p&gt;Lambda functions follow asynchronous invocation. So, the same lambda function can be triggered by multiple services and each request is handled in an isolated environment. An individual lambda can also be restricted to a certain number of concurrent lambda execution. The default concurrency limit for lambda functions is 1000 per account, this can be further increased if required. &lt;/p&gt;

&lt;h3&gt;
  
  
  Cold Starts
&lt;/h3&gt;

&lt;p&gt;Each time a lambda function is triggered, there will be some delay before handling the actual request. Lambda function maybe a serverless service for us, but it internally runs on a server and that server's runtime environment needs to be setup as per the configured runtime. The delay is caused due to this setup and this delay is termed as Cold Start. &lt;/p&gt;

&lt;h3&gt;
  
  
  Provisioned Concurrency
&lt;/h3&gt;

&lt;p&gt;To overcome the problem of Cold Starts, Provisioned Concurrency can be used. It the way of provisioning a certain number of lambda function ready even before the request. These x number of lambda functions will have the runtime setup configured already and start processing the request right after its arrival. This needs to configured  mindfully as it might cost you a fortune if not done correctly. Since the lambda functions are being reserved, there will be an additional overhead cost for the duration of lambda functions during which they are awake. &lt;/p&gt;

&lt;h3&gt;
  
  
  Use cases
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;File Processing&lt;/li&gt;
&lt;li&gt;Web Application Backend&lt;/li&gt;
&lt;li&gt;IoT Backends&lt;/li&gt;
&lt;li&gt;Stream Processing&lt;/li&gt;
&lt;li&gt;Transformation Layer in ETL process&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>aws</category>
      <category>serverless</category>
      <category>cloud</category>
      <category>beginners</category>
    </item>
    <item>
      <title>An Introduction to Cloud Computing</title>
      <dc:creator>Prashanth Mangipudi </dc:creator>
      <pubDate>Tue, 18 Jul 2023 05:48:12 +0000</pubDate>
      <link>https://dev.to/prashanthm07/an-introduction-to-cloud-computing-762</link>
      <guid>https://dev.to/prashanthm07/an-introduction-to-cloud-computing-762</guid>
      <description>&lt;p&gt;Cloud computing has revolutionized the world of technology, offering unprecedented scalability, flexibility, and cost-effectiveness. Whether you are seasoned IT professional or a tech enthusiast, understanding the foundational concepts of cloud computing is crucial for harnessing the full potential of this transformative technology. In this post, we will delve into the fundamental cloud concepts, providing a comprehensive overview of what cloud computing entails, its key components and essential benefits. &lt;/p&gt;

&lt;h3&gt;
  
  
  What is Cloud Computing?
&lt;/h3&gt;

&lt;p&gt;At its core, cloud computing refers to the delivery of on-demand computing resources, including servers, storage, databases, networking, software, and more, over the internet. Instead of owning and maintaining physical infrastructure, cloud computing allows individuals and businesses to access and utilize there resources through a pay-as-you-go model.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Components of Cloud Computing
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Virtualization
&lt;/h4&gt;

&lt;p&gt;Virtualization is the fundamental technology that enables cloud computing. It involves creating virtual versions of computing resources, such as servers, storage, and networking devices. This allows for resource allocation and management without being tied to the physical hardware, leading to greater efficiency and flexibility. &lt;/p&gt;

&lt;h4&gt;
  
  
  Elasticity and Scalability
&lt;/h4&gt;

&lt;p&gt;One of the significant advantages of cloud computing is its ability to scale resources dynamically based on the demand. Elasticity allows the system to automatically provision and de-provision the resources to match workload fluctuations, ensuring optimal performance and cost efficiency. &lt;/p&gt;

&lt;h4&gt;
  
  
  Multi-tenancy
&lt;/h4&gt;

&lt;p&gt;Cloud providers operate on a multi-tenant mode, which means that a single physical resource can server multiple customers simultaneously. This efficient resource sharing contributes to lower costs for users and higher resource utilization for providers.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cloud Deployment models
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Public Cloud
&lt;/h4&gt;

&lt;p&gt;In a public cloud, cloud services are offered over the public internet by third-party providers. These providers own and manage the infrastructure, making it a cost-effective option for startups, businesses and individuals. Popular public cloud providers include Amazon Web Services(AWS), Microsoft Azure and Google Cloud Platform(GCP).&lt;/p&gt;

&lt;h4&gt;
  
  
  Private Cloud
&lt;/h4&gt;

&lt;p&gt;A private cloud is exclusively dedicated to a single organization and can be hosted either on-premises or by a third-party provider. This model ensures heightened security, control, and customization, making it suitable for organizations with strict compliance requirements or specialized workloads.&lt;/p&gt;

&lt;h4&gt;
  
  
  Hybrid Cloud
&lt;/h4&gt;

&lt;p&gt;Combining elements of both public and private clouds, the hybrid cloud allows seamless movement of data and applications between two environments. It offers the flexibility of utilizing public cloud resources for non-sensitive tasks safeguarding critical data and applications in a private cloud setting.&lt;/p&gt;

&lt;h4&gt;
  
  
  Community Cloud
&lt;/h4&gt;

&lt;p&gt;The community cloud serves multiple organizations with shared interests, such as industry-specific compliance requirements. This model enables cost-sharing among community members while addressing their unique needs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Essential Benefits
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Cost Savings
&lt;/h4&gt;

&lt;p&gt;Cloud computing eliminates significant upfront capital expenditure on hardware and reduces ongoing maintenance costs. Users only pay for the resources they consumed, resulting in optimized spending.&lt;/p&gt;

&lt;h4&gt;
  
  
  Flexibility and Agility
&lt;/h4&gt;

&lt;p&gt;Cloud services can be rapidly provisioned and scaled, empowering businesses to respond quickly to evolving demands and market conditions.&lt;/p&gt;

&lt;h4&gt;
  
  
  Reliability and High Availability
&lt;/h4&gt;

&lt;p&gt;Cloud providers often offer robust infrastructure with redundant components, ensuring high availability and reliability for critical applications and data.&lt;/p&gt;

&lt;h4&gt;
  
  
  Security and Compliance
&lt;/h4&gt;

&lt;p&gt;Cloud providers invest heavily in security measures and compliance certifications, often surpassing what individual organizations can achieve on their own.&lt;/p&gt;

&lt;h4&gt;
  
  
  Global Reach
&lt;/h4&gt;

&lt;p&gt;Cloud Computing enables businesses to expand their reach globally by deploying applications and services in data centers worldwide, reducing latency and enhancing user experience.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;A solid grasp of foundational cloud concepts lays the groundwork for tapping into the full potential of cloud computing. Businesses and individuals can strategically choose the right cloud approach to suit their unique requirements. As cloud technology continues to evolve, staying familiar with these fundamental concepts empowers you to make well-informed decisions and leverage cloud's potential to drive innovation and prosperity in the digital era. &lt;/p&gt;

</description>
      <category>cloud</category>
      <category>beginners</category>
      <category>career</category>
    </item>
  </channel>
</rss>
