<?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: kranthi</title>
    <description>The latest articles on DEV Community by kranthi (@kranthi_putti).</description>
    <link>https://dev.to/kranthi_putti</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%2F1790978%2Fb0eba3a9-afa4-4f10-bf00-172c60f1ac05.jpg</url>
      <title>DEV Community: kranthi</title>
      <link>https://dev.to/kranthi_putti</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kranthi_putti"/>
    <language>en</language>
    <item>
      <title>[Boost]</title>
      <dc:creator>kranthi</dc:creator>
      <pubDate>Thu, 05 Jun 2025 07:05:04 +0000</pubDate>
      <link>https://dev.to/kranthi_putti/-5530</link>
      <guid>https://dev.to/kranthi_putti/-5530</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/kranthi_putti/mastering-aws-storage-services-s3-ebs-and-efs-3gon" class="crayons-story__hidden-navigation-link"&gt;Mastering AWS Storage Services: S3, EBS, and EFS&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/kranthi_putti" class="crayons-avatar  crayons-avatar--l  "&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%2Fuser%2Fprofile_image%2F1790978%2Fb0eba3a9-afa4-4f10-bf00-172c60f1ac05.jpg" alt="kranthi_putti profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/kranthi_putti" class="crayons-story__secondary fw-medium m:hidden"&gt;
              kranthi
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                kranthi
                
              
              &lt;div id="story-author-preview-content-2564475" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/kranthi_putti" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&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%2Fuser%2Fprofile_image%2F1790978%2Fb0eba3a9-afa4-4f10-bf00-172c60f1ac05.jpg" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;kranthi&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/kranthi_putti/mastering-aws-storage-services-s3-ebs-and-efs-3gon" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Jun 5 '25&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/kranthi_putti/mastering-aws-storage-services-s3-ebs-and-efs-3gon" id="article-link-2564475"&gt;
          Mastering AWS Storage Services: S3, EBS, and EFS
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/kranthi_putti/mastering-aws-storage-services-s3-ebs-and-efs-3gon" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;1&lt;span class="hidden s:inline"&gt; reaction&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/kranthi_putti/mastering-aws-storage-services-s3-ebs-and-efs-3gon#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              Comments


              &lt;span class="hidden s:inline"&gt;Add Comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            6 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
    </item>
    <item>
      <title>Mastering AWS Storage Services: S3, EBS, and EFS</title>
      <dc:creator>kranthi</dc:creator>
      <pubDate>Thu, 05 Jun 2025 06:56:11 +0000</pubDate>
      <link>https://dev.to/kranthi_putti/mastering-aws-storage-services-s3-ebs-and-efs-3gon</link>
      <guid>https://dev.to/kranthi_putti/mastering-aws-storage-services-s3-ebs-and-efs-3gon</guid>
      <description>&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%2F79weasmuwm3j9qrz3as6.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%2F79weasmuwm3j9qrz3as6.png" alt="Image description" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Amazon S3 (Simple Storage Service)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;• Object storage designed to store and retrieve any volume of data from anywhere on the web.&lt;br&gt;
• Provides 99.999999999% durability across multiple AZs.&lt;br&gt;
• Ideal for backups, data lakes, static websites, machine learning datasets, and log archives.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Amazon S3 Storage Classes&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. S3 Standard&lt;/strong&gt;&lt;br&gt;
This is the default and most commonly used storage class in Amazon S3. It's ideal for data that is frequently accessed, such as active application files, dynamic websites, and hot data analytics. It offers high availability, millisecond retrieval, and 11 nines (99.999999999%) of durability.&lt;br&gt;
Security features include SSE-S3, SSE-KMS encryption, IAM policies, ACLs, and bucket policies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. S3 Intelligent-Tiering&lt;/strong&gt;&lt;br&gt;
Designed for data with unpredictable access patterns, this class automatically moves objects between frequent and infrequent tiers based on usage. It offers the same high availability and millisecond latency as S3 Standard and maintains 11 nines of durability.&lt;br&gt;
It supports SSE-KMS encryption and features like Object Lock for compliance and immutability. Ideal when you want to optimize cost without affecting performance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. S3 Standard-IA (Infrequent Access)&lt;/strong&gt;&lt;br&gt;
This class is perfect for data that is not accessed frequently but must be quickly retrievable when needed—like backups or older logs. It provides high availability, millisecond retrieval times, and 11 nines of durability.&lt;br&gt;
Security options include MFA Delete, SSE-KMS encryption, and fine-grained access controls. It is more cost-effective than S3 Standard, but retrieval costs apply.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. S3 One Zone-IA&lt;/strong&gt;&lt;br&gt;
This is a cheaper version of Standard-IA but stores data in a single Availability Zone instead of multiple ones. It’s suitable for non-critical, infrequently accessed data like secondary backups or easily reproducible data.&lt;br&gt;
While it maintains millisecond access latency and 11 nines durability, it has lower availability and high risk if that one AZ fails. Encryption and access features include SSE-KMS, Object Lock, and IAM controls.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. S3 Glacier Instant Retrieval&lt;/strong&gt;&lt;br&gt;
Used for archival data that still requires instant access (e.g., medical images, financial records). It combines low-cost storage with millisecond retrieval, while still offering 11 nines durability.&lt;br&gt;
You get the benefits of Object Lock, SSE-KMS, and legal hold capabilities. Ideal when long-term storage is needed, but latency cannot be compromised.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. S3 Glacier Flexible Retrieval&lt;/strong&gt;&lt;br&gt;
Formerly known as "S3 Glacier", this class is great for long-term archives that are rarely accessed but occasionally needed. Retrieval times range from minutes to hours, and it’s cheaper than Instant Retrieval.&lt;br&gt;
It provides 11 nines durability, high availability, and supports event-based restore, encryption via SSE-KMS, and audit control through logging and monitoring tools.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. S3 Glacier Deep Archive&lt;/strong&gt;&lt;br&gt;
The lowest-cost storage option for rarely accessed data—like compliance archives or historical records. Retrieval times take hours, but it still guarantees 11 nines durability and high availability.&lt;br&gt;
Used with audit logging, SSE-KMS, and lifecycle policies, it’s perfect for long-term cold storage where retrieval time is not urgent.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Advanced Features:&lt;/strong&gt;&lt;/em&gt;&lt;br&gt;
• Lifecycle Policies: Automate transitions between classes to reduce costs.&lt;br&gt;
• Versioning &amp;amp; MFA Delete: Protects against accidental overwrites/deletions.&lt;br&gt;
• S3 Object Lock: WORM (Write Once Read Many) for regulatory compliance.&lt;br&gt;
• Cross-Region Replication (CRR): For DR and latency optimization.&lt;br&gt;
• Event Notifications: Trigger Lambda, SNS, or SQS for automated workflows.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Security Best Practices:&lt;/strong&gt;&lt;br&gt;
• Enforce least-privilege access using IAM policies.&lt;br&gt;
• Enable default encryption (SSE-KMS) at the bucket level.&lt;br&gt;
• Block all public access unless explicitly required.&lt;br&gt;
• Use S3 Access Analyzer and AWS Config rules for compliance checks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When to Use S3:&lt;/strong&gt;&lt;br&gt;
• Hosting static content like HTML/CSS for websites.&lt;br&gt;
• Storing backups, logs, or data for ML pipelines.&lt;br&gt;
• Archiving compliance data (e.g., logs, financial records).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Amazon EBS (Elastic Block Store)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;• High-performance block storage used in conjunction with EC2.&lt;br&gt;
• Provides persistent storage with low latency.&lt;br&gt;
• Supports dynamic scaling and high IOPS workloads.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Amazon EBS Volume Types&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. gp3 (General Purpose SSD)&lt;/strong&gt;&lt;br&gt;
The gp3 volume is the default choice for most general-purpose workloads on AWS. It is designed for use cases like boot volumes, small databases, and development/test environments. gp3 offers up to 16,000 IOPS and 1,000 MB/s throughput, regardless of volume size, making it more performant and cost-effective than its predecessor, gp2. It’s an SSD-backed volume, supporting encryption, snapshots, and provisioned IOPS, allowing you to tailor performance to workload needs without increasing capacity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. io2 and io2 Block Express (Provisioned IOPS SSD)&lt;/strong&gt;&lt;br&gt;
These high-performance SSD volumes are built for mission-critical applications such as large-scale relational and NoSQL databases, SAP HANA, and latency-sensitive transactional workloads. io2 supports up to 256,000 IOPS and 4,000 MB/s throughput, especially with Block Express architecture, which delivers consistent sub-millisecond latency. They offer higher durability (99.999%), multi-attach capability, and enhanced resiliency, making them ideal for enterprise-grade deployments. Encryption and snapshot support are fully integrated.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. st1 (Throughput Optimized HDD)&lt;/strong&gt;&lt;br&gt;
st1 volumes are HDD-based and designed for high-throughput workloads such as big data, data warehouses, and log processing systems. With up to 500 MB/s throughput and 500 IOPS, they are a cost-effective option for workloads that require sequential access over random I/O. While not ideal for boot volumes or transactional databases, st1 is a good fit for large-scale data lakes or analytical platforms.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. sc1 (Cold HDD)&lt;/strong&gt;&lt;br&gt;
The sc1 volume is optimized for infrequently accessed data, offering the lowest-cost magnetic storage on EBS. It is suitable for archival workloads, large-volume cold storage, and backups that are rarely retrieved. Performance is lower than st1, with up to 250 IOPS and 250 MB/s throughput, making it unsuitable for active use cases but valuable for minimizing costs in long-term storage scenarios.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Magnetic (Standard – Deprecated)&lt;/strong&gt;&lt;br&gt;
This legacy magnetic volume type is still available for older EC2 instances or legacy applications that were designed with it. It offers low performance, both in terms of throughput and IOPS, and is not recommended for new workloads unless absolutely required for compatibility reasons. AWS recommends moving to gp3 or st1 for modern applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advanced Features:&lt;/strong&gt;&lt;br&gt;
• Snapshots: Point-in-time backups that can be copied across regions.&lt;br&gt;
• Encryption: Fully managed using AWS KMS.&lt;br&gt;
• Elastic Volumes: Modify size, IOPS, or type without downtime.&lt;br&gt;
• Multi-Attach: Attach io2 volumes to multiple instances (Linux only).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Security Best Practices:&lt;/strong&gt;&lt;br&gt;
• Always encrypt volumes using KMS.&lt;br&gt;
• Implement automated snapshots using AWS Backup.&lt;br&gt;
• Enable CloudTrail for auditing volume operations.&lt;br&gt;
• Use tags for cost allocation and access control.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When to Use EBS:&lt;/strong&gt;&lt;br&gt;
• Boot volume for EC2 instances.&lt;br&gt;
• Databases like MySQL, PostgreSQL, Oracle.&lt;br&gt;
• Applications requiring high-throughput and low-latency.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;3. Amazon EFS (Elastic File System)&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;• Managed NFS-based file system that auto-scales to petabytes.&lt;br&gt;
• Accessible from multiple EC2s, ideal for shared workloads.&lt;br&gt;
• Available in multiple AZs for HA.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;EFS Performance &amp;amp; Throughput Modes&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;General Purpose Mode&lt;br&gt;
This is the default performance mode for Amazon EFS. It's optimized for low-latency operations and is ideal for workloads like CMS platforms, developer home directories, web serving, and shared development environments. This mode supports a burst model, allowing short-term high throughput and IOPS for small to medium-sized workloads, providing a great balance between cost and performance.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Max I/O Mode&lt;br&gt;
The Max I/O performance mode is designed for highly parallel and large-scale workloads, such as big data analytics, media processing pipelines, and machine learning datasets. While it provides higher aggregate throughput and IOPS, it may introduce slightly higher latencies compared to General Purpose mode. It's best suited for environments where scalability is more important than single-instance latency.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Storage Classes:&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
• Standard: Primary tier for hot data.&lt;br&gt;
• IA (Infrequent Access): Lower-cost tier for cold data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lifecycle Management:&lt;/strong&gt;&lt;br&gt;
• Automatically moves files between Standard and IA based on access &lt;br&gt;
patterns.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Security and Compliance:&lt;/strong&gt;&lt;br&gt;
• Supports encryption in transit and at rest (using KMS).&lt;br&gt;
• IAM policies + VPC security groups for access control.&lt;br&gt;
• POSIX file permissions for Linux workloads.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When to Use EFS:&lt;/strong&gt;&lt;br&gt;
• Shared storage for containers, Lambda, EC2.&lt;br&gt;
• Hosting WordPress, MediaWiki, or similar.&lt;br&gt;
• Real-time data processing or analytics.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best Practices:&lt;/strong&gt;&lt;br&gt;
• Use lifecycle management to control costs.&lt;br&gt;
• Enable logging with CloudTrail.&lt;br&gt;
• Choose the right performance mode based on workload.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Conclusion&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
Choosing the right AWS storage service depends on workload type, access &lt;br&gt;
pattern, and cost-performance tradeoffs.&lt;/p&gt;

