<?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: Raj Dhumal</title>
    <description>The latest articles on DEV Community by Raj Dhumal (@rajd810).</description>
    <link>https://dev.to/rajd810</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4241548%2Fbdb3fccc-3841-4c88-9ca4-a51998358987.jpg</url>
      <title>DEV Community: Raj Dhumal</title>
      <link>https://dev.to/rajd810</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rajd810"/>
    <language>en</language>
    <item>
      <title>Building a Secure Automated File Exchange Platform Using Python, AWS S3 and GuardDuty</title>
      <dc:creator>Raj Dhumal</dc:creator>
      <pubDate>Sat, 14 Nov 2026 14:30:26 +0000</pubDate>
      <link>https://dev.to/rajd810/building-a-secure-automated-file-exchange-platform-using-python-aws-s3-and-guardduty-5cag</link>
      <guid>https://dev.to/rajd810/building-a-secure-automated-file-exchange-platform-using-python-aws-s3-and-guardduty-5cag</guid>
      <description>&lt;p&gt;In many enterprise environments, exchanging files with external partners is still a partially manual process.&lt;/p&gt;

&lt;p&gt;Teams upload files to shared folders, transfer them to external SFTP servers, download incoming files, and manually track whether transfers have completed successfully.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This creates several operational challenges:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Manual file transfers and repetitive activities.&lt;/li&gt;
&lt;li&gt;Duplicate file uploads.&lt;/li&gt;
&lt;li&gt;Lack of visibility into file-transfer status.&lt;/li&gt;
&lt;li&gt;Security risks associated with files received from external systems.&lt;/li&gt;
&lt;li&gt;Uncontrolled accumulation of files on shared storage and SFTP servers.&lt;/li&gt;
&lt;li&gt;Difficulty identifying which user uploaded a particular file.&lt;/li&gt;
&lt;li&gt;Limited visibility into failed transfers.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I recently worked on building an automated file exchange solution to address these challenges.&lt;/p&gt;

&lt;p&gt;For this article, I am calling the solution &lt;strong&gt;&lt;em&gt;File Exchange Automation&lt;/em&gt;&lt;/strong&gt;. All project names, folder names, endpoints, and infrastructure identifiers have been generalized.&lt;/p&gt;

&lt;p&gt;The solution uses Python, Paramiko, AWS S3, Amazon GuardDuty Malware Protection, Linux EC2, Windows SMB shares, and PowerShell-based auditing.&lt;/p&gt;

&lt;p&gt;Let's walk through the architecture and implementation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Architecture Overview&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fppcoh9n1dz3wo7mkwg1z.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fppcoh9n1dz3wo7mkwg1z.png" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The solution supports bidirectional file transfers between an enterprise shared drive and an external partner's SFTP server.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Outbound workflow:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Enterprise Shared Drive → Linux EC2 → External SFTP Server&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Inbound workflow:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;External SFTP Server → Linux EC2 → Shared Drive Stage → Amazon S3 → GuardDuty Malware Scanning → Clean/Quarantine → Shared Drive&lt;/p&gt;

&lt;p&gt;The automation is built using Python and runs through scheduled jobs on Linux EC2.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Technology Stack&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Technology:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Python and Paramiko&lt;/li&gt;
&lt;li&gt;Linux EC2&lt;/li&gt;
&lt;li&gt;Windows SMB Share&lt;/li&gt;
&lt;li&gt;Amazon S3&lt;/li&gt;
&lt;li&gt;Amazon GuardDuty&lt;/li&gt;
&lt;li&gt;AWS Secrets Manager&lt;/li&gt;
&lt;li&gt;IAM Roles&lt;/li&gt;
&lt;li&gt;PowerShell&lt;/li&gt;
&lt;li&gt;Cron&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. How the Automation Works&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Outbound file transfer&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Users place files in the shared drive's outbound folder. Python scans the directory, connects to the external SFTP server, checks for duplicate filenames, and uploads files that are not already present.&lt;/p&gt;

