<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[Hasan Serkan Yilmaz]]></title><description><![CDATA[Thoughts, stories and ideas.]]></description><link>https://hasanserkanyilmaz.com/</link><image><url>https://hasanserkanyilmaz.com/favicon.png</url><title>Hasan Serkan Yilmaz</title><link>https://hasanserkanyilmaz.com/</link></image><generator>Ghost 5.82</generator><lastBuildDate>Thu, 09 Apr 2026 20:44:29 GMT</lastBuildDate><atom:link href="https://hasanserkanyilmaz.com/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[AWS Direct Connect Utilization Analysis]]></title><description><![CDATA[<p>I recently began the task of cleaning up AWS Direct Connect connections that were no longer in use within our network. Unlike some other services, AWS does not readily indicate whether a Direct Connect connection is actively in use. </p><p>If you&apos;re not familiar, <a href="https://docs.aws.amazon.com/whitepapers/latest/aws-vpc-connectivity-options/aws-direct-connect.html?ref=hasanserkanyilmaz.com" rel="noreferrer">AWS Direct Connect</a> lets you</p>]]></description><link>https://hasanserkanyilmaz.com/aws-direct-connect-utilization-analysis/</link><guid isPermaLink="false">6631e3db949f9f00012336a1</guid><dc:creator><![CDATA[Hasan Serkan Yilmaz]]></dc:creator><pubDate>Wed, 20 Mar 2024 07:07:00 GMT</pubDate><content:encoded><![CDATA[<p>I recently began the task of cleaning up AWS Direct Connect connections that were no longer in use within our network. Unlike some other services, AWS does not readily indicate whether a Direct Connect connection is actively in use. </p><p>If you&apos;re not familiar, <a href="https://docs.aws.amazon.com/whitepapers/latest/aws-vpc-connectivity-options/aws-direct-connect.html?ref=hasanserkanyilmaz.com" rel="noreferrer">AWS Direct Connect</a> lets you hook up your on-prem network directly to AWS.</p><p>We had about 85 Direct Connect connections spread out over various AWS regions. Not all of these were active, and manually checking each one wasn&apos;t a practical solution. Plus, these connections are managed by different teams and external partners, so just turning one off to see if someone complains wasn&apos;t an option&#x2014;reactivating them can be a real pain.</p><p>I went with Python for the script because it&apos;s straightforward and widely used. <a href="https://pypi.org/project/boto3/?ref=hasanserkanyilmaz.com" rel="noreferrer">Boto3</a> is the go-to AWS SDK for Python, letting you directly manage AWS resources. It was the perfect tool for automating checks across our AWS services.</p><p>The script does a few simple things:</p><ol><li>Connects to AWS Direct Connect to get a list of all our connections.</li><li>Pulls data transfer metrics from CloudWatch for each connection.</li><li>Calculates the average data transfer rates to figure out if a connection is active or just sitting idle.</li></ol><p>Here&#x2019;s a peek at part of the script:</p><pre><code class="language-python">import boto3
from datetime import datetime, timedelta

# Initialize clients for Direct Connect and CloudWatch
cloudwatch = boto3.client(&apos;cloudwatch&apos;)
directconnect = boto3.client(&apos;directconnect&apos;)

# Set up the time period to check for the last 30 days
end_time = datetime.now()
start_time = end_time - timedelta(days=30)

# Fetch all Direct Connect connections
dx_connections = directconnect.describe_connections()[&apos;connections&apos;]