&lt;p&gt;• S3 is unmatched for object storage, backups, and analytics.&lt;br&gt;
• EBS is critical for applications needing block-level performance and &lt;br&gt;
persistence.&lt;br&gt;
• EFS simplifies scalable file sharing and NFS-based workloads.&lt;br&gt;
Always benchmark performance, enable encryption, and apply access control &lt;br&gt;
policies across all services for a secure and optimized architecture.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Mastering Amazon EC2</title>
      <dc:creator>kranthi</dc:creator>
      <pubDate>Thu, 05 Jun 2025 06:34:44 +0000</pubDate>
      <link>https://dev.to/kranthi_putti/mastering-amazon-ec2-1970</link>
      <guid>https://dev.to/kranthi_putti/mastering-amazon-ec2-1970</guid>
      <description>&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%2F4mcxe174g9rynlx85pwl.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%2F4mcxe174g9rynlx85pwl.png" alt="Image description" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. What is Amazon EC2?&lt;/strong&gt;&lt;br&gt;
Amazon EC2 (Elastic Compute Cloud) is a web service that provides resizable compute capacity in the cloud. It’s designed to make web-scale cloud computing easier for developers. You can launch virtual servers (instances), configure networking and security, and manage storage.&lt;/p&gt;

&lt;p&gt;Core Capabilities:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; Launch and terminate instances on demand.&lt;/li&gt;
&lt;li&gt; Choose AMIs to define OS and software.&lt;/li&gt;
&lt;li&gt; Select instance types based on workload.&lt;/li&gt;
&lt;li&gt; Automate scaling and high availability.&lt;/li&gt;
&lt;li&gt; Integrate with Elastic Load Balancer and Auto Scaling.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. EC2 Instance Lifecycle&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; Pending – Instance is being launched.&lt;/li&gt;
&lt;li&gt; Running – Instance is active.&lt;/li&gt;
&lt;li&gt; Stopping – Instance is shutting down.&lt;/li&gt;
&lt;li&gt; Stopped – Instance is off but data is intact.&lt;/li&gt;
&lt;li&gt; Terminated – Instance is permanently deleted.&lt;/li&gt;
&lt;li&gt; EC2 Instance Types (With Use Cases)&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;General Purpose&lt;br&gt;
• t4g, t3, t2 – Low-cost, burstable performance.&lt;br&gt;
• Use Case: Development, testing, web servers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Compute Optimized&lt;br&gt;
• c7g, c6g, c5 – High-performance CPU.&lt;br&gt;
• Use Case: Batch processing, game servers, ML inference.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Memory Optimized&lt;br&gt;
• r6g, r5, x2idn – Large memory capacity.&lt;br&gt;
• Use Case: In-memory DBs, real-time analytics.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Storage Optimized&lt;br&gt;
• i4i, d3en, h1 – High IOPS and throughput.&lt;br&gt;
• Use Case: NoSQL DBs, big data workloads.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Accelerated Computing&lt;br&gt;
• p4, inf2, g5 – GPU-based.&lt;br&gt;
• Use Case: AI/ML, video processing, 3D rendering.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;4. Purchasing Options&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;On-Demand Instances&lt;br&gt;
• No upfront cost. Pay per second.&lt;br&gt;
• Ideal for unpredictable workloads.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Reserved Instances (RIs)&lt;br&gt;
• Commitment (1 or 3 years).&lt;br&gt;
• Up to 75% cost savings.&lt;br&gt;
• Convertible or Standard RIs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Savings Plans&lt;br&gt;
• Commitment on usage (EC2, Fargate, Lambda).&lt;br&gt;
• More flexibility than RIs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Spot Instances&lt;br&gt;
• Use spare capacity.&lt;br&gt;
• Up to 90% discount.&lt;br&gt;
• Suitable for fault-tolerant workloads.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Dedicated Hosts&lt;br&gt;
• Physical server for your use.&lt;br&gt;
• Bring Your Own License (BYOL).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;5. Elastic Load Balancing (ELB)&lt;/strong&gt;&lt;br&gt;
Distributes traffic to multiple EC2s.&lt;br&gt;
Types:&lt;br&gt;
• Application Load Balancer (ALB): HTTP, Web apps.&lt;br&gt;
• Network Load Balancer (NLB): TCP, low latency.&lt;br&gt;
• Gateway Load Balancer (GWLB): Third-party appliances.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Features:&lt;/strong&gt;&lt;br&gt;
• Health checks.&lt;br&gt;
• Sticky sessions.&lt;br&gt;
• SSL termination.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. EC2 Auto Scaling&lt;/strong&gt;&lt;br&gt;
Auto Scaling ensures availability and cost efficiency.&lt;br&gt;
Components:&lt;br&gt;
• Launch Template/Config&lt;br&gt;
• Auto Scaling Group (ASG)&lt;br&gt;
• Scaling Policies: Target, step, scheduled&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advanced Strategies:&lt;/strong&gt;&lt;br&gt;
• Predictive scaling&lt;br&gt;
• Lifecycle hooks&lt;br&gt;
• Warm pools&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. EC2 Storage and Volumes&lt;/strong&gt;&lt;br&gt;
EBS (Elastic Block Store):&lt;br&gt;
• gp3: General purpose&lt;br&gt;
• io1/io2: High IOPS&lt;br&gt;
• st1/sc1: Throughput and archival&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Instance Store:&lt;/strong&gt;&lt;br&gt;
• High-speed, ephemeral&lt;br&gt;
• Data lost on stop/terminate&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;EFS (Elastic File System):&lt;/strong&gt;&lt;br&gt;
• NFS file system&lt;br&gt;
• Scalable across multiple EC2&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Amazon FSx:&lt;/strong&gt;&lt;br&gt;
• Windows File Server, Lustre, NetApp ONTAP&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;8. AMIs and Snapshots&lt;/strong&gt;&lt;br&gt;
Amazon Machine Image (AMI):&lt;br&gt;
• Template to launch instances&lt;br&gt;
• Includes OS, configuration, apps&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Snapshots:&lt;/strong&gt;&lt;br&gt;
• Point-in-time backups of EBS volumes&lt;br&gt;
• Used to create AMIs&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Golden AMI Strategy:&lt;/strong&gt;&lt;br&gt;
• Hardened base image&lt;br&gt;
• Pre-installed apps and security settings&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;9. Backup Strategies&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;EBS Snapshots:&lt;br&gt;
• Manual or scheduled&lt;br&gt;
• Incremental backups&lt;/p&gt;

&lt;p&gt;AMI-Based Backups:&lt;br&gt;
• Save complete OS and data state&lt;/p&gt;

&lt;p&gt;AWS Backup:&lt;br&gt;
• Centralized backup across services&lt;/p&gt;

&lt;p&gt;Cross-region Backup:&lt;br&gt;
• Enable DR and compliance&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;10. EC2 Security Best Practices&lt;/strong&gt;&lt;br&gt;
Key Concepts:&lt;br&gt;
• Security Groups: Instance-level firewall&lt;br&gt;
• NACLs: Subnet-level control&lt;br&gt;
• Key Pairs: SSH authentication&lt;br&gt;
• IAM Roles: Secure access to AWS services&lt;br&gt;
• SSM: Secure shell-free management&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Hardening Tips:&lt;/strong&gt;&lt;br&gt;
• Disable root login&lt;br&gt;
• Regular patching&lt;br&gt;
• Use least privilege IAM policies&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;11. Monitoring and Logging&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;CloudWatch:&lt;br&gt;
• EC2 metrics, custom alarms&lt;br&gt;
• Log agent for file-level monitoring&lt;/p&gt;

&lt;p&gt;CloudTrail:&lt;br&gt;
• Record API activity&lt;/p&gt;

&lt;p&gt;EC2 Detailed Monitoring:&lt;br&gt;
• 1-minute interval metrics&lt;/p&gt;

&lt;p&gt;AWS Config:&lt;br&gt;
• Audit and compliance checks&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;12. Server Connectivity &amp;amp; Session Management&lt;/strong&gt;&lt;br&gt;
Linux:&lt;br&gt;
• SSH with PEM key&lt;br&gt;
• SSM Session Manager&lt;br&gt;
Windows:&lt;br&gt;
• RDP (Remote Desktop Protocol)&lt;br&gt;
• EC2 Connect for browser-based access&lt;br&gt;
Connection Tools:&lt;br&gt;
• Putty, Mobaxterm, VS Code SSH plugin&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;13. High Availability and Cost Optimization&lt;/strong&gt;&lt;br&gt;
High Availability:&lt;br&gt;
• Deploy in multiple AZs&lt;br&gt;
• Use Load Balancer + Auto Scaling&lt;br&gt;
• Elastic IP for static access&lt;/p&gt;