&lt;p&gt;After a successful upload and verification, files are moved to a local archive.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Inbound file transfer&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The automation downloads files from the external SFTP server into a staging folder. These files are then uploaded to Amazon S3 for malware scanning.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Security scanning&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Amazon GuardDuty Malware Protection scans incoming S3 objects.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NO_THREATS_FOUND:&lt;/strong&gt; File proceeds to the clean workflow.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;THREATS_FOUND:&lt;/strong&gt; File is isolated in quarantine.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;UNSUPPORTED:&lt;/strong&gt; File requires separate investigation and is not treated as clean.&lt;/p&gt;

&lt;p&gt;Approved files are delivered to the shared drive's inbound folder.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Additional Automation and Security Features&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Beyond basic file transfers, we implemented several operational features:&lt;/p&gt;

&lt;p&gt;Automated retention: A scheduled cleanup process removes eligible files from the remote SFTP directory after a configured two-hour retention period.&lt;/p&gt;

&lt;p&gt;Capacity management: A combined storage threshold monitors remote SFTP folders and pending outbound files to prevent uncontrolled transfers.&lt;/p&gt;

&lt;p&gt;User-visible logging: Daily CSV reports provide file names, timestamps, transfer direction, processing status, and error details. Users can access these logs directly from a shared-drive folder.&lt;/p&gt;

&lt;p&gt;File activity auditing: Windows Security Event ID 4663 and a PowerShell collector capture relevant file activity, including Active Directory username, filename, timestamp, and action.&lt;/p&gt;

&lt;p&gt;Secure credentials: SFTP credentials are retrieved from AWS Secrets Manager, while IAM roles provide AWS access to the EC2 instance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Challenges and Lessons Learned&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;During implementation, we encountered several real-world issues:&lt;/p&gt;

&lt;p&gt;Large files caused capacity constraints and prolonged synchronization jobs.&lt;/p&gt;

&lt;p&gt;SFTP directory listing worked, but remote file creation sometimes failed because of server-side restrictions.&lt;/p&gt;

&lt;p&gt;SMB mount inconsistencies caused occasional file access and deletion errors.&lt;/p&gt;

&lt;p&gt;Cross-filesystem archive operations required additional file verification and safer handling.&lt;/p&gt;

&lt;p&gt;Unsupported malware scan results required separate processing rather than being treated as clean.&lt;/p&gt;

&lt;p&gt;Users needed better visibility into transfer progress and failures, leading to the shared CSV logging solution.&lt;/p&gt;

&lt;p&gt;These challenges highlighted an important point: successful file-transfer automation requires more than connecting to an SFTP server. It also requires proper error handling, capacity management, security controls, and operational visibility.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Final Thoughts&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;With this solution, we brought file transfer, malware scanning, retention management, and file activity auditing into one automated workflow.&lt;/p&gt;

&lt;p&gt;The objective was not just to automate uploads and downloads, but to build a more secure, manageable, and traceable file exchange process.&lt;/p&gt;

&lt;p&gt;I'm continuing to improve the automation, particularly around large-file handling, transfer reliability, and monitoring.&lt;/p&gt;

&lt;p&gt;How are you handling secure file exchanges in your enterprise environments? Are you using custom Python automation, managed SFTP services, or cloud-native solutions?&lt;/p&gt;

&lt;p&gt;I'd love to hear your experiences.&lt;/p&gt;

&lt;p&gt;Technologies: Python | AWS | Amazon S3 | Amazon GuardDuty | Paramiko | Linux | PowerShell | DevOps&lt;/p&gt;

&lt;h1&gt;
  
  
  AWS #DevOps #Python #Automation #CyberSecurity
&lt;/h1&gt;