for connection in dx_connections:
    connection_id = connection[&apos;connectionId&apos;]
    print(f&quot;Checking metrics for Direct Connect ID: {connection_id}&quot;)

    # Check data transfer rates
    for metric_name in [&apos;DataInRate&apos;, &apos;DataOutRate&apos;]:
        response = cloudwatch.get_metric_statistics(
            Namespace=&apos;AWS/DX&apos;,
            MetricName=metric_name,
            Dimensions=[{&apos;Name&apos;: &apos;ConnectionId&apos;, &apos;Value&apos;: connection_id}],
            StartTime=start_time,
            EndTime=end_time,
            Period=3600,  # One hour
            Statistics=[&apos;Average&apos;]
        )

        # Analyze the response
        if response[&apos;Datapoints&apos;]:
            average = sum(d[&apos;Average&apos;] for d in response[&apos;Datapoints&apos;]) / len(response[&apos;Datapoints&apos;])
            print(f&quot; - {metric_name} average: {average} Mbps&quot;)
        else:
            print(f&quot; - {metric_name} has no data. This connection might not be in use.&quot;)</code></pre><p>I&#x2019;ve put this script on <a href="https://github.com/hserkanyilmaz/aws-direct-connect-utilization-checker?ref=hasanserkanyilmaz.com" rel="noreferrer">GitHub</a> so anyone can use it, tweak it, or improve it. It&#x2019;s all there in the <a href="https://github.com/hserkanyilmaz/aws-direct-connect-utilization-checker/edit/main/README.md?ref=hasanserkanyilmaz.com" rel="noreferrer">README</a> on how to set it up and run it.</p><p>Eventually, we found out that none of the Direct Connect connections were being used anymore. We ended up removing all of them. However, automating this check has saved us a lot of time.</p>]]></content:encoded></item><item><title><![CDATA[How GitHub changed open source]]></title><description><![CDATA[<p>Recently, I saw someone on LinkedIn sharing their&#xA0;<a href="https://myfirstcommit.com/profile?u=vigo&amp;ref=hasanserkanyilmaz.com">first commit</a>. It was from 2009. I was curious about mine, so I visited&#xA0;<a href="https://myfirstcommit.com/profile?u=hserkanyilmaz&amp;ref=hasanserkanyilmaz.com">myfirstcommit.com</a>. Although I joined GitHub in 2011, my first commit was from 2014. I was surprised that it was that late.</p><p>That reminded me of</p>]]></description><link>https://hasanserkanyilmaz.com/how-github-changed-open-source/</link><guid isPermaLink="false">6631e136949f9f000123368c</guid><dc:creator><![CDATA[Hasan Serkan Yilmaz]]></dc:creator><pubDate>Sun, 12 Nov 2023 06:37:00 GMT</pubDate><content:encoded><![CDATA[<p>Recently, I saw someone on LinkedIn sharing their&#xA0;<a href="https://myfirstcommit.com/profile?u=vigo&amp;ref=hasanserkanyilmaz.com">first commit</a>. It was from 2009. I was curious about mine, so I visited&#xA0;<a href="https://myfirstcommit.com/profile?u=hserkanyilmaz&amp;ref=hasanserkanyilmaz.com">myfirstcommit.com</a>. Although I joined GitHub in 2011, my first commit was from 2014. I was surprised that it was that late.</p><p>That reminded me of my early days. Around the end of the 90s, I was using Linux. I jumped from Slackware to Mandrake, tinkering with some projects. I was amazed by the amount of information available on the internet. Although programming was not my number one passion, it was a way to make things happen. I have been coding since I was a kid. It started with copying code from magazines into my uncle&apos;s Commodore 64.</p><p>I wasn&apos;t so collaborative back then. I was just a consumer of open source. I was surprised to find out I could contribute. However, the groups I found could have been more welcoming. It felt like a closed club. My excitement faded fast. For many, even the purpose of the contribution was to have control over the project, and as an outsider, you don&apos;t have a say in it when you don&apos;t pay for something. That was the mentality.<br><br>It changed a lot when GitHub came along. It became easy to contribute and find projects to contribute to. The community also became more welcoming. Main contributors became more pragmatic rather than protective.</p><p>I was on a Discord channel recently, helping people with their questions. Suddenly, it struck me that developers are spending so much effort on things that are not the primary concern of their projects.</p><p>There is so much need for practical examples and solutions. I decided to share some of the obstacles I come across and how I solve them.</p>]]></content:encoded></item></channel></rss>