&lt;p&gt;Cost Optimization:&lt;br&gt;
• Choose right instance type&lt;br&gt;
• Use Spot and RIs where suitable&lt;br&gt;
• Use Auto Scaling to scale down&lt;br&gt;
• Schedule non-production shutdown&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;14. Real-Time Use Cases&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Web Hosting: Scalable app hosting with Auto Scaling + ALB&lt;/li&gt;
&lt;li&gt;Batch Jobs: Use Spot Instances for cost-effective processing&lt;/li&gt;
&lt;li&gt;Gaming: Low-latency game server on EC2&lt;/li&gt;
&lt;li&gt;CI/CD Runners: Host Jenkins or GitHub runners&lt;/li&gt;
&lt;li&gt;Dev/Test Environments: Spin up/down quickly&lt;/li&gt;
&lt;li&gt;AI/ML Training: Use GPU-based instances&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;EC2 Interview Questions&lt;br&gt;
Basic:&lt;br&gt;
• What is EC2?&lt;br&gt;
• How do you connect to EC2?&lt;br&gt;
• What are the differences between AMI and Snapshot?&lt;br&gt;
Intermediate:&lt;br&gt;
• How does Auto Scaling work?&lt;br&gt;
• Difference between Security Group and NACL?&lt;br&gt;
• What is the difference between instance store and EBS?&lt;br&gt;
Advanced:&lt;br&gt;
• Design a fault-tolerant EC2 architecture.&lt;br&gt;
• How do you implement patch management in EC2?&lt;br&gt;
• How do you maintain golden AMIs?&lt;br&gt;
• How do you monitor 100+ EC2 instances efficiently?&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                            © 2025 Kranthi – AWS Community Builder
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;

</description>
    </item>
    <item>
      <title>Automating detection and alerts of VPC endpoint changes using AWS CloudTrail, EventBridge, Lambda, SNS, to Email.</title>
      <dc:creator>kranthi</dc:creator>
      <pubDate>Wed, 21 May 2025 12:43:14 +0000</pubDate>
      <link>https://dev.to/kranthi_putti/automating-detection-and-alerts-of-vpc-endpoint-changes-using-aws-cloudtrail-eventbridge-lambda-3ob8</link>
      <guid>https://dev.to/kranthi_putti/automating-detection-and-alerts-of-vpc-endpoint-changes-using-aws-cloudtrail-eventbridge-lambda-3ob8</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/kranthi_putti/vpc-endpoint-monitoring-alerting-2dbi" class="crayons-story__hidden-navigation-link"&gt;VPC Endpoint Monitoring &amp;amp; Alerting&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/kranthi_putti" class="crayons-avatar  crayons-avatar--l  "&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%2Fuser%2Fprofile_image%2F1790978%2Fb0eba3a9-afa4-4f10-bf00-172c60f1ac05.jpg" alt="kranthi_putti profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/kranthi_putti" class="crayons-story__secondary fw-medium m:hidden"&gt;
              kranthi
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                kranthi
                
              
              &lt;div id="story-author-preview-content-2510968" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/kranthi_putti" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&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%2Fuser%2Fprofile_image%2F1790978%2Fb0eba3a9-afa4-4f10-bf00-172c60f1ac05.jpg" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;kranthi&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/kranthi_putti/vpc-endpoint-monitoring-alerting-2dbi" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;May 21 '25&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/kranthi_putti/vpc-endpoint-monitoring-alerting-2dbi" id="article-link-2510968"&gt;
          VPC Endpoint Monitoring &amp;amp; Alerting
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/kranthi_putti/vpc-endpoint-monitoring-alerting-2dbi" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;2&lt;span class="hidden s:inline"&gt; reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/kranthi_putti/vpc-endpoint-monitoring-alerting-2dbi#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              Comments


              &lt;span class="hidden s:inline"&gt;Add Comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            8 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
      <category>aws</category>
      <category>devops</category>
      <category>serverless</category>
      <category>monitoring</category>
    </item>
    <item>
      <title>VPC Endpoint Monitoring &amp; Alerting</title>
      <dc:creator>kranthi</dc:creator>
      <pubDate>Wed, 21 May 2025 12:42:26 +0000</pubDate>
      <link>https://dev.to/kranthi_putti/vpc-endpoint-monitoring-alerting-2dbi</link>
      <guid>https://dev.to/kranthi_putti/vpc-endpoint-monitoring-alerting-2dbi</guid>
      <description>&lt;p&gt;Automating detection and alerts of VPC endpoint changes using AWS&lt;br&gt;
CloudTrail, EventBridge, Lambda, SNS, to Email.&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%2F7u07zfn0k5mmtpuwv96d.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%2F7u07zfn0k5mmtpuwv96d.png" alt="Image description" width="800" height="780"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This demo demonstrates the automated monitoring of VPC &lt;br&gt;
endpoint events. The goal is to quickly detect when VPC endpoints are created, modified, or deleted and to alert the operations team in real time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Business Rationale:&lt;/strong&gt;&lt;br&gt;
In production environments, immediate detection of changes can help prevent configuration drift, reduce security risks, and ensure compliance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scope:&lt;/strong&gt;&lt;br&gt;
The PoC covers event capture using CloudTrail, event filtering with EventBridge, message formatting with Lambda, and alert distribution via SNS to email (with future integration to Microsoft Teams).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AWS CloudTrail:&lt;/strong&gt;&lt;br&gt;
Captures API calls made in your AWS account. All VPC endpoint events (CreateVpcEndpoint, ModifyVpcEndpoint, DeleteVpcEndpoints) are logged.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Amazon EventBridge:&lt;/strong&gt;&lt;br&gt;
Filters CloudTrail events using a specific event pattern. Only relevant VPC endpoint events trigger the next step.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AWS Lambda:&lt;/strong&gt;&lt;br&gt;
A Lambda function is triggered by EventBridge. This function formats the raw CloudTrail event data into a clear alert message.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Amazon SNS:&lt;/strong&gt;&lt;br&gt;
The formatted alert is published to an SNS topic, which then distributes notifications to subscribed email addresses.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;             **_Step-by-Step Implementation_**
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Step 1: Create the Sample VPC and Network Components&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a VPC:
• Navigate to VPC Console → Create VPC
• Enter details (e.g., CIDR 12.0.0.0/16) and name it “endpoint-vpc.”&lt;/li&gt;
&lt;li&gt;Create Subnets:
• Create at least two subnets in different Availability Zones.&lt;/li&gt;
&lt;li&gt;Create a Security Group:
• Define necessary inbound/outbound rules.&lt;/li&gt;
&lt;li&gt;Create a Route Table:
• Associate with the VPC for gateway-type endpoints.&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%2Fgrfpqfd3lwz19fho1zhl.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%2Fgrfpqfd3lwz19fho1zhl.png" alt="Image description" width="800" height="377"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Added an inbound rule (TCP 443) to the security group and attached it to the VPC endpoint for secure HTTPS communication.&lt;/li&gt;
&lt;/ul&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%2F0w5c3svvkes96eavis08.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%2F0w5c3svvkes96eavis08.png" alt="Image description" width="800" height="346"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                     **_CloudTrail Setup_**
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Step 1: Create a New Trail&lt;/strong&gt;&lt;br&gt;
• Navigated to AWS CloudTrail service.&lt;br&gt;
• Clicked on “Create trail”. • Provided a Trail name (e.g., VpcEndpointMonitoringTrail).&lt;br&gt;
• Selected “Create new S3 bucket” as the storage location.&lt;br&gt;
• Entered an appropriate bucket name (e.g., vpc-endpoint-logs-kranthi).&lt;br&gt;
• Enabled Log file validation for added integrity checks.&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%2Fpqwdiho5ai4evnk0b7hg.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%2Fpqwdiho5ai4evnk0b7hg.png" alt="Image description" width="800" height="368"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Step 2: Enable CloudWatch Logs Integration&lt;/strong&gt;&lt;br&gt;
• Under CloudWatch Logs, enabled “Send to CloudWatch Logs”. • Selected “Create new IAM role”. &lt;br&gt;
• Assigned a recognizable role name (CloudTrailDeliveryRoleVpcEndpoint).&lt;br&gt;
• This allows CloudTrail to send logs to CloudWatch for real-time &lt;br&gt;
monitoring and alerting.&lt;br&gt;
• Reviewed all settings, “Create trail”.&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%2Fx8icdvrmfrcf3j02dv0d.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%2Fx8icdvrmfrcf3j02dv0d.png" alt="Image description" width="800" height="409"&gt;&lt;/a&gt;&lt;br&gt;
• Confirmation message appeared stating the trail was created &lt;br&gt;
successfully.&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%2F2mbz2h6ilvxfjms0t0lo.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%2F2mbz2h6ilvxfjms0t0lo.png" alt="Image description" width="800" height="124"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Step 4: Verify S3 Bucket and Log Delivery&lt;/strong&gt;&lt;br&gt;
• Navigated to the S3 console. &lt;br&gt;
• Confirmed that the bucket (vpc-endpoint-logs-kranthi) was successfully created.&lt;br&gt;
• Verified that log files were being delivered to the bucket under the &lt;br&gt;
specified prefix structure ( AWSLogs//CloudTrail/).&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%2Fzf5hvleqnbofudbe1wgr.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%2Fzf5hvleqnbofudbe1wgr.png" alt="Image description" width="800" height="257"&gt;&lt;/a&gt;&lt;br&gt;
           &lt;strong&gt;&lt;em&gt;Amazon SNS Topic for Alerts setup&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
Create Amazon SNS Topic for Alerts&lt;br&gt;
• Navigated to the Amazon SNS console. &lt;br&gt;
• Chose to create a new topic.&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%2Fewosiy0ktxv2ssl40pmm.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%2Fewosiy0ktxv2ssl40pmm.png" alt="Image description" width="800" height="395"&gt;&lt;/a&gt;&lt;br&gt;
1.Selected Standard type.&lt;br&gt;
• Standard topics offer high throughput and best-effort ordering. &lt;br&gt;
• In contrast, FIFO topics provide strict ordering and exactly-once message delivery, but with lower throughput.&lt;br&gt;
2.Provided a name: vpc-endpoint-alert&lt;br&gt;
3.Create SNS topic.&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%2Fr9w2kwxxtf9kj8k0n470.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%2Fr9w2kwxxtf9kj8k0n470.png" alt="Image description" width="800" height="392"&gt;&lt;/a&gt;&lt;br&gt;
4.Create SNS Subscription&lt;br&gt;
• Clicked on the newly created topic to create a subscription.&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%2Fblpbxatnqtgihj9ak7by.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%2Fblpbxatnqtgihj9ak7by.png" alt="Image description" width="800" height="341"&gt;&lt;/a&gt;&lt;br&gt;
• Set the protocol as Email. &lt;br&gt;
• Entered the email address as the endpoint (&lt;a href="mailto:alerts@yourdomain.com"&gt;alerts@yourdomain.com&lt;/a&gt;).&lt;br&gt;
• Used the Topic ARN of the previously created SNS topic.&lt;br&gt;
• Subscription created successfully.&lt;br&gt;
• Verified that a confirmation email was sent to the specified email address.&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%2Frpe5p2xxkfgddb0wg13g.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%2Frpe5p2xxkfgddb0wg13g.png" alt="Image description" width="800" height="405"&gt;&lt;/a&gt;&lt;br&gt;
• Opened the subscription email and clicked the confirmation link to approve the SNS subscription.&lt;br&gt;
• The email endpoint was successfully confirmed to receive notifications.&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%2F8t3p1fdtankg43odhkon.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%2F8t3p1fdtankg43odhkon.png" alt="Image description" width="800" height="401"&gt;&lt;/a&gt;&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%2Fy1yov7chd7gtzb8ehn4h.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%2Fy1yov7chd7gtzb8ehn4h.png" alt="Image description" width="800" height="358"&gt;&lt;/a&gt;&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%2F2bz4oazfbw6j85tz38ez.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%2F2bz4oazfbw6j85tz38ez.png" alt="Image description" width="800" height="443"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Steps to Create Amazon EventBridge Rule&lt;br&gt;
1.Navigate to EventBridge Console&lt;br&gt;
• Open the AWS Management Console and go to Amazon EventBridge.&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%2Fgzd096cxg58i9jj2owvh.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%2Fgzd096cxg58i9jj2owvh.png" alt="Image description" width="800" height="410"&gt;&lt;/a&gt;&lt;br&gt;
2.Create Rule&lt;br&gt;
• Click on "Create rule" and proceed to define the rule details.&lt;br&gt;
3.Define Rule Details&lt;br&gt;
• Enter rule name: vpcendpointchangerule&lt;br&gt;
• Select Event Source as "Event Source with an event pattern"&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%2Fxrbqwd14vujkjxi8r8ah.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%2Fxrbqwd14vujkjxi8r8ah.png" alt="Image description" width="800" height="340"&gt;&lt;/a&gt;&lt;br&gt;
3.Configure Event Pattern&lt;br&gt;
• Choose "Build event pattern" &amp;gt; Other&lt;br&gt;
• Select Custom pattern (JSON editor)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
 "source": ["aws.ec2"],
 "detail-type": ["AWS API Call via CloudTrail"],
 "detail": {
 "eventSource": ["ec2.amazonaws.com"],
 "eventName": [
 "CreateVpcEndpoint",
 "ModifyVpcEndpoint",
 "DeleteVpcEndpoints"
 ]
 }}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;• Write custom event pattern that listens to VpcEndpoints actions.&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%2Fqka869t0ox3kq9mm4bef.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%2Fqka869t0ox3kq9mm4bef.png" alt="Image description" width="800" height="417"&gt;&lt;/a&gt;&lt;br&gt;