</description>
      <category>automation</category>
      <category>aws</category>
      <category>python</category>
      <category>security</category>
    </item>
    <item>
      <title>How We Migrated from AWS API Gateway to Kong Konnect Using CDKTF and Azure DevOps</title>
      <dc:creator>Raj Dhumal</dc:creator>
      <pubDate>Thu, 12 Nov 2026 17:44:57 +0000</pubDate>
      <link>https://dev.to/rajd810/how-we-migrated-from-aws-api-gateway-to-kong-konnect-using-cdktf-and-azure-devops-1g89</link>
      <guid>https://dev.to/rajd810/how-we-migrated-from-aws-api-gateway-to-kong-konnect-using-cdktf-and-azure-devops-1g89</guid>
      <description>&lt;p&gt;Recently, I got an opportunity to work on an interesting project where we migrated our APIs from AWS API Gateway to Kong Konnect.&lt;/p&gt;

&lt;p&gt;One thing we wanted to improve during this migration was how we managed API configurations and deployments.&lt;/p&gt;

&lt;p&gt;Earlier, managing configurations manually wasn't the approach we wanted to continue with. So, we decided to move towards Infrastructure as Code (IaC) and automate the entire process as much as possible.&lt;/p&gt;

&lt;p&gt;For this, we used CDKTF (Terraform with TypeScript) to manage Kong configurations and Azure DevOps to handle deployments.&lt;/p&gt;

&lt;p&gt;Here's a little about what we did and some of the challenges we came across.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What did we implement?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We wanted to manage everything through code instead of depending on manual UI configurations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here's how we approached it:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Created Kong services, routes and plugins using CDKTF.&lt;/li&gt;
&lt;li&gt;Managed Dev, Stage and Production environments using a common codebase.&lt;/li&gt;
&lt;li&gt;Built Azure DevOps pipelines to automate Terraform deployments.&lt;/li&gt;
&lt;li&gt;Implemented a Plan → Approval → Apply workflow so changes could be reviewed before deployment.&lt;/li&gt;
&lt;li&gt;Worked on a rollback approach using previously maintained Terraform state and configuration&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What challenges did we face?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Like any migration project, things weren't always straightforward. We came across a few challenges along the way:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Authorization: Mapping existing AWS API Gateway authorizers to the corresponding Kong plugins.&lt;/li&gt;
&lt;li&gt;Rate Limiting: Making sure rate-limiting configurations worked as expected after migration.&lt;/li&gt;
&lt;li&gt;Authentication: Handling existing authentication configurations in Kong.&lt;/li&gt;
&lt;li&gt;Zero Downtime: Planning the migration carefully to avoid any service interruption.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each of these required proper validation and testing to make sure the APIs continued to work as expected.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What did we like about this approach?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For me, the biggest improvement was the way we started managing infrastructure.&lt;/p&gt;

&lt;p&gt;A few things that made a real difference:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Everything was maintained in Git and became version-controlled.&lt;/li&gt;
&lt;li&gt;No more dependency on manually configuring APIs through the UI.&lt;/li&gt;
&lt;li&gt;Deployments became more consistent across environments.&lt;/li&gt;
&lt;li&gt;Changes could be reviewed before applying them.&lt;/li&gt;
&lt;li&gt;Managing configurations became much easier with a common codebase.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;My takeaway&lt;/p&gt;

&lt;p&gt;One thing I really liked about this project was seeing how much difference Infrastructure as Code can make in day-to-day operations.&lt;/p&gt;

&lt;p&gt;Instead of spending time on repetitive manual configurations, we could focus more on automation, consistency and making the deployment process reliable.&lt;/p&gt;

&lt;p&gt;It was a great learning experience working with Kong Konnect, CDKTF, Terraform and Azure DevOps, especially when it came to API management and automation.&lt;/p&gt;

&lt;p&gt;I'd love to hear from others who have worked on similar migrations.&lt;/p&gt;

&lt;p&gt;Have you migrated from AWS API Gateway to Kong Konnect? What challenges did you face?&lt;/p&gt;

&lt;h1&gt;
  
  
  DevOps #AWS #Kong #Terraform #CDKTF #AzureDevOps #APIManagement #CloudArchitecture
&lt;/h1&gt;

</description>
      <category>cdktf</category>
      <category>aws</category>
      <category>apigateway</category>
      <category>terraform</category>
    </item>
  </channel>
</rss>