4.Add Target&lt;br&gt;
• Select Target 1 as AWS Service, Choose SNS topic. &lt;br&gt;
• Select the previously created topic: vpc-endpoint-alerts. &lt;br&gt;
• Choose to Create a new execution role. &lt;br&gt;
• Define a recognizable role name for easy identification.&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%2F66b3ai7311ak41b509w3.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%2F66b3ai7311ak41b509w3.png" alt="Image description" width="800" height="415"&gt;&lt;/a&gt;&lt;br&gt;
5.Review and Create&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%2Fjz5syfrkq90y8vxusd79.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%2Fjz5syfrkq90y8vxusd79.png" alt="Image description" width="800" height="555"&gt;&lt;/a&gt;&lt;br&gt;
• The final image confirms that the EventBridge rule vpcendpointchangerule was successfully created and is now active.&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%2Fzw46jtr6ig7e0iopjyek.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%2Fzw46jtr6ig7e0iopjyek.png" alt="Image description" width="800" height="360"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                  **_About VPC Endpoints_**
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;What is a VPC Endpoint?&lt;/strong&gt;&lt;br&gt;
A VPC endpoint enables private connectivity between your VPC and supported AWS services or VPC endpoint services, powered by PrivateLink, without requiring internet access, NAT gateway, or VPN.&lt;br&gt;
&lt;strong&gt;Use Cases&lt;/strong&gt;&lt;br&gt;
• Access Amazon S3 or DynamoDB from private subnets.&lt;br&gt;
• Enhance security by keeping traffic within the AWS network.&lt;br&gt;
• Reduce latency and data transfer costs. • Meet compliance and audit requirements for isolated networks.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   **_VPC Endpoint Creation &amp;amp; Email Notification Testing_**
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;Navigate to VPC Console
• Open the AWS Management Console and go to the VPC service. 
• In the Endpoints section, observe that no endpoints currently exist.&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%2Fboxmawoq82iplu9xqfhq.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%2Fboxmawoq82iplu9xqfhq.png" alt="Image description" width="800" height="310"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a New VPC Endpoint
• Click “Create endpoint”. 
• For Service category, select AWS Services. 
• In Service name, choose any supported AWS service.&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%2Fq4vafczhyc11ou0u999w.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%2Fq4vafczhyc11ou0u999w.png" alt="Image description" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;3. Configure VPC Settings&lt;/strong&gt;&lt;br&gt;
• Choose the VPC you created in the initial step of the POC.&lt;br&gt;
• Select appropriate subnets and route tables associated with your VPC.&lt;br&gt;
• Leave the default options or customize Policy as needed.&lt;br&gt;
• Click “Create endpoint”.&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%2Fskx47bapjo4cp36d7qd3.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%2Fskx47bapjo4cp36d7qd3.png" alt="Image description" width="800" height="418"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;4. Trigger and Validate Email Notification&lt;/strong&gt;&lt;br&gt;
• After creating the endpoint, the EventBridge rule triggers an SNS notification. &lt;br&gt;
• Check the configured email inbox and observe that anotification was received.&lt;br&gt;
• The notification, however, appears unstructured and raw, making it difficult to read or parse.&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%2Fk3qkxw7kq6g0szmi4zbd.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%2Fk3qkxw7kq6g0szmi4zbd.png" alt="Image description" width="800" height="390"&gt;&lt;/a&gt;&lt;br&gt;
     &lt;strong&gt;&lt;em&gt;Lambda Integration for Structured Notifications&lt;/em&gt;&lt;/strong&gt;&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%2F0hr02p4qdvzvdhdkw9tp.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%2F0hr02p4qdvzvdhdkw9tp.png" alt="Image description" width="800" height="374"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Why Use AWS Lambda?&lt;/strong&gt;&lt;br&gt;
AWS Lambda lets you run backend code without provisioning or managing servers. It's event-driven and integrates well with other AWS services.&lt;br&gt;
&lt;strong&gt;Common Use Cases for Lambda:&lt;/strong&gt; &lt;br&gt;
• Format and forward notifications.&lt;br&gt;
• Filter or enrich incoming events.&lt;br&gt;
• Automatically remediate certain changes.&lt;br&gt;
• Connect multiple AWS services efficiently.&lt;br&gt;
&lt;strong&gt;Purpose in This POC&lt;/strong&gt;&lt;br&gt;
In this POC, Lambda will:&lt;br&gt;
• Process the raw EventBridge message. &lt;br&gt;
• Convert it into a structured and readable format. &lt;br&gt;
• Send the refined output to the SNS topic, which emails it to recipients.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; **_Lambda Setup for Structuring Notifications_**
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;1. Create Lambda Function&lt;/strong&gt;&lt;br&gt;
• Navigate to the AWS Lambda Console and click “Create function.”&lt;br&gt;
• Select Author from scratch. &lt;br&gt;
• Enter the function name: formatvpcendpoint. &lt;br&gt;
• Choose Python 3.13 as the runtime.&lt;br&gt;
• Under Permissions, select Create a new role with basic Lambda &lt;br&gt;
permissions.&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%2Fumug6v2erbhp10m08gzr.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%2Fumug6v2erbhp10m08gzr.png" alt="Image description" width="800" height="404"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;2. Add Notification Formatting Code&lt;/strong&gt;&lt;br&gt;
• Paste the Python code that:&lt;br&gt;
Parses the incoming EventBridge JSON --&amp;gt;Formats key fields (action, time, VPC ID) --&amp;gt;Publishes the structured message to the SNS topic --&amp;gt; Save your changes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import os
import boto3
sns = boto3.client('sns')
def lambda_handler(event, context):
 topic_arn = os.environ.get('SNS_TOPIC_ARN')

 if not topic_arn:
 print(" SNS_TOPIC_ARN environment variable is not set.")
 return
 # build your message as you did
 message = (
 " *VPC Endpoint Alert*\n"
 f" Time: {event['time']}\n"
 f" Region: {event['region']}\n"
 f" User: {event['detail']['userIdentity'].get('userName', 'N/A')}\n"
 f" Action: {event['detail']['eventName']}\n"
 f" VPC ID: {event['detail']['requestParameters'].get('VpcId', 'N/A')}\n"
 f" Service: {event['detail']['requestParameters'].get('ServiceName', 'N/A')}\n"
 f"Check AWS Console for more details."
 )
 print("Formatted message:")
 print(message)
 sns.publish(
 TopicArn=topic_arn,
 Message=message,
 Subject=" VPC Endpoint Action Alert"
 )
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2F99cao5pgrqemd4dbl2he.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%2F99cao5pgrqemd4dbl2he.png" alt="Image description" width="800" height="432"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;3. Deploy and Test the Function&lt;/strong&gt;&lt;br&gt;
• Click “Deploy” to publish your function changes.&lt;br&gt;
• Use the “Test” feature to run the function with sample EventBridge event data and verify the output is formatted as expected.&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%2Fkangpq9uwuqb6muxrjro.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%2Fkangpq9uwuqb6muxrjro.png" alt="Image description" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Configure Environment Variables
• Go to the Configuration tab → Environment variables. 
• Add a key-value pair:
o Key: SNS_TOPIC_ARN
o Value: (Paste the ARN of the SNS topic created earlier, 
arn:aws:sns:ap-southeast-1:xxxxxxx:vpc-endpoint-alert)&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%2Fmb626w4m2d68wr53b9d8.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%2Fmb626w4m2d68wr53b9d8.png" alt="Image description" width="800" height="361"&gt;&lt;/a&gt;&lt;br&gt;
           &lt;strong&gt;&lt;em&gt;Update EventBridge Rule Target&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
• Go to Amazon EventBridge → Rules → Select your rule vpcendpointchangerule. &lt;br&gt;
• Edit the rule’s target: &lt;br&gt;
   o Change the target from SNS to Lambda function. &lt;br&gt;
   o Select the Lambda function formatvpcendpoint. &lt;br&gt;
• Save the updated rule configuration.&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%2F9h3w86l38mhmu87mf4dq.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%2F9h3w86l38mhmu87mf4dq.png" alt="Image description" width="800" height="419"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;&lt;em&gt;Important Troubleshooting Step – Resolving Lambda Permission Issue&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;em&gt;I successfully created a VPC endpoint, but did not receive any email notification.&lt;/em&gt; &lt;br&gt;
&lt;em&gt;This happened because the newly created Lambda function role lacked authorization to publish to the SNS topic.&lt;/em&gt;&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%2Ft11lkpbdsb1o7ex56p8y.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%2Ft11lkpbdsb1o7ex56p8y.png" alt="Image description" width="800" height="354"&gt;&lt;/a&gt;&lt;br&gt;
       &lt;strong&gt;&lt;em&gt;Handling Lambda Permission Error for SNS&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Step 1: Identifying the Issue&lt;/strong&gt;&lt;br&gt;
• After deploying the Lambda function and triggering the EventBridge rule, CloudWatch Logs showed an error indicating sns:Publish permission was denied. &lt;br&gt;
• This was an expected error, as the Lambda execution role was created with only basic Lambda permissions.&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%2Frq7n37mcmpx96a62be6d.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%2Frq7n37mcmpx96a62be6d.png" alt="Image description" width="800" height="78"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;     **_2: Resolving the Permission Issue: _**
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;• Created the following inline policy to allow the Lambda function to &lt;br&gt;
publish messages to the SNS topic:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
 "Version": "2012-10-17",
 "Statement": [
 {
 "Effect": "Allow",
 "Action": [
 "sns:Publish"
 ],
 "Resource": [
 "arn:aws:sns:ap-southeast-1:&amp;lt;AWS account number&amp;gt;:vpc-endpoint-alerts"
 ]
 }
 ]}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;• Attached this policy to the Lambda execution role.&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%2Fizwafsfpmrmip73i4dkv.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%2Fizwafsfpmrmip73i4dkv.png" alt="Image description" width="800" height="329"&gt;&lt;/a&gt;&lt;br&gt;
                            &lt;strong&gt;&lt;em&gt;Step 3: Verification&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
• Triggered a new VPC Endpoint creation to test the fix.&lt;br&gt;
• Checked CloudWatch Logs – the authorization error was resolved.&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%2Fc4zsybxvd0bjx80s1q7l.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%2Fc4zsybxvd0bjx80s1q7l.png" alt="Image description" width="800" height="298"&gt;&lt;/a&gt;&lt;br&gt;
• A structured email notification was received as expected, confirming end-to-end functionality.&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%2Fnd9acb46jt1r12uy3enu.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%2Fnd9acb46jt1r12uy3enu.png" alt="Image description" width="800" height="411"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Build a Multi-Tenant Monitoring System with RDS, Athena &amp; Glue – Step-by-Step!</title>
      <dc:creator>kranthi</dc:creator>
      <pubDate>Fri, 25 Apr 2025 08:35:02 +0000</pubDate>
      <link>https://dev.to/kranthi_putti/build-a-multi-tenant-monitoring-system-with-rds-athena-glue-step-by-step-4be6</link>
      <guid>https://dev.to/kranthi_putti/build-a-multi-tenant-monitoring-system-with-rds-athena-glue-step-by-step-4be6</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/kranthi_putti/building-a-multi-tenant-cost-tracking-performance-monitoring-solution-with-amazon-rds-athena-215f" class="crayons-story__hidden-navigation-link"&gt;Building a Multi-Tenant Cost Tracking &amp;amp; Performance Monitoring Solution with Amazon RDS, Athena, and Glue&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/kranthi_putti" class="crayons-avatar  crayons-avatar--l  "&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%2Fuser%2Fprofile_image%2F1790978%2Fb0eba3a9-afa4-4f10-bf00-172c60f1ac05.jpg" alt="kranthi_putti profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/kranthi_putti" class="crayons-story__secondary fw-medium m:hidden"&gt;
              kranthi
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                kranthi
                
              
              &lt;div id="story-author-preview-content-2432490" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/kranthi_putti" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&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%2Fuser%2Fprofile_image%2F1790978%2Fb0eba3a9-afa4-4f10-bf00-172c60f1ac05.jpg" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;kranthi&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/kranthi_putti/building-a-multi-tenant-cost-tracking-performance-monitoring-solution-with-amazon-rds-athena-215f" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Apr 25 '25&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/kranthi_putti/building-a-multi-tenant-cost-tracking-performance-monitoring-solution-with-amazon-rds-athena-215f" id="article-link-2432490"&gt;
          Building a Multi-Tenant Cost Tracking &amp;amp; Performance Monitoring Solution with Amazon RDS, Athena, and Glue
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/devops"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;devops&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/aws"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;aws&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/cloud"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;cloud&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/database"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;database&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/kranthi_putti/building-a-multi-tenant-cost-tracking-performance-monitoring-solution-with-amazon-rds-athena-215f" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/fire-f60e7a582391810302117f987b22a8ef04a2fe0df7e3258a5f49332df1cec71e.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;4&lt;span class="hidden s:inline"&gt; reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/kranthi_putti/building-a-multi-tenant-cost-tracking-performance-monitoring-solution-with-amazon-rds-athena-215f#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              Comments


              &lt;span class="hidden s:inline"&gt;Add Comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            15 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
      <category>devops</category>
      <category>aws</category>
      <category>cloud</category>
      <category>database</category>
    </item>
    <item>
      <title>Building a Multi-Tenant Cost Tracking &amp; Performance Monitoring Solution with Amazon RDS, Athena, and Glue</title>
      <dc:creator>kranthi</dc:creator>
      <pubDate>Fri, 25 Apr 2025 08:32:08 +0000</pubDate>
      <link>https://dev.to/kranthi_putti/building-a-multi-tenant-cost-tracking-performance-monitoring-solution-with-amazon-rds-athena-215f</link>
      <guid>https://dev.to/kranthi_putti/building-a-multi-tenant-cost-tracking-performance-monitoring-solution-with-amazon-rds-athena-215f</guid>
      <description>&lt;p&gt;Welcome! In this blog, we'll guide you through creating a multi-tenant performance and cost tracking solution using Amazon RDS (PostgreSQL), Athena, AWS Glue, and supporting AWS services. This solution is perfect for SaaS products requiring centralized monitoring, log analysis, and schema-level tenant isolation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Architecture Diagram - Multi-Tenant RDS Cost &amp;amp; Performance Analytics.&lt;/strong&gt;&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%2F1r8ygfw2378ncabojs6a.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%2F1r8ygfw2378ncabojs6a.png" alt="Image description" width="800" height="513"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Networking Setup&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Create a secure environment for hosting the RDS instance:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;VPC CIDR: 10.0.0.0/16&lt;/li&gt;
&lt;li&gt;Subnets: Create at least three across different Availability Zones&lt;/li&gt;
&lt;li&gt;Internet Gateway: Attach and update routing&lt;/li&gt;
&lt;li&gt;Route Table: Add custom routes for outbound traffic&lt;/li&gt;
&lt;li&gt;DNS Hostnames: Enable to facilitate RDS endpoint resolution&lt;/li&gt;
&lt;/ul&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%2F61ydp5mubs61ql22tpqg.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%2F61ydp5mubs61ql22tpqg.png" alt="Image description" width="800" height="475"&gt;&lt;/a&gt;&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%2Fyltsej343hcpybyosiqc.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%2Fyltsej343hcpybyosiqc.png" alt="Image description" width="800" height="434"&gt;&lt;/a&gt;&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%2Fnfyxv5c5hcrse1y68k26.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%2Fnfyxv5c5hcrse1y68k26.png" alt="Image description" width="800" height="243"&gt;&lt;/a&gt;&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%2Fvxdg2okhbunrkygrp6v9.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%2Fvxdg2okhbunrkygrp6v9.png" alt="Image description" width="800" height="327"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Deploy Amazon RDS (PostgreSQL)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Engine: PostgreSQL&lt;/li&gt;
&lt;li&gt;Instance Class: db.t3.micro (Free Tier eligible)&lt;/li&gt;
&lt;li&gt;Database Name: Champrds&lt;/li&gt;
&lt;li&gt;Storage: gp2 with autoscaling&lt;/li&gt;
&lt;li&gt;Network: Place the RDS in the custom VPC and subnet group&lt;/li&gt;
&lt;li&gt;Security: Allow port 5432 internally; enable deletion protection&lt;/li&gt;
&lt;li&gt;Monitoring: Enable Enhanced Monitoring and Performance Insights&lt;/li&gt;
&lt;li&gt;Logs: Export PostgreSQL logs to Amazon CloudWatch&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Subnet Group Configuration:&lt;/strong&gt;&lt;br&gt;
To define a group of subnets in multiple Availability Zones for Amazon RDS, enabling high availability and failover support.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Steps:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Created a DB Subnet Group using the previously created custom VPC named champ.&lt;/li&gt;
&lt;li&gt;Selected multiple Availability Zones to ensure redundancy.&lt;/li&gt;
&lt;/ul&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%2Fx2rtzlzf6ojv6q28exk1.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%2Fx2rtzlzf6ojv6q28exk1.png" alt="Image description" width="800" height="481"&gt;&lt;/a&gt;&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%2Fowyrllr2v4cna558c7rq.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%2Fowyrllr2v4cna558c7rq.png" alt="Image description" width="800" height="582"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Added the three private subnets to the subnet group&lt;/li&gt;
&lt;/ul&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%2Fr6y0jnds81z96gfcon66.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%2Fr6y0jnds81z96gfcon66.png" alt="Image description" width="800" height="377"&gt;&lt;/a&gt;&lt;br&gt;
The image shows the final confirmation screen of the DB Subnet Group named champsubnet-group, associated with three subnets across different AZs.&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%2F8otuvneudvjx2545ngbu.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%2F8otuvneudvjx2545ngbu.png" alt="Image description" width="800" height="378"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Amazon RDS (PostgreSQL) Configuration:&lt;/strong&gt;&lt;br&gt;
To provision a managed PostgreSQL database instance with support for multi-tenant architecture and performance monitoring.&lt;br&gt;
&lt;strong&gt;Why PostgreSQL?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open-source, highly reliable, and feature-rich.&lt;/li&gt;
&lt;li&gt;Strong support for schema-based multi-tenancy.&lt;/li&gt;
&lt;li&gt;Compatible with AWS services like Performance Insights, CloudWatch, and extensions like pg_stat_statements.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;*&lt;em&gt;Steps: *&lt;/em&gt;&lt;br&gt;
• Selected Amazon RDS from the AWS Console.&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%2F78iwyfkx2coimq6bwob9.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%2F78iwyfkx2coimq6bwob9.png" alt="Image description" width="800" height="398"&gt;&lt;/a&gt;&lt;br&gt;
• Chose PostgreSQL as the database engine.&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%2F2nblmwgc6ztwtf8jrxvq.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%2F2nblmwgc6ztwtf8jrxvq.png" alt="Image description" width="800" height="375"&gt;&lt;/a&gt;&lt;br&gt;
• In Templates, selected Free Tier.&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%2Fsowhvshgvnw11p9sbs98.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%2Fsowhvshgvnw11p9sbs98.png" alt="Image description" width="800" height="390"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Set DB instance identifier as champDB-1.&lt;/li&gt;
&lt;li&gt;Under Credential Settings, chose Self-managed credentials.&lt;/li&gt;
&lt;li&gt;Provided custom master username.&lt;/li&gt;
&lt;li&gt;Set a strong password.&lt;/li&gt;
&lt;/ul&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%2Fdp4n790r04nxs7wi2k7n.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%2Fdp4n790r04nxs7wi2k7n.png" alt="Image description" width="800" height="381"&gt;&lt;/a&gt;&lt;br&gt;
• Selected Burstable instance class (db.t3.micro) for cost-effective performance.&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%2F041h5lhg17eahp1se06v.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%2F041h5lhg17eahp1se06v.png" alt="Image description" width="731" height="380"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;• Chose General Purpose (SSD) – gp2&lt;br&gt;
• Allocated required initial storage&lt;br&gt;
• Enabled Storage Auto Scaling. &lt;br&gt;
• Set Maximum storage threshold&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%2Frip9rn66h2jfaim8vq6q.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%2Frip9rn66h2jfaim8vq6q.png" alt="Image description" width="751" height="459"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;• Chose Not to connect to EC2 as the DB will be accessed using pgAdmin. &lt;br&gt;
• Selected the custom VPC created earlier (champ)&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%2Fs96hxkq9rbs66x0pfalr.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%2Fs96hxkq9rbs66x0pfalr.png" alt="Image description" width="800" height="328"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;• Selected the DB Subnet Group previous &lt;br&gt;
• Created a new Security Group: - Opened port 5432 (PostgreSQL default) for inbound access.&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%2F8pqjhzrif57uporfd6ek.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%2F8pqjhzrif57uporfd6ek.png" alt="Image description" width="800" height="362"&gt;&lt;/a&gt;&lt;br&gt;
• Selected Password Authentication for database login.&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%2Fwou86edq51pw9ervcne4.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%2Fwou86edq51pw9ervcne4.png" alt="Image description" width="800" height="159"&gt;&lt;/a&gt;&lt;br&gt;
• Enabled Enhanced Monitoring for real-time metrics on the database instance.&lt;br&gt;
• Enabled Performance Insights for in-depth query and load analysis.&lt;br&gt;
&lt;strong&gt;_Purpose and Benefits of Enhanced Monitoring&lt;/strong&gt;_&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;- Provides real-time OS-level metrics such as CPU, memory, disk I/O, and network usage.&lt;/li&gt;
&lt;li&gt;- Helps in identifying performance bottlenecks at the instance level.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Performance Insights&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;- Visualizes database load and query performance over time.&lt;/li&gt;
&lt;li&gt;- Helps in identifying slow or expensive queries.&lt;/li&gt;
&lt;li&gt;- Supports deeper optimization by showing wait events and resource usage patterns.
&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%2Fd6pjlpzztl13q74x6d95.png" alt="Image description" width="800" height="192"&gt;
&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%2Fnay13wi0g9eg2bprgd9w.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%2Fnay13wi0g9eg2bprgd9w.png" alt="Image description" width="800" height="386"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Enabled PostgreSQL log under Log exports to Amazon CloudWatch Logs.&lt;/strong&gt;&lt;br&gt;
To capture and centralize PostgreSQL database logs (including general activity, connections, and errors) in CloudWatch Logs for further analysis, alerting, and integration with downstream services like S3, Athena, and Glue.&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%2Fyrjnm6q73xzdk58coj3w.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%2Fyrjnm6q73xzdk58coj3w.png" alt="Image description" width="800" height="392"&gt;&lt;/a&gt;&lt;br&gt;
• Set the Initial database name as Champrds.&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%2Ffu9iq4u6wwjtabj0wezw.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%2Ffu9iq4u6wwjtabj0wezw.png" alt="Image description" width="800" height="529"&gt;&lt;/a&gt;&lt;br&gt;
• Enabled Deletion Protection to prevent accidental deletion of the RDS instance.&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%2Fxks6615v0ke5fg3jqvfz.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%2Fxks6615v0ke5fg3jqvfz.png" alt="Image description" width="800" height="435"&gt;&lt;/a&gt;&lt;br&gt;
• Created the PostgreSQL database instance with the name Champrds.&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%2F79f1cwdbcns1ovzbi4u9.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%2F79f1cwdbcns1ovzbi4u9.png" alt="Image description" width="800" height="180"&gt;&lt;/a&gt;&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%2Fp6rcb17pui5e93l8pmtl.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%2Fp6rcb17pui5e93l8pmtl.png" alt="Image description" width="800" height="225"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Once the RDS instance reached Available status: The Current Activity tab became visible in the RDS console&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;This tab provides real-time query and session metrics using Performance Insights.&lt;/li&gt;
&lt;li&gt;Helps in monitoring active connections, SQL queries, waits, and database load trends.&lt;/li&gt;
&lt;/ul&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%2Fnwtghash3hch0kbsf2ws.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%2Fnwtghash3hch0kbsf2ws.png" alt="Image description" width="800" height="139"&gt;&lt;/a&gt;&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%2Fuvoy1rs8de7mnelzl6un.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%2Fuvoy1rs8de7mnelzl6un.png" alt="Image description" width="800" height="307"&gt;&lt;/a&gt;&lt;br&gt;
• Navigated to Amazon CloudWatch Logs: Verified that a new Log Group was created for the RDS instance.&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%2F9ax3865tkuxmx20t591o.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%2F9ax3865tkuxmx20t591o.png" alt="Image description" width="800" height="132"&gt;&lt;/a&gt;&lt;br&gt;
• Installed the latest version of pgAdmin from the official pgAdmin website.&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%2F2nf5sr90r714cp2ewr5e.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%2F2nf5sr90r714cp2ewr5e.png" alt="Image description" width="800" height="446"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Collected the following connection details from the RDS console:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Endpoint (hostname)&lt;/li&gt;
&lt;li&gt;Port (5432)&lt;/li&gt;
&lt;li&gt;Master username and password&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Database name: Champrds&lt;br&gt;
&lt;strong&gt;In pgAdmin:&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Created a new server connection.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&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%2F525u2g1zby3ss6l34tnn.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%2F525u2g1zby3ss6l34tnn.png" alt="Image description" width="790" height="463"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Entered the RDS endpoint and credentials.&lt;/strong&gt;&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%2F36xa5s80pzutkx3xohm4.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%2F36xa5s80pzutkx3xohm4.png" alt="Image description" width="797" height="521"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Successfully established the connection to the PostgreSQL RDS instance.&lt;/strong&gt;&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%2Fs1eb41yyoht8lts1jj5g.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%2Fs1eb41yyoht8lts1jj5g.png" alt="Image description" width="800" height="434"&gt;&lt;/a&gt;&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%2Fam7a453czz7tz7dpculp.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%2Fam7a453czz7tz7dpculp.png" alt="Image description" width="800" height="370"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Multi-Tenancy in PostgreSQL – Concept and Use Case&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Multi-Tenancy?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Multi-tenancy is a database architecture pattern where a single database instance serves multiple users or organizations (called tenants). Each tenant's data is isolated logically, even though they share the same infrastructure.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Use Multi-Tenancy?&lt;/strong&gt;&lt;br&gt;
This approach is widely adopted for:&lt;br&gt;
• Cost efficiency – one DB instance for many users&lt;br&gt;
• Simplified management – easier to maintain and monitor&lt;br&gt;
• Scalability – add new users without deploying separate databases&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Step 1: Login as Admin&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Connect to RDS database (Champrds) using the master user credentials via pgAdmin.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Step 2: Create Tenant Users&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;-- Create tenant users
CREATE USER advent WITH PASSWORD 'AdventStrongPass1';
CREATE USER "6thgen" WITH PASSWORD 'SixthGenStrongPass1';
CREATE USER isalam WITH PASSWORD 'IsalamStrongPass1';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Fy9zfui0a77fpu6h12fay.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%2Fy9zfui0a77fpu6h12fay.png" alt="Image description" width="800" height="368"&gt;&lt;/a&gt;&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%2Fvsjdxke9ar1da0mv0nm6.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%2Fvsjdxke9ar1da0mv0nm6.png" alt="Image description" width="800" height="435"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create Schemas For AUTHORIZATION
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;-- Create schemas WITHOUT the AUTHORIZATION clause
CREATE SCHEMA advent;
CREATE SCHEMA "6thgen";
CREATE SCHEMA isalam;
-- Grant access to respective users
GRANT USAGE ON SCHEMA advent TO advent;
GRANT USAGE ON SCHEMA "6thgen" TO "6thgen";
GRANT USAGE ON SCHEMA isalam TO isalam;
-- Allow tenants to create objects in their schemas
GRANT CREATE ON SCHEMA advent TO advent;
GRANT CREATE ON SCHEMA "6thgen" TO "6thgen";
GRANT CREATE ON SCHEMA isalam TO isalam;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2F5d5rtz9gjci7lhrqrgxn.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%2F5d5rtz9gjci7lhrqrgxn.png" alt="Image description" width="800" height="394"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Set Default Schema for Each User (Search Path) You can set the default schema for each user, so they don’t need to set it manually:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ALTER ROLE advent SET search_path = advent;
ALTER ROLE "6thgen" SET search_path = "6thgen";
ALTER ROLE isalam SET search_path = isalam;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Fkq73ekj1q87nklpv6clm.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%2Fkq73ekj1q87nklpv6clm.png" alt="Image description" width="800" height="394"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Now each user:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Has their own schema&lt;/li&gt;
&lt;li&gt;Can create and use their own tables&lt;/li&gt;
&lt;li&gt;Won’t get into privilege issues&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Verifying Multi-Tenant Access via pgAdmin:&lt;br&gt;
Used pgAdmin to connect individually as each tenant user: 6thgen&lt;/strong&gt;&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%2F67r4qm42xtwhyuxjkfqv.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%2F67r4qm42xtwhyuxjkfqv.png" alt="Image description" width="800" height="505"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Verified successful login and access to the shared database for all tenant users via separate sessions.&lt;/strong&gt;&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%2Fesk2a8igqcqnne0admpa.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%2Fesk2a8igqcqnne0admpa.png" alt="Image description" width="800" height="419"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Monitoring and Analyzing Tenant Activity&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Running Sample Queries for Each Tenant&lt;/li&gt;
&lt;li&gt;Simulating High CPU Load &amp;amp; Slow Queries&lt;/li&gt;
&lt;li&gt;Checking Tenant-wise Usage Patterns&lt;/li&gt;
&lt;li&gt;Analyzing Performance with Performance Insights Dashboard&lt;/li&gt;
&lt;li&gt;Identifying Top Queries and High-Load Users&lt;/li&gt;
&lt;li&gt;Mimicking Real-Time Multi-Tenant Application Behavior&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Simulate Activity for Each Tenant User&lt;/strong&gt;&lt;br&gt;
You'll now open a query tool in each tenant session and run different types of queries to simulate: Normal usage, Heavy joins, Slow queries, High CPU usage.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Query To Simulate moderate insert/update activity:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CREATE TABLE IF NOT EXISTS test_data_advent (id SERIAL, name TEXT, created_at 
TIMESTAMP DEFAULT now());
INSERT INTO test_data_advent (name) 
SELECT 'User ' || generate_series(1, 10000);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Query To Simulate a CPU-heavy query:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;WITH RECURSIVE nums AS (
 SELECT 1 AS n
 UNION ALL
 SELECT n + 1 FROM nums WHERE n &amp;lt; 100000
)
SELECT COUNT(*) FROM nums;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Query To Simulate a slow query using a sleep function:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT pg_sleep(10);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Fmsq3h3kf3itmwjwzubfy.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%2Fmsq3h3kf3itmwjwzubfy.png" alt="Image description" width="800" height="408"&gt;&lt;/a&gt;&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%2F5i70mpre9w9n0r6qx99v.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%2F5i70mpre9w9n0r6qx99v.png" alt="Image description" width="800" height="486"&gt;&lt;/a&gt;&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%2Feh9vfhltruzf3v8e1k6x.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%2Feh9vfhltruzf3v8e1k6x.png" alt="Image description" width="800" height="483"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Monitoring with RDS Performance Insights:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Amazon RDS Performance Insights is a powerful tool that helps monitor and analyze database performance in real time. It provides insights into SQL queries, wait events, top resource-consuming users, and helps identify performance bottlenecks. In a multi-tenant setup, this is especially useful to observe how different tenants are impacting the database &lt;br&gt;
load and optimize resource usage accordingly&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Check Performance Insights: *&lt;/em&gt;&lt;br&gt;
&lt;em&gt;Once the queries are running:&lt;/em&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to RDS &amp;gt; Performance Insights&lt;/li&gt;
&lt;li&gt;Choose your PostgreSQL RDS instance&lt;/li&gt;
&lt;li&gt;Check for: &lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Top SQL queries&lt;/li&gt;
&lt;li&gt;Load by user (advent, 6thgen, isalam)&lt;/li&gt;
&lt;li&gt;CPU, I/O graphs
You’ll see these users now show up in the “Top Load” section.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Top Users Overview:&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Performance Insights dashboard displays the top users accessing the database.&lt;/li&gt;
&lt;li&gt;Verified all three tenant users (advent, 6thgen, isalam) are actively visible.&lt;/li&gt;
&lt;/ul&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%2Fl467dhl8492a7jxszlkr.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%2Fl467dhl8492a7jxszlkr.png" alt="Image description" width="800" height="384"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Individual User CPU Usage:&lt;/strong&gt; &lt;br&gt;
• Shows detailed CPU consumption for each user.&lt;br&gt;
• Helps identify resource-heavy users or inefficient queries per tenant.&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%2F7ic9v1ylnal96jufbi47.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%2F7ic9v1ylnal96jufbi47.png" alt="Image description" width="800" height="374"&gt;&lt;/a&gt;&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%2Fca4amlbucy242ll16saa.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%2Fca4amlbucy242ll16saa.png" alt="Image description" width="800" height="381"&gt;&lt;/a&gt;&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%2Fywjzvrhj986hbbxrllmj.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%2Fywjzvrhj986hbbxrllmj.png" alt="Image description" width="800" height="373"&gt;&lt;/a&gt;&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%2F0qr64ukvaavo4c6bbnht.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%2F0qr64ukvaavo4c6bbnht.png" alt="Image description" width="800" height="423"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Verified current host IP online and matched it with dashboard.&lt;/li&gt;
&lt;/ul&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%2F9aq4oos7oia4bw56o9xf.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%2F9aq4oos7oia4bw56o9xf.png" alt="Image description" width="800" height="304"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Connected from a different network (host) by sharing user credentials&lt;/li&gt;
&lt;/ul&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%2Fzv2q376lnhid7qdzqgu4.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%2Fzv2q376lnhid7qdzqgu4.png" alt="Image description" width="800" height="408"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;• Connected from a different network (host) by sharing user credentials. Dashboard&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%2F6festq9h6nbef7qmuqme.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%2F6festq9h6nbef7qmuqme.png" alt="Image description" width="704" height="233"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Using AWS security groups or AWS Network ACLs, we can restrict access to the RDS instance by allowing connections only from trusted IP addresses (hosts). This ensures only known networks can access the database, enhancing security in a multi-tenant setup.&lt;br&gt;
ex: (optional) &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%2Fqy689gn6ezf10ht1mxfy.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%2Fqy689gn6ezf10ht1mxfy.png" alt="Image description" width="800" height="126"&gt;&lt;/a&gt;&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%2Fhxljkm0fy7jjvdd0laeo.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%2Fhxljkm0fy7jjvdd0laeo.png" alt="Image description" width="800" height="126"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Exporting RDS Logs from CloudWatch to S3 and Analyzing with Athena:&lt;/strong&gt; &lt;br&gt;
The main goal is to make RDS logs easily accessible and queryable for operational insights, debugging, and audit trails. By exporting logs from CloudWatch to Amazon S3 and integrating with Athena, we can run SQL queries on log data without maintaining infrastructure—providing a serverless, cost-effective, and scalable analytics solution&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Approach:&lt;/strong&gt;&lt;br&gt;
To achieve this, two methods were used:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. AWS Glue Integration:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Set up a Glue Crawler to scan and catalog log data in S3.&lt;/li&gt;
&lt;li&gt;Created a Glue ETL Job to transform logs for structured querying.&lt;/li&gt;
&lt;li&gt;Integrated the cataloged data with Athena for optimized analysis.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Direct Athena Table Setup:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Used Athena to directly point to the S3 bucket containing exported logs.&lt;/li&gt;
&lt;li&gt;Created an external table by specifying the log file format and S3 path.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Pre-requisites:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create an Amazon S3 bucket to store exported RDS logs from CloudWatch.&lt;/li&gt;
&lt;/ul&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%2Fexl91uw5e3eu0o0ecir0.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%2Fexl91uw5e3eu0o0ecir0.png" alt="Image description" width="800" height="236"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Attach the appropriate bucket policy to allow CloudWatch Logs to write data to the S3 bucket.&lt;/li&gt;
&lt;/ul&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%2Feobvwlbqmgv77f85znof.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%2Feobvwlbqmgv77f85znof.png" alt="Image description" width="800" height="311"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Steps to Export RDS Logs from CloudWatch to Amazon S3&lt;/strong&gt;: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to CloudWatch &amp;gt; Logs &amp;gt; Log groups
&lt;code&gt;/aws/rds/instance/champdb-1/postgresql&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&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%2Fyh5h1j1risavjvcmo008.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%2Fyh5h1j1risavjvcmo008.png" alt="Image description" width="800" height="164"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create an Export Task from CloudWatch:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to the slowquery log group&lt;/li&gt;
&lt;li&gt;Click “Actions” → Export Data to Amazon S3&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Choose:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Time range (based on requirement)&lt;/li&gt;
&lt;li&gt;Target S3 bucket and prefix (folder)&lt;/li&gt;
&lt;li&gt;Start export&lt;/li&gt;
&lt;/ul&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%2Fjziuruimengqre1w7r8n.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%2Fjziuruimengqre1w7r8n.png" alt="Image description" width="800" height="491"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It will create a folder in your S3 like:&lt;/li&gt;
&lt;/ul&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%2Fy5vh065zelonilbvup80.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%2Fy5vh065zelonilbvup80.png" alt="Image description" width="800" height="125"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Transforming RDS Logs with AWS Glue ETL for Structured Analysis&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;AWS Glue *&lt;/em&gt;&lt;br&gt;
Amazon Glue is a fully managed ETL (Extract, Transform, Load) &lt;br&gt;
service that helps prepare and transform data for analytics. It &lt;br&gt;
integrates with S3, Athena, and the Glue Data Catalog, making it easy to automate data pipelines and query structured data.&lt;/p&gt;

&lt;p&gt;** Problem:**&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;After exporting RDS logs from CloudWatch Logs to Amazon S3, the files are in .gz compressed text format. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;AWS Glue Crawlers do not support parsing .gz plain text files directly for schema inference.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;AWS Glue supports formats like JSON, CSV, Parquet, Avro, and ORC etc.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;This limits our ability to use Glue Data Catalog or Athena for querying logs efficiently.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We created an AWS Glue ETL Job to transform .gz log files into structured JSON format. &lt;/li&gt;
&lt;li&gt;JSON format is fully supported by Glue, allowing schema detection and query execution in Athena.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Benefits of Using Glue ETL:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Automates the transformation of raw logs into readable formats.&lt;/li&gt;
&lt;li&gt;Enables seamless querying in Amazon Athena for log analysis.&lt;/li&gt;
&lt;li&gt;Mimics real-world operational use cases like monitoring slow queries, high CPUusage, or user access patterns.&lt;/li&gt;
&lt;li&gt; Supports building dashboards in tools like Amazon QuickSight using structured log data.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;ETL Job Creation for Log Format Transformation&lt;/strong&gt;&lt;br&gt;
To convert exported .gz log files from CloudWatch into a JSON-compatible format that AWS Glue can process for querying in Athena.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Steps to Create ETL Job:&lt;/strong&gt;&lt;br&gt;
1.Go to AWS Console, search and open AWS Glue, then select "Jobs" under the ETL section.&lt;br&gt;
2.Click “Add job” and choose “Script editor” to manually write the ETL script.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Other available options:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Visual ETL – Drag-and-drop interface, ideal for quick workflows.&lt;/li&gt;
&lt;li&gt;Notebook – Use Jupyter-style interactive environment for advanced development.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;In the script editor:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Wrote and added a transformation script to parse .gz text logs to structured JSON.&lt;/li&gt;
&lt;li&gt;Gave a job title for identification.&lt;/li&gt;
&lt;/ul&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%2Fj82dp9zai5n5chdbyc05.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%2Fj82dp9zai5n5chdbyc05.png" alt="Image description" width="800" height="257"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Selected Spark as the engine.&lt;/li&gt;
&lt;/ul&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%2F9zlkfztdthlvqedyi6yz.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%2F9zlkfztdthlvqedyi6yz.png" alt="Image description" width="800" height="294"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Wrote and added a transformation script to parse .gz text logs to structured JSON.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import sys
import boto3
import gzip
import json
import re
from io import BytesIO
# Initialize the Glue context
from awsglue.context import GlueContext
from pyspark.context import SparkContext
sc = SparkContext()
glueContext = GlueContext(sc)
# S3 Bucket and Paths for Input and Output
input_s3_bucket = 'new-rds-champ'
input_s3_key = 'logs/6f8dd69a-ff1a-4fb7-a5b9-cf029a6380de/champdb-1.0/000000.gz'
output_s3_bucket = 'new-rds-champ'
output_s3_key = 'parsed_logs/output/'
# Read the .gz file from S3
def read_gz_file_from_s3(bucket, key):
 s3 = boto3.client('s3')
 obj = s3.get_object(Bucket=bucket, Key=key)
 gzipped_content = obj['Body'].read()
 with gzip.GzipFile(fileobj=BytesIO(gzipped_content), mode='rb') as f:
 return f.read().decode('utf-8')
# Parse the log line to extract timestamp, IP, log_level, and message using regex
def parse_log_line(log_line):
 # Example regex: Modify based on your log format
 log_pattern = 
r'(?P&amp;lt;timestamp&amp;gt;\S+)\s+(?P&amp;lt;ip&amp;gt;\S+)\s+(?P&amp;lt;log_level&amp;gt;\S+)\s+(?P&amp;lt;message&amp;gt;.+)'
 match = re.match(log_pattern, log_line)

 if match:
 return match.groupdict()
 return None
# Read the gzipped file from S3
log_data = read_gz_file_from_s3(input_s3_bucket, input_s3_key)
# Split the data into lines and parse each line
parsed_logs = []
for log_line in log_data.splitlines():
 parsed_log = parse_log_line(log_line)
 if parsed_log:
 parsed_logs.append(parsed_log)
# Write the parsed logs to S3 as JSON
def write_parsed_logs_to_s3(bucket, key, parsed_logs):
 s3 = boto3.client('s3')
 json_data = json.dumps(parsed_logs)
 s3.put_object(Bucket=bucket, Key=key, Body=json_data)
# Output path for parsed logs
output_s3_path = f'{output_s3_key}parsed_logs.json'
write_parsed_logs_to_s3(output_s3_bucket, output_s3_path, parsed_logs)
print(f"Parsed logs successfully written to: s3://{output_s3_bucket}/{output_s3_path}")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2F2ufyrgojf5pnbtltigp7.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%2F2ufyrgojf5pnbtltigp7.png" alt="Image description" width="800" height="412"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Gave a job title for identification.&lt;/li&gt;
&lt;li&gt;Provided an appropriate IAM Role with access to S3 and Glue.&lt;/li&gt;
&lt;/ul&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%2F7z25qemaju4ov9c5kizr.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%2F7z25qemaju4ov9c5kizr.png" alt="Image description" width="800" height="747"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;• Updated and ran the job successfully.&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%2F4rhsrnvmhirt577s1j2e.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%2F4rhsrnvmhirt577s1j2e.png" alt="Image description" width="800" height="408"&gt;&lt;/a&gt;&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%2Fsnl5gme9jl3oltw50t5o.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%2Fsnl5gme9jl3oltw50t5o.png" alt="Image description" width="800" height="291"&gt;&lt;/a&gt;&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%2F2ifyavki7o4hmvch0e4d.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%2F2ifyavki7o4hmvch0e4d.png" alt="Image description" width="800" height="397"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;After completion:&lt;/strong&gt;&lt;br&gt;
A new folder was created in S3 (parsed_log/).&lt;br&gt;
Inside that folder, parsed and structured log files were saved (parsed_logs.json).&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%2F6m496gdowy0uekc7uowj.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%2F6m496gdowy0uekc7uowj.png" alt="Image description" width="800" height="242"&gt;&lt;/a&gt;&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%2F3koer829ocoqnru5mcm0.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%2F3koer829ocoqnru5mcm0.png" alt="Image description" width="800" height="418"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Creating Glue Database for Athena Integration&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Purpose:&lt;/strong&gt;&lt;br&gt;
To catalog and manage structured metadata from parsed S3 data, enabling Athena to run SQL queries on it.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to AWS Console, search and open AWS Glue.&lt;/li&gt;
&lt;li&gt;In the Databases section, click “Add database”.&lt;/li&gt;
&lt;/ul&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%2Fiw1fknx0pis88c0k7vba.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%2Fiw1fknx0pis88c0k7vba.png" alt="Image description" width="800" height="204"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Provide a name for the Glue database (e.g., rdslogdb) and click Create.&lt;/li&gt;
&lt;li&gt;This database will be used as the metadata catalog for Athena to reference and query the structured log data stored in S3.&lt;/li&gt;
&lt;/ul&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%2Fz60d6nmnr3i2t3o5h9r9.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%2Fz60d6nmnr3i2t3o5h9r9.png" alt="Image description" width="800" height="285"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Creating Glue Crawler to Catalog Parsed RDS Logs&lt;/strong&gt;&lt;br&gt;
&lt;em&gt;Purpose:&lt;/em&gt;&lt;br&gt;
To automatically scan the structured JSON files in S3 (created via ETL job), detect schema, and populate the Glue Data Catalog for Athena querying.&lt;br&gt;
• Go to AWS Glue, select Crawlers, and click “Create crawler”.&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%2F5qaisrbo9sg7i9l07dic.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%2F5qaisrbo9sg7i9l07dic.png" alt="Image description" width="800" height="274"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Crawler Properties: Provide a name for the crawler ( rds-log-crawler).&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%2Fmk7xwgch1cjgaxyr4yth.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%2Fmk7xwgch1cjgaxyr4yth.png" alt="Image description" width="800" height="277"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Choose Data Source:&lt;/strong&gt;&lt;br&gt;
• Select S3 as the data source and give the path to the parsed logs folder generated by the ETL job.&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%2F8pxg9ccddrzu9i4isjx2.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%2F8pxg9ccddrzu9i4isjx2.png" alt="Image description" width="569" height="781"&gt;&lt;/a&gt;&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%2Fhv3e6vtnvgnkoej3yuzm.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%2Fhv3e6vtnvgnkoej3yuzm.png" alt="Image description" width="800" height="372"&gt;&lt;/a&gt;&lt;br&gt;
• Select the IAM role with necessary permissions.&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%2Fqr1obkz536f223at0cq8.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%2Fqr1obkz536f223at0cq8.png" alt="Image description" width="800" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Set Output and Scheduling:&lt;/strong&gt;&lt;br&gt;
• Choose the target database (e.g., rdslogdb) created earlier.&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%2Ft5da04o3anc7glpirw3v.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%2Ft5da04o3anc7glpirw3v.png" alt="Image description" width="800" height="337"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Review and Create:&lt;/strong&gt;&lt;br&gt;
• Confirm the details and click Create crawler&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%2Fo5bgtyprghqrs296qewu.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%2Fo5bgtyprghqrs296qewu.png" alt="Image description" width="800" height="388"&gt;&lt;/a&gt;&lt;br&gt;
• After creating the crawler, select it from the list and click "Run crawler".&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%2Fab6pe0msyoan3vc0tbed.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%2Fab6pe0msyoan3vc0tbed.png" alt="Image description" width="800" height="337"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;• Once the crawler finishes, it creates a table inside the selected Glue database by detecting the schema from the JSON files.&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%2Fxopp1gh7d6lj14mu1hh3.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%2Fxopp1gh7d6lj14mu1hh3.png" alt="Image description" width="800" height="298"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;• This table can now be queried using Amazon Athena for insights into your RDS logs.&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%2F4g9r570llna6wlc3n3va.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%2F4g9r570llna6wlc3n3va.png" alt="Image description" width="800" height="393"&gt;&lt;/a&gt;&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%2F641xzqd3o8g1al3vh0m8.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%2F641xzqd3o8g1al3vh0m8.png" alt="Image description" width="800" height="402"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Direct Integration from S3 to Athena (Without Glue)&lt;/strong&gt;&lt;br&gt;
Purpose: Quickly query log files stored in S3 without creating a Glue ETL or Crawler &lt;br&gt;
setup.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use Case:&lt;/strong&gt;&lt;br&gt;
Best suited for ad-hoc analysis, lightweight querying, or temporary exploration when &lt;br&gt;
you have structured data like JSON, CSV, or Parquet directly stored in S3.&lt;br&gt;
Simply point Athena to the S3 path and define the table schema manually using DDL &lt;br&gt;
statements.&lt;/p&gt;

&lt;p&gt;Created an external table pgrds_logs in Athena, specifying the S3 bucket path where &lt;br&gt;
the logs are stored and defining table properties including compression type as gzip.&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%2Fpmi22y9clg8yn1mryvbo.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%2Fpmi22y9clg8yn1mryvbo.png" alt="Image description" width="800" height="384"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Specified the S3 bucket URI pointing to the .gz log files exported from CloudWatch, which serves as the data source for the Athena external table.&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%2Fqhnhr1oae54hbb5y13g5.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%2Fqhnhr1oae54hbb5y13g5.png" alt="Image description" width="800" height="383"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Extracting Valuable Insights with Athena Queries on RDS Logs&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To analyze and monitor the PostgreSQL RDS usage across multiple tenants, we executed a series of Athena queries on the structured log data stored in Amazon S3. These queries returned critical details such as timestamps, tenant (user) activities, query patterns, and potential performance issues.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This approach enables:&lt;/strong&gt;&lt;br&gt;
• Granular visibility into individual tenant behavior&lt;br&gt;
• Identification of slow or long-running queries&lt;br&gt;
• Enhanced observability for resource optimization and cost management&lt;br&gt;
• Support for proactive database performance tuning&lt;br&gt;
These insights mimic real-world application usage and help drive informed decisions for multi-tenant architectures.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sample Queries :&lt;/strong&gt;&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%2Fnyg0uo3uj0hfzq5htz8r.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%2Fnyg0uo3uj0hfzq5htz8r.png" alt="Image description" width="800" height="363"&gt;&lt;/a&gt;&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%2Fhcmeyghrdgfbuvn4o6z4.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%2Fhcmeyghrdgfbuvn4o6z4.png" alt="Image description" width="800" height="399"&gt;&lt;/a&gt;&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%2F1lhvh9t6191jtv8qj1ht.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%2F1lhvh9t6191jtv8qj1ht.png" alt="Image description" width="800" height="395"&gt;&lt;/a&gt;&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%2Fgs2c1fvqpy2y8dxb8esd.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%2Fgs2c1fvqpy2y8dxb8esd.png" alt="Image description" width="800" height="420"&gt;&lt;/a&gt;&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%2F3q3f7uaqrhe84izwoltu.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%2F3q3f7uaqrhe84izwoltu.png" alt="Image description" width="800" height="404"&gt;&lt;/a&gt;&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%2Fmccoxiqreyotg034mvg3.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%2Fmccoxiqreyotg034mvg3.png" alt="Image description" width="800" height="401"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion &amp;amp; Key Takeaways&lt;/strong&gt;&lt;br&gt;
This PoC illustrates a comprehensive approach to managing and analyzing performance in a multi-tenant PostgreSQL database on Amazon RDS, with a focus on data-driven cost and performance insights.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Outcomes:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Achieved efficient tenant isolation using PostgreSQL schemas.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Enabled real-time performance monitoring with RDS Performance Insights and CloudWatch. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Implemented log export automation to Amazon S3 for advanced analytics.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Leveraged Athena &amp;amp; AWS Glue for scalable, serverless log analysis.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The architecture is designed with security, observability, and scalability in mind, offering a solid framework for SaaS platforms or internal multi-tenant systems that require &lt;br&gt;
detailed visibility into tenant behavior and system performance.&lt;br&gt;
Presented by KRANTHI PUTTI &lt;a href="https://www.linkedin.com/in/kranthi-putti/" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/kranthi-putti/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>aws</category>
      <category>cloud</category>
      <category>database</category>
    </item>
  </channel>
</rss>
