<?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: kawasaki031677</title>
    <description>The latest articles on DEV Community by kawasaki031677 (@kawasaki031677).</description>
    <link>https://dev.to/kawasaki031677</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%2F4219324%2F0166a2b4-c859-44fb-8ee9-4259906f7428.jpg</url>
      <title>DEV Community: kawasaki031677</title>
      <link>https://dev.to/kawasaki031677</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kawasaki031677"/>
    <language>en</language>
    <item>
      <title>Why Running the yes Command Didn't Max Out CPU Usage</title>
      <dc:creator>kawasaki031677</dc:creator>
      <pubDate>Fri, 20 Nov 2026 23:22:57 +0000</pubDate>
      <link>https://dev.to/kawasaki031677/why-running-the-yes-command-didnt-max-out-cpu-usage-p92</link>
      <guid>https://dev.to/kawasaki031677/why-running-the-yes-command-didnt-max-out-cpu-usage-p92</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;I needed to generate CPU load on a Linux server for testing purposes. Looking for a quick solution, I executed the &lt;code&gt;yes&lt;/code&gt; command like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;yes &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /dev/null
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;yes&lt;/code&gt; command continuously outputs "y" infinitely. I assumed that "since it's an infinite loop, CPU usage should reach 100%," but when I checked the results, something unexpected happened.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Info:&lt;/strong&gt; The test environment I used was a Linux server with 2 cores.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Looking at the top Command Output
&lt;/h1&gt;

&lt;p&gt;When I checked with the &lt;code&gt;top&lt;/code&gt; command, I noticed something interesting:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;%Cpu(s): 29.8 us, 20.2 sy,  0.0 ni, 49.4 id,  0.0 wa,  0.0 hi,  0.7 si,  0.0 st

%Cpu0  :  0.0 us,  0.0 sy,  0.0 ni, 99.7 id,  0.0 wa,  0.0 hi,  0.3 si,  0.0 st
%Cpu1  : 64.1 us, 35.9 sy,  0.0 ni,  0.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
   2095 root      20   0  221388   1836   1712 R 100.0   0.2   3:42.71 yes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Even though the &lt;code&gt;yes&lt;/code&gt; process was using 100%, the overall CPU usage was only around 50%. Looking at the CPU-specific usage, only CPU1 was running at nearly 100%, while CPU0 was mostly idle.&lt;/p&gt;

&lt;h1&gt;
  
  
  The yes Command Operates as a Single Thread
&lt;/h1&gt;

&lt;p&gt;&lt;code&gt;yes&lt;/code&gt; is a single-threaded process. Therefore, it can run on either CPU0 or CPU1, but it cannot run on both CPUs simultaneously.&lt;/p&gt;

&lt;h1&gt;
  
  
  What Does CPU Usage of 100% Mean?
&lt;/h1&gt;

&lt;p&gt;The &lt;code&gt;%CPU&lt;/code&gt; value shown in the process list of &lt;code&gt;top&lt;/code&gt; means "using 100% of a single CPU core."&lt;/p&gt;

&lt;p&gt;Therefore, when running a single &lt;code&gt;yes&lt;/code&gt; process on a 2-core system:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CPU0: 0%&lt;/li&gt;
&lt;li&gt;CPU1: 100%&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This results in &lt;code&gt;yes&lt;/code&gt; showing 100% in the process list, while overall CPU usage is approximately 50%.&lt;/p&gt;

&lt;h1&gt;
  
  
  How to Achieve 100% Overall CPU Usage?
&lt;/h1&gt;

&lt;p&gt;To load all CPU cores, you need to run processes equal to the number of CPU cores. So you can execute the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;for&lt;/span&gt; i &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nv"&gt;$(&lt;/span&gt;seq &lt;span class="nv"&gt;$(&lt;/span&gt;nproc&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; yes &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /dev/null &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Warning:&lt;/strong&gt; After testing is complete, don't forget to run &lt;code&gt;pkill yes&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Adding More Cores Doesn't Speed Things Up
&lt;/h1&gt;

&lt;p&gt;Since &lt;code&gt;yes&lt;/code&gt; is single-threaded, its processing performance depends on the performance of a single core.&lt;/p&gt;

&lt;p&gt;Therefore, even if you increase the CPU to 32 cores, the processing speed of &lt;code&gt;yes&lt;/code&gt; itself will not fundamentally improve.&lt;/p&gt;

&lt;p&gt;On the other hand, for tasks that can operate with multiple threads such as software builds or data analysis, performance improvement can be expected as the number of CPU cores increases.&lt;/p&gt;

&lt;p&gt;It's not the number of cores that matters, but whether the software can effectively utilize those cores.&lt;/p&gt;

&lt;h1&gt;
  
  
  Summary
&lt;/h1&gt;

&lt;p&gt;Here's what I learned from this investigation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;yes&lt;/code&gt; operates as a single-threaded process&lt;/li&gt;
&lt;li&gt;A single-threaded process can only utilize one CPU core at a time&lt;/li&gt;
&lt;li&gt;Running a single &lt;code&gt;yes&lt;/code&gt; command will not result in 100% overall CPU usage&lt;/li&gt;
&lt;li&gt;To load all CPU cores, you need multiple processes (or threads) proportional to the number of CPU cores&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;CPU usage is something we often glance at casually, but understanding what's happening behind the scenes requires actual investigation. By testing with simple commands, I was able to gain a deeper understanding of how Linux and operating systems work.&lt;/p&gt;

</description>
      <category>linux</category>
      <category>cpu</category>
      <category>performance</category>
      <category>loadtest</category>
    </item>
    <item>
      <title>Creating Videos with Claude Code Remotion</title>
      <dc:creator>kawasaki031677</dc:creator>
      <pubDate>Wed, 18 Nov 2026 14:41:09 +0000</pubDate>
      <link>https://dev.to/kawasaki031677/creating-videos-with-claude-code-x-remotion-gp3</link>
      <guid>https://dev.to/kawasaki031677/creating-videos-with-claude-code-x-remotion-gp3</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;I wondered, "What if I could create videos easily with AI?" So I decided to test this idea.&lt;/p&gt;

&lt;p&gt;The tools I used were &lt;strong&gt;Claude Code&lt;/strong&gt; (an AI development agent provided by Anthropic) and &lt;strong&gt;Remotion&lt;/strong&gt; (a framework for generating videos with React). The theme was a support video for Japan's 2026 FIFA World Cup team.&lt;/p&gt;

&lt;p&gt;All I did was &lt;strong&gt;keep sending prompts&lt;/strong&gt;.&lt;br&gt;
The finished video is &lt;a href="https://www.youtube.com/watch?v=OqoTA4iqSWU" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Info:&lt;/strong&gt; The video is 55 seconds long, MP4 format at 1920×1080 / 30fps to match YouTube specifications.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1&gt;
  
  
  Setup Instructions
&lt;/h1&gt;
&lt;h2&gt;
  
  
  1. Create a Remotion project
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx create-video@latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  2. Add Remotion knowledge to Claude Code
&lt;/h2&gt;

&lt;p&gt;By adding Remotion's official Skills, Claude Code can reference Remotion best practices and implementation guides while generating code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx skills add https://github.com/remotion-dev/skills --skill remotion-best-practices
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3. Launch Claude Code
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After that, just keep sending prompts!&lt;/p&gt;

&lt;h1&gt;
  
  
  Trial and Error
&lt;/h1&gt;

&lt;p&gt;I made about 5 revisions to reach the final version. The first prompt already produced something that worked, but there was room for improvement. The final version still has issues...&lt;/p&gt;

&lt;p&gt;Also, the AI sometimes generates incorrect match results or tournament years, so fact-checking is essential.&lt;/p&gt;

&lt;h1&gt;
  
  
  Impressions from the Experience
&lt;/h1&gt;

&lt;p&gt;Even without any video production knowledge, I was able to create something tangible. However, when using abstract expressions like "this looks lame," the AI doesn't always make the modifications I'm thinking of.&lt;/p&gt;

&lt;p&gt;I realized that &lt;strong&gt;how clearly you can articulate your vision&lt;/strong&gt; of what kind of video you want to create is the key to success in AI-assisted production.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Info:&lt;/strong&gt; &lt;strong&gt;Update&lt;/strong&gt;&lt;br&gt;
Unfortunately, the Japanese national team was eliminated in the Round of 32. I plan to create a more polished video in four years.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>video</category>
      <category>ai</category>
      <category>remotion</category>
      <category>codegen</category>
    </item>
    <item>
      <title>I Verified Why Tokyo Region is Actually the Best Choice for AWS</title>
      <dc:creator>kawasaki031677</dc:creator>
      <pubDate>Wed, 18 Nov 2026 14:35:42 +0000</pubDate>
      <link>https://dev.to/kawasaki031677/i-verified-why-tokyo-region-is-actually-the-best-choice-for-aws-5450</link>
      <guid>https://dev.to/kawasaki031677/i-verified-why-tokyo-region-is-actually-the-best-choice-for-aws-5450</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;When using AWS, you likely choose the &lt;strong&gt;Tokyo region (ap-northeast-1)&lt;/strong&gt; quite often. This choice is typically based on the following assumptions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Most users are within Japan&lt;/li&gt;
&lt;li&gt;Data needs to be stored domestically&lt;/li&gt;
&lt;li&gt;Latency should be minimized&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I myself was aware of these reasons, but I kept selecting the Tokyo region somewhat arbitrarily. This time, I want to focus on latency and verify whether Tokyo is truly the fastest option.&lt;/p&gt;

&lt;h1&gt;
  
  
  What We're Validating
&lt;/h1&gt;

&lt;p&gt;I'll create ALBs in the following regions and measure latency by sending HTTP requests:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tokyo&lt;/li&gt;
&lt;li&gt;Osaka&lt;/li&gt;
&lt;li&gt;Singapore&lt;/li&gt;
&lt;li&gt;Northern Virginia&lt;/li&gt;
&lt;li&gt;São Paulo&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The measurement source will be from the Tokyo suburbs (my home).&lt;/p&gt;

&lt;h1&gt;
  
  
  Validation Results
&lt;/h1&gt;

&lt;p&gt;Here are the results:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Region&lt;/th&gt;
&lt;th&gt;Latency&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Tokyo&lt;/td&gt;
&lt;td&gt;33.1292 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Osaka&lt;/td&gt;
&lt;td&gt;139.517 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Singapore&lt;/td&gt;
&lt;td&gt;225.019 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Northern Virginia&lt;/td&gt;
&lt;td&gt;508.59 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;São Paulo&lt;/td&gt;
&lt;td&gt;619.534 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;As expected, the Tokyo region had the smallest latency. The results also confirm that latency is proportional to physical distance.&lt;/p&gt;

&lt;h1&gt;
  
  
  What About CloudFront?
&lt;/h1&gt;

&lt;p&gt;Next, let me verify the case with CloudFront. I specified an ALB as the origin under CloudFront. Here are the results...&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Region&lt;/th&gt;
&lt;th&gt;Latency&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Tokyo&lt;/td&gt;
&lt;td&gt;31.8299 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Osaka&lt;/td&gt;
&lt;td&gt;31.7758 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Singapore&lt;/td&gt;
&lt;td&gt;33.6764 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Northern Virginia&lt;/td&gt;
&lt;td&gt;31.4756 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;São Paulo&lt;/td&gt;
&lt;td&gt;33.1176 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The results showed minimal differences across all regions. When requests go through CloudFront, they are processed at edge locations, so regional differences in the origin are mostly absorbed.&lt;/p&gt;

&lt;p&gt;This means that using any region produces similar results.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Warning:&lt;/strong&gt; These measurements were taken with CloudFront caching enabled. When cache misses occurred, latency was proportional to physical distance, similar to direct ALB access.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Summary
&lt;/h1&gt;

&lt;p&gt;From the validation results, we learned:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tokyo region is the fastest for access from Japan&lt;/li&gt;
&lt;li&gt;For direct ALB access, latency is proportional to physical distance&lt;/li&gt;
&lt;li&gt;CloudFront can absorb regional differences&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Therefore, whether the &lt;strong&gt;"Tokyo region"&lt;/strong&gt; is truly optimal depends on your use case. Region selection should not be based on &lt;strong&gt;"intuition"&lt;/strong&gt; but rather on &lt;strong&gt;latency and architectural characteristics&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The results this time turned out mostly as expected, but I want to keep questioning whether &lt;strong&gt;"commonly accepted truths"&lt;/strong&gt; are really correct.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Info:&lt;/strong&gt; The code used in this verification is published &lt;a href="https://github.com/kawasaki031677/aws-region-latency-benchmark" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>aws</category>
      <category>cloudfront</category>
      <category>alb</category>
      <category>latency</category>
    </item>
    <item>
      <title>Stop Using cat! Use less for Opening Files</title>
      <dc:creator>kawasaki031677</dc:creator>
      <pubDate>Mon, 16 Nov 2026 13:53:50 +0000</pubDate>
      <link>https://dev.to/kawasaki031677/stop-using-cat-use-less-for-opening-files-a9a</link>
      <guid>https://dev.to/kawasaki031677/stop-using-cat-use-less-for-opening-files-a9a</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;When opening files on Linux, how many of you immediately use &lt;code&gt;cat&lt;/code&gt;?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cat test.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It's convenient and easy to use, but &lt;strong&gt;have you ever had your screen freeze when opening a large file?&lt;/strong&gt; 😄&lt;/p&gt;

&lt;p&gt;The drawbacks of &lt;code&gt;cat&lt;/code&gt; include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You can't search for text&lt;/li&gt;
&lt;li&gt;It outputs everything at once&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;However, &lt;code&gt;less&lt;/code&gt; can solve all of these problems.&lt;/p&gt;

&lt;h1&gt;
  
  
  Use less
&lt;/h1&gt;

&lt;p&gt;I actively use &lt;code&gt;less&lt;/code&gt; instead of &lt;code&gt;cat&lt;/code&gt; when opening files. Here's how to use it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;less test.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This makes a huge difference. I find it especially convenient when viewing logs.&lt;/p&gt;

&lt;h1&gt;
  
  
  Basic Operations
&lt;/h1&gt;

&lt;p&gt;These are the basic commands you need to remember:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;SPACE&lt;/code&gt;: Scroll down&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;b&lt;/code&gt;: Scroll up&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;g&lt;/code&gt;: Go to the beginning&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;G&lt;/code&gt;: Go to the end&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/search_word&lt;/code&gt;: Search for text&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;q&lt;/code&gt;: Exit&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;cat&lt;/code&gt; is a command for outputting files&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;less&lt;/code&gt; is a command for reading files&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you're currently using &lt;code&gt;cat&lt;/code&gt; by default, please try &lt;code&gt;less&lt;/code&gt; once. You'll be amazed at how much more comfortable it is!&lt;/p&gt;

</description>
      <category>linux</category>
      <category>less</category>
      <category>command</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Quick Tip: How to Easily Get CloudWatch Metrics Graph Images</title>
      <dc:creator>kawasaki031677</dc:creator>
      <pubDate>Sat, 14 Nov 2026 23:32:07 +0000</pubDate>
      <link>https://dev.to/kawasaki031677/quick-tip-how-to-easily-get-cloudwatch-metrics-graph-images-37h6</link>
      <guid>https://dev.to/kawasaki031677/quick-tip-how-to-easily-get-cloudwatch-metrics-graph-images-37h6</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;When you need to get CloudWatch metrics graph images, the AWS CLI's &lt;a href="https://docs.aws.amazon.com/cli/latest/reference/cloudwatch/get-metric-widget-image.html" rel="noopener noreferrer"&gt;get-metric-widget-image&lt;/a&gt; command is very convenient.&lt;/p&gt;

&lt;h1&gt;
  
  
  Example
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;~ $ aws cloudwatch get-metric-widget-image \
--metric-widget &lt;span class="s1"&gt;'{
    "view": "timeSeries",
    "stacked": false,
    "metrics": [
        [ "AWS/S3", "BucketSizeBytes", "BucketName", "xxx", "StorageType", "StandardStorage", { "period": 86400, "id": "m1" } ]
    ],
    "width": 1742,
    "height": 260,
    "start": "-PT336H",
    "end": "P0D"
}'&lt;/span&gt; \
 --output-format png \
 --output text &lt;span class="o"&gt;|&lt;/span&gt; base64 --decode &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; image.png
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Running this command will save the metrics image as &lt;code&gt;image.png&lt;/code&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Generated Image Example
&lt;/h1&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%2Fqmx12pul6ejvl0hurb9t.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%2Fqmx12pul6ejvl0hurb9t.png" alt="image (1).png" width="797" height="119"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  How to Check the metric-widget JSON
&lt;/h1&gt;

&lt;p&gt;You can verify the target metrics' JSON configuration by clicking on the "Source" tab when viewing the graph.&lt;br&gt;
This JSON can be used directly as a command argument.&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%2Fy44kf46izvnc2kddja3d.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%2Fy44kf46izvnc2kddja3d.png" alt="image.png" width="800" height="482"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Summary
&lt;/h1&gt;

&lt;p&gt;While it might seem like a minor tip, it's actually quite useful! Try automating it with the CLI instead of manually taking screenshots.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>cloudwatch</category>
      <category>awscli</category>
      <category>automation</category>
    </item>
    <item>
      <title>What is MCP? Trying Out GitHub MCP Server</title>
      <dc:creator>kawasaki031677</dc:creator>
      <pubDate>Thu, 12 Nov 2026 13:43:43 +0000</pubDate>
      <link>https://dev.to/kawasaki031677/what-is-mcp-trying-out-github-mcp-server-1bb5</link>
      <guid>https://dev.to/kawasaki031677/what-is-mcp-trying-out-github-mcp-server-1bb5</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;I've been seeing the term "MCP" quite frequently lately.&lt;/p&gt;

&lt;p&gt;It seems to be a new technology related to AI, but when I read the explanations, I don't really understand it... lol&lt;/p&gt;

&lt;p&gt;So I decided to &lt;strong&gt;skip the complicated theory and just try it out to understand it&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Using GitHub's official &lt;strong&gt;GitHub MCP Server&lt;/strong&gt;,&lt;br&gt;
I'll experience "what MCP can do".&lt;/p&gt;

&lt;h1&gt;
  
  
  What is MCP?
&lt;/h1&gt;

&lt;p&gt;MCP (Model Context Protocol) is&lt;br&gt;
&lt;strong&gt;a set of rules that gives AI permission to "go ahead and operate"&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Until now, generative AI could only provide advice,&lt;br&gt;
but with MCP, &lt;strong&gt;AI can now operate directly&lt;/strong&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  What can it do?
&lt;/h1&gt;

&lt;p&gt;Let me use GitHub as an example.&lt;/p&gt;

&lt;p&gt;Normally, if you ask Copilot to "create a PR",&lt;br&gt;
it will only teach you how to do it, and you have to do the actual work yourself.&lt;/p&gt;

&lt;p&gt;However, with MCP,&lt;br&gt;
&lt;strong&gt;Copilot can actually access GitHub and create PRs directly&lt;/strong&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Trying out GitHub MCP Server
&lt;/h1&gt;

&lt;p&gt;Here's what I used this time:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/github/github-mcp-server" rel="noopener noreferrer"&gt;https://github.com/github/github-mcp-server&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'll try to enable Copilot to operate GitHub from the familiar VSCode environment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Preparation
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Prepare a repository on GitHub&lt;/li&gt;
&lt;li&gt;Clone it locally&lt;/li&gt;
&lt;li&gt;Create a &lt;code&gt;test&lt;/code&gt; branch&lt;/li&gt;
&lt;li&gt;Edit README.md a bit&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Install MCP Extension
&lt;/h2&gt;

&lt;p&gt;In VSCode's extensions, search for &lt;code&gt;@mcp GitHub&lt;/code&gt; and install it.&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%2F7ztrno3pdqeyec0xzbt9.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%2F7ztrno3pdqeyec0xzbt9.png" alt="MCP extension installation" width="800" height="348"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, &lt;strong&gt;&lt;code&gt;.vscode/mcp.json&lt;/code&gt;&lt;/strong&gt; will be created in the project.&lt;/p&gt;

&lt;p&gt;mcp.json&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"servers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;"io.github.github/github-mcp-server"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"stdio"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"docker"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
                &lt;span class="s2"&gt;"run"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;"-i"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;"--rm"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;"-e"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;"GITHUB_PERSONAL_ACCESS_TOKEN=${input:token}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;"ghcr.io/github/github-mcp-server:0.30.2"&lt;/span&gt;
            &lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="nl"&gt;"gallery"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://api.mcp.github.com"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="nl"&gt;"version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"0.30.2"&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"inputs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"token"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"promptString"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="nl"&gt;"description"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="nl"&gt;"password"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Warning:&lt;/strong&gt; mcp.json is "the list of things AI is allowed to do". AI cannot perform operations that are not listed here.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Give Copilot Instructions
&lt;/h2&gt;

&lt;p&gt;I give Copilot the following instruction:&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%2Fu2jjfdeigmf1r8jwv2y9.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%2Fu2jjfdeigmf1r8jwv2y9.png" alt="Copilot instruction" width="440" height="172"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Results
&lt;/h2&gt;

&lt;p&gt;After waiting a while, it seems Copilot created the PR for me.&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%2Fy2krq9rile279x4rnal4.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%2Fy2krq9rile279x4rnal4.png" alt="Copilot result" width="351" height="235"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I accessed the GitHub page and confirmed it was actually created!&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%2Fs74bvc38lm8jdpdd4uxo.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%2Fs74bvc38lm8jdpdd4uxo.png" alt="PR created on GitHub" width="800" height="458"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;MCP really does the job...!&lt;/p&gt;

&lt;h1&gt;
  
  
  My Impressions After Using It
&lt;/h1&gt;

&lt;p&gt;By using MCP,&lt;br&gt;
I really felt that AI becomes &lt;strong&gt;"an entity that not only thinks but actually takes action"&lt;/strong&gt;&lt;br&gt;
rather than just providing advice. It's like having a talented colleague! (lol)&lt;/p&gt;

&lt;h1&gt;
  
  
  Summary
&lt;/h1&gt;

&lt;p&gt;MCP is difficult to understand just by reading the explanation.&lt;br&gt;
But when you actually try it, you realize "oh, that's what it is" all at once.&lt;/p&gt;

&lt;p&gt;If you're interested in MCP,&lt;br&gt;
I recommend trying GitHub MCP Server first.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Info:&lt;/strong&gt; In this article, I tried GitHub MCP Server, but there are many other types of MCP. I plan to try others later as well.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>mcp</category>
      <category>vscode</category>
      <category>githubcopilot</category>
      <category>ai</category>
    </item>
    <item>
      <title>Analyzing CloudFormation ChangeSets with Amazon Bedrock</title>
      <dc:creator>kawasaki031677</dc:creator>
      <pubDate>Tue, 10 Nov 2026 13:48:17 +0000</pubDate>
      <link>https://dev.to/kawasaki031677/analyzing-cloudformation-changesets-with-amazon-bedrock-4cdn</link>
      <guid>https://dev.to/kawasaki031677/analyzing-cloudformation-changesets-with-amazon-bedrock-4cdn</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;I created a tool that analyzes CloudFormation ChangeSet content using Amazon Bedrock. The actual code is available &lt;a href="https://github.com/kawasaki031677/cfn-changeset-analyzer" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Background
&lt;/h1&gt;

&lt;p&gt;I've been using CloudFormation frequently lately, and I'm encountering CloudFormation ChangeSets more often.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Info:&lt;/strong&gt; What is CloudFormation ChangeSet?&lt;br&gt;
&lt;strong&gt;A convenient feature that lets you understand which resources will be updated or deleted before updating the stack&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;However, with this feature, it's unclear how to understand:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What kind of impact will occur&lt;/li&gt;
&lt;li&gt;Whether there will be user impact&lt;/li&gt;
&lt;li&gt;What risks are involved&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It was tedious to organize these considerations in my head or investigate each time. So I created a tool to analyze ChangeSet content using Bedrock to help reduce this workload.&lt;/p&gt;

&lt;h1&gt;
  
  
  Tool Overview
&lt;/h1&gt;

&lt;p&gt;The processing is straightforward:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Retrieve the CloudFormation ChangeSet content&lt;/li&gt;
&lt;li&gt;Send the content to Bedrock&lt;/li&gt;
&lt;li&gt;Analyze from four perspectives and output the results:

&lt;ul&gt;
&lt;li&gt;Runtime behavior&lt;/li&gt;
&lt;li&gt;User impact&lt;/li&gt;
&lt;li&gt;Rollback risks&lt;/li&gt;
&lt;li&gt;Operational considerations&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Rather than simply summarizing the ChangeSet, the goal was to output &lt;strong&gt;"the kind of things I always think about in my head."&lt;/strong&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Impressions After Building
&lt;/h1&gt;

&lt;p&gt;Since I didn't have much knowledge about Bedrock, it took time to understand the specifications initially. Once I actually used it, I realized that &lt;strong&gt;prompt design&lt;/strong&gt; was crucial—particularly deciding "how much to delegate to AI."&lt;/p&gt;

&lt;p&gt;The actual implementation went smoothly by leveraging AI services like Github Copilot.&lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;If you're someone who looks at a ChangeSet and thinks, "What will happen if I do this? Is it really safe to run?"—this tool might be helpful for you. I'd be happy if you'd try it out. (I'm looking forward to your feedback!)&lt;/p&gt;

</description>
      <category>python</category>
      <category>cloudformation</category>
      <category>bedrock</category>
      <category>iac</category>
    </item>
    <item>
      <title>Implementing Capacity Providers in ECS on EC2 for Fully Automated Batch Processing Scaling</title>
      <dc:creator>kawasaki031677</dc:creator>
      <pubDate>Mon, 09 Nov 2026 14:19:32 +0000</pubDate>
      <link>https://dev.to/kawasaki031677/implementing-capacity-providers-in-ecs-on-ec2-for-fully-automated-batch-processing-scaling-1688</link>
      <guid>https://dev.to/kawasaki031677/implementing-capacity-providers-in-ecs-on-ec2-for-fully-automated-batch-processing-scaling-1688</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;By leveraging AWS ECS &lt;strong&gt;Capacity Providers&lt;/strong&gt;, you can automate ECS cluster scaling based on task launch requests.&lt;/p&gt;

&lt;p&gt;This article shares a real-world example of how we fully automated the scaling of batch processing running on "ECS on EC2" using this mechanism.&lt;/p&gt;

&lt;h1&gt;
  
  
  Background
&lt;/h1&gt;

&lt;p&gt;We had a system running containers on AWS ECS on EC2. As an additional development requirement, we needed to "run large-scale batch processing for just a few days each month." This prompted us to reconsider our scaling design.&lt;/p&gt;

&lt;h1&gt;
  
  
  Existing Configuration and Challenges
&lt;/h1&gt;

&lt;p&gt;Traditionally, we used the "CPU utilization" of EC2 Auto Scaling Group (ASG) as the scaling trigger.&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%2F0v7j7orl4wqjxkddqqzm.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%2F0v7j7orl4wqjxkddqqzm.png" alt="image.png" width="800" height="289"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Initially, we planned to follow this same scaling approach, but as we examined it more closely, several issues emerged:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;EC2 instances don't auto-scale at batch start; manual EC2 scale-out is required beforehand&lt;/li&gt;
&lt;li&gt;After batch completion, EC2 instances don't auto-scale down; unnecessary instances remain&lt;/li&gt;
&lt;li&gt;Scaling out is delayed by several minutes while waiting for CPU utilization to rise&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When task launch requests spiked suddenly, the EC2 instances wouldn't increase until CPU utilization rose, causing task launch failures.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"We want EC2 to automatically increase and decrease in response to task increases"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Capacity Providers seemed like the mechanism that could fulfill this ideal.&lt;/p&gt;

&lt;h1&gt;
  
  
  What are Capacity Providers?
&lt;/h1&gt;

&lt;p&gt;A mechanism that automatically adjusts the number of EC2 instances based on ECS task launch requests.&lt;/p&gt;

&lt;p&gt;The key points are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ECS monitors "task launch requests"&lt;/li&gt;
&lt;li&gt;If ECS detects insufficient capacity for task launch requests, it automatically scales out EC2&lt;/li&gt;
&lt;li&gt;When tasks decrease and required capacity also decreases, it automatically scales in EC2&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This eliminates the delay of "waiting for CPU utilization to rise" and enables real-time synchronization between ECS demand and EC2 supply.&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%2Fnxbm935o5lt3wkwelx8z.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%2Fnxbm935o5lt3wkwelx8z.png" alt="image.png" width="799" height="319"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For more detailed information, the &lt;a href="https://aws.amazon.com/fr/blogs/containers/deep-dive-on-amazon-ecs-cluster-auto-scaling/" rel="noopener noreferrer"&gt;AWS official blog&lt;/a&gt; is a helpful reference.&lt;/p&gt;

&lt;h1&gt;
  
  
  Configuration in Your Environment
&lt;/h1&gt;

&lt;p&gt;Configuration is available from the "Infrastructure" tab in the ECS console.&lt;/p&gt;

&lt;p&gt;The key setting is "Target Capacity (%)" which specifies the target resource utilization rate of EC2. For example, if you set it to 90%, scaling is controlled to maintain "90% EC2 resource utilization." For our batch processing, we wanted to use resources without waste, so we set it to 100%.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Warning:&lt;/strong&gt; Setting Target Capacity to 100% will cause EC2 to run at full capacity.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Further Cost Savings with Binpack Task Placement Strategy
&lt;/h1&gt;

&lt;p&gt;In addition to automatic scaling via Capacity Providers, we changed the task placement strategy to binpack. Binpack is a strategy that consolidates tasks based on the minimum available CPU or memory resources.&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%2Ftvrwyjnaulimsluz1k3u.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%2Ftvrwyjnaulimsluz1k3u.png" alt="image.png" width="673" height="457"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Info:&lt;/strong&gt; By using the binpack strategy, you can efficiently consolidate tasks with fewer EC2 instances.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;As a result, we achieved the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Maximum utilization of EC2 resources&lt;/li&gt;
&lt;li&gt;Stable automatic scale-in after batch completion&lt;/li&gt;
&lt;li&gt;Cost reduction compared to the previous approach&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Personal Best Practices Summary
&lt;/h1&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Configuration Item&lt;/th&gt;
&lt;th&gt;Recommended Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Target Capacity&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Task Placement Strategy&lt;/td&gt;
&lt;td&gt;binpack&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ASG Minimum Instances&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;By implementing Capacity Providers, you can synchronize ECS task counts with EC2 scaling&lt;/li&gt;
&lt;li&gt;Automatic scaling for batch processing, which was difficult with CPU-based ASG scaling, is now achievable&lt;/li&gt;
&lt;li&gt;Combined with binpack strategy, further cost optimization is possible&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Info:&lt;/strong&gt; Even with ECS on EC2 architecture, implementing Capacity Providers enables operational automation comparable to Fargate.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Additional Notes
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Warning:&lt;/strong&gt; Properly size ECS task CPU/memory. Preventing resource insufficiency and over-allocation improves scaling accuracy. Spot instances and mixed instance types are also possible, which can lead to better cost optimization and improved redundancy.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>aws</category>
      <category>ecs</category>
      <category>costoptimization</category>
      <category>batchprocessing</category>
    </item>
    <item>
      <title>AWS Config Costs Were Too High—I Cut Them in Half With One Configuration Change</title>
      <dc:creator>kawasaki031677</dc:creator>
      <pubDate>Mon, 09 Nov 2026 14:07:19 +0000</pubDate>
      <link>https://dev.to/kawasaki031677/aws-config-costs-were-too-high-i-cut-them-in-half-with-one-configuration-change-e7j</link>
      <guid>https://dev.to/kawasaki031677/aws-config-costs-were-too-high-i-cut-them-in-half-with-one-configuration-change-e7j</guid>
      <description>&lt;h1&gt;
  
  
  AWS Config Pricing Was Unexpectedly High
&lt;/h1&gt;

&lt;p&gt;While building a certain system, I noticed that AWS Config charges were unusually high. Curious about the reason, I started investigating.&lt;/p&gt;

&lt;p&gt;As a result, after changing the recording frequency from &lt;strong&gt;"continuous recording"&lt;/strong&gt; to &lt;strong&gt;"daily recording"&lt;/strong&gt;, I was able to reduce the costs significantly.&lt;/p&gt;

&lt;h1&gt;
  
  
  The Impact Was Dramatic
&lt;/h1&gt;

&lt;p&gt;Right after making the change, the costs dropped by more than half. I was quite shocked to realize just how much AWS Config had been charging.&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%2Ftte1hqln1dr4elyt4xy7.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%2Ftte1hqln1dr4elyt4xy7.png" alt="image.png" width="799" height="364"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Why Did the Costs Decrease?
&lt;/h1&gt;

&lt;p&gt;After researching AWS Config's pricing structure, I discovered that it operates on the following principle:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;You are charged every time a Config rule or recording event occurs&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;In other words, &lt;strong&gt;the higher the recording frequency, the higher the cost&lt;/strong&gt;. By switching to daily recording, the number of recording events itself decreased, which naturally reduced the overall charges.&lt;/p&gt;

&lt;h1&gt;
  
  
  Summary
&lt;/h1&gt;

&lt;p&gt;If you find AWS Config pricing to be high, consider the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Can you change the recording frequency?&lt;/li&gt;
&lt;li&gt;Are you monitoring resources that you don't actually need?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Many environments are using default settings without much thought, but you might be able to cut your costs in half with just one configuration change. I definitely recommend checking your AWS Config settings.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>config</category>
      <category>costoptimization</category>
      <category>devops</category>
    </item>
    <item>
      <title>Direct S3 Data Import to Aurora PostgreSQL - A Performance Comparison</title>
      <dc:creator>kawasaki031677</dc:creator>
      <pubDate>Sat, 07 Nov 2026 00:16:02 +0000</pubDate>
      <link>https://dev.to/kawasaki031677/direct-s3-data-import-to-aurora-postgresql-a-performance-comparison-1280</link>
      <guid>https://dev.to/kawasaki031677/direct-s3-data-import-to-aurora-postgresql-a-performance-comparison-1280</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;Aurora PostgreSQL has a built-in feature that allows direct data exchange with S3. This capability enables you to import data directly from S3 to PostgreSQL &lt;strong&gt;without going through your application layer&lt;/strong&gt;, which was previously the standard approach.&lt;/p&gt;

&lt;p&gt;This approach offers several advantages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No need to handle files on the application side&lt;/li&gt;
&lt;li&gt;No concerns about application disk space&lt;/li&gt;
&lt;li&gt;Simpler implementation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this article, I'll demonstrate this feature and compare it with traditional import methods.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;For more details about this feature, please refer to the &lt;a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_PostgreSQL.S3Import.html" rel="noopener noreferrer"&gt;AWS documentation&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Test Environment
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;AWS Tokyo Region&lt;/li&gt;
&lt;li&gt;Aurora PostgreSQL 17.4 (db.t3.medium)&lt;/li&gt;
&lt;li&gt;large_test_data.csv (10 million rows test data)&lt;/li&gt;
&lt;li&gt;test_table (table for data storage)&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Importing Files from S3
&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt;First, install the extension for S3 integration:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="n"&gt;EXTENSION&lt;/span&gt; &lt;span class="n"&gt;IF&lt;/span&gt; &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="k"&gt;EXISTS&lt;/span&gt; &lt;span class="n"&gt;aws_s3&lt;/span&gt; &lt;span class="k"&gt;CASCADE&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Import the file from S3:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="n"&gt;postgres&lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;aws_s3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;table_import_from_s3&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="s1"&gt;'test_table'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;       
    &lt;span class="s1"&gt;'(format csv, header true)'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'&amp;lt;S3 bucket name&amp;gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'large_test_data.csv'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'ap-northeast-1'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'&amp;lt;IAM role name associated with Aurora&amp;gt;'&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
                                         &lt;span class="n"&gt;table_import_from_s3&lt;/span&gt;                                         
&lt;span class="c1"&gt;-----------------------------------------------------------------------------------------------------&lt;/span&gt;
 &lt;span class="mi"&gt;10000000&lt;/span&gt; &lt;span class="k"&gt;rows&lt;/span&gt; &lt;span class="n"&gt;imported&lt;/span&gt; &lt;span class="k"&gt;into&lt;/span&gt; &lt;span class="n"&gt;relation&lt;/span&gt; &lt;span class="nv"&gt;"test_table"&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt; &lt;span class="n"&gt;large_test_data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;csv&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="mi"&gt;208888910&lt;/span&gt; &lt;span class="n"&gt;bytes&lt;/span&gt;
&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="k"&gt;row&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nb"&gt;Time&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;11639&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;759&lt;/span&gt; &lt;span class="n"&gt;ms&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;00&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;11&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;640&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;postgres&lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Traditional Method (Import via Application)
&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt;First, download the file from S3:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;~ &lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;time &lt;/span&gt;aws s3 &lt;span class="nb"&gt;cp &lt;/span&gt;s3://&amp;lt;S3 bucket name&amp;gt;/large_test_data.csv ./
download: s3://&amp;lt;S3 bucket name&amp;gt;/large_test_data.csv to ./large_test_data.csv

real    0m2.301s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Import using the COPY command:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="n"&gt;postgres&lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="err"&gt;\&lt;/span&gt;&lt;span class="k"&gt;COPY&lt;/span&gt; &lt;span class="n"&gt;test_table&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;age&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="s1"&gt;'large_test_data.csv'&lt;/span&gt;
&lt;span class="k"&gt;WITH&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;FORMAT&lt;/span&gt; &lt;span class="n"&gt;csv&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;HEADER&lt;/span&gt; &lt;span class="k"&gt;true&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;COPY&lt;/span&gt; &lt;span class="mi"&gt;10000000&lt;/span&gt;
&lt;span class="nb"&gt;Time&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;11416&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;487&lt;/span&gt; &lt;span class="n"&gt;ms&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;00&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;11&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;416&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;postgres&lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Summary
&lt;/h1&gt;

&lt;p&gt;Here are the results:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Method&lt;/th&gt;
&lt;th&gt;Processing Time&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;S3 Integration&lt;/td&gt;
&lt;td&gt;11.6 seconds&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Via Application&lt;/td&gt;
&lt;td&gt;13.7 seconds (Download: 2.3 seconds, COPY command: 11.4 seconds)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The S3 integration method proved to be slightly faster. While the performance difference isn't dramatic, the main advantage is bypassing the application layer entirely. This article demonstrated importing, but exporting is also possible. Additionally, Aurora can even invoke Lambda functions.&lt;/p&gt;

&lt;p&gt;Although this feature isn't widely used or known in the field, it offers many benefits and should be actively utilized in more projects.&lt;/p&gt;




&lt;p&gt;🤖 Generated with &lt;a href="https://claude.com/claude-code" rel="noopener noreferrer"&gt;Claude Code&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>postgres</category>
      <category>s3</category>
      <category>aurora</category>
    </item>
    <item>
      <title>Getting Started with LocalStack - Testing CloudFormation and S3 Locally</title>
      <dc:creator>kawasaki031677</dc:creator>
      <pubDate>Sat, 07 Nov 2026 00:11:58 +0000</pubDate>
      <link>https://dev.to/kawasaki031677/getting-started-with-localstack-testing-cloudformation-and-s3-locally-58gk</link>
      <guid>https://dev.to/kawasaki031677/getting-started-with-localstack-testing-cloudformation-and-s3-locally-58gk</guid>
      <description>&lt;h1&gt;
  
  
  What is LocalStack?
&lt;/h1&gt;

&lt;p&gt;LocalStack is a tool that allows you to simulate AWS services in a local environment. You can test and develop resources like S3 and Lambda without using a cloud environment. This time, I'll demonstrate using CloudFormation to create an S3 bucket with LocalStack.&lt;/p&gt;

&lt;h1&gt;
  
  
  Running It Locally
&lt;/h1&gt;

&lt;p&gt;Create a &lt;code&gt;docker-compose.yml&lt;/code&gt; file with the following content:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;3.8'&lt;/span&gt;

&lt;span class="na"&gt;services&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;localstack&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;localstack/localstack&lt;/span&gt;
    &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;4566:4566"&lt;/span&gt;  &lt;span class="c1"&gt;# LocalStack unified endpoint&lt;/span&gt;
    &lt;span class="na"&gt;environment&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;SERVICES=cloudformation,s3,dynamodb&lt;/span&gt;  &lt;span class="c1"&gt;# Specify services to enable as comma-separated values&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;DEBUG=1&lt;/span&gt;  &lt;span class="c1"&gt;# Enable debug mode&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, run the following command to start LocalStack:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;docker-compose up &lt;span class="nt"&gt;-d&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Deploying CloudFormation
&lt;/h2&gt;

&lt;p&gt;Let me write a sample CloudFormation template:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;AWSTemplateFormatVersion&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;2010-09-09'&lt;/span&gt;
&lt;span class="na"&gt;Resources&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;MyBucket&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;Type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;AWS::S3::Bucket&lt;/span&gt;
    &lt;span class="na"&gt;Properties&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;BucketName&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;my-localstack-bucket&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, let's deploy it to LocalStack:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;aws &lt;span class="nt"&gt;--endpoint-url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;http://localhost:4566 cloudformation create-stack &lt;span class="nt"&gt;--stack-name&lt;/span&gt; myteststack &lt;span class="nt"&gt;--template-body&lt;/span&gt; file://template.yml
&lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="s2"&gt;"StackId"&lt;/span&gt;: &lt;span class="s2"&gt;"arn:aws:cloudformation:ap-northeast-1:000000000000:stack/myteststack/8320a915"&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Alert:&lt;/strong&gt; Be careful to always specify the &lt;code&gt;--endpoint-url&lt;/code&gt; parameter. Without it, the deployment will go to your production environment.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Verifying the Deployment
&lt;/h2&gt;

&lt;p&gt;Let's verify that S3 was created successfully:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;aws &lt;span class="nt"&gt;--endpoint-url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;http://localhost:4566 s3 &lt;span class="nb"&gt;ls 
&lt;/span&gt;2025-09-23 23:48:30 my-localstack-bucket
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Thoughts
&lt;/h2&gt;

&lt;p&gt;It's convenient to be able to create and test resources without touching the actual cloud environment. If you're developing with CloudFormation, incorporating LocalStack into your CI/CD pipeline could enable automated testing before deployment.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>s3</category>
      <category>cloudformation</category>
      <category>localstack</category>
    </item>
    <item>
      <title>Experiencing Machine Learning with Premier League Data</title>
      <dc:creator>kawasaki031677</dc:creator>
      <pubDate>Tue, 03 Nov 2026 00:16:08 +0000</pubDate>
      <link>https://dev.to/kawasaki031677/experiencing-machine-learning-with-premier-league-data-465m</link>
      <guid>https://dev.to/kawasaki031677/experiencing-machine-learning-with-premier-league-data-465m</guid>
      <description>&lt;h1&gt;
  
  
  Introduction: Taking on Machine Learning!
&lt;/h1&gt;

&lt;p&gt;I've been studying machine learning recently. To gain practical experience, I decided to work with Premier League data and apply machine learning techniques to it.&lt;/p&gt;

&lt;h1&gt;
  
  
  Using Premier League Match Data
&lt;/h1&gt;

&lt;p&gt;For this project, I used match result data from the 2024-2025 season. The data was downloaded from &lt;a href="https://www.football-data.co.uk/englandm.php" rel="noopener noreferrer"&gt;this site&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;As the main features, I selected the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Shots (HS, AS)&lt;/li&gt;
&lt;li&gt;Shots on Target (HST, AST)&lt;/li&gt;
&lt;li&gt;Fouls (HF, AF)&lt;/li&gt;
&lt;li&gt;Cards (HY, AY)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The target variable is the match result (win, draw, or loss).&lt;/p&gt;

&lt;h1&gt;
  
  
  Building a Machine Learning Model
&lt;/h1&gt;

&lt;p&gt;Here's the actual code I used:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;pandas&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;
&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;sklearn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;model_selection&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;train_test_split&lt;/span&gt;
&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;sklearn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;preprocessing&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nc"&gt;LabelEncoder&lt;/span&gt;
&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;sklearn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ensemble&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nc"&gt;RandomForestClassifier&lt;/span&gt;
&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;sklearn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;metrics&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;accuracy_score&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;classification_report&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;joblib&lt;/span&gt;

&lt;span class="c1"&gt;# 1. Load data&lt;/span&gt;
&lt;span class="n"&gt;df&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read_csv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'epl2024.csv'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# 2. Extract only necessary columns&lt;/span&gt;
&lt;span class="n"&gt;features&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'HS'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'AS'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'HST'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'AST'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'HF'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'AF'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'HC'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'AC'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'HY'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'AY'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;  &lt;span class="c1"&gt;# Shots, fouls, cards, etc.&lt;/span&gt;
&lt;span class="n"&gt;target&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'FTR'&lt;/span&gt;  &lt;span class="c1"&gt;# Match result (H/D/A)&lt;/span&gt;

&lt;span class="c1"&gt;# 3. Create feature and target data&lt;/span&gt;
&lt;span class="no"&gt;X&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;features&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="c1"&gt;# 4. Label encoding (convert target variable to numbers)&lt;/span&gt;
&lt;span class="n"&gt;le&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;LabelEncoder&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;y_encoded&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;le&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fit_transform&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# H-&amp;gt;0, D-&amp;gt;1, A-&amp;gt;2, etc.&lt;/span&gt;

&lt;span class="c1"&gt;# 5. Split into training and test data&lt;/span&gt;
&lt;span class="nc"&gt;X_train&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;X_test&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y_train&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y_test&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;train_test_split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;X&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y_encoded&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;test_size&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;0.2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;random_state&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;42&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# 6. Create and train model&lt;/span&gt;
&lt;span class="n"&gt;model&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;RandomForestClassifier&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n_estimators&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;random_state&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;42&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;X_train&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y_train&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# 7. Prediction and evaluation&lt;/span&gt;
&lt;span class="n"&gt;y_pred&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;predict&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;X_test&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Accuracy:"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;accuracy_score&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;y_test&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y_pred&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"\nClassification Report:\n"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;classification_report&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;y_test&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y_pred&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;target_names&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;le&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;classes_&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# 8. Save the trained model and label encoder&lt;/span&gt;
&lt;span class="n"&gt;joblib&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;dump&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'epl_rf_model.pkl'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;joblib&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;dump&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;le&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'label_encoder.pkl'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Looking at Prediction Results and Evaluation
&lt;/h2&gt;

&lt;p&gt;When I ran the code, I got the following output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Accuracy: 0.5921052631578947

Classification Report:
               precision    recall  f1-score   support

           A       0.62      0.75      0.68        28
           D       0.15      0.12      0.14        16
           H       0.76      0.69      0.72        32

    accuracy                           0.59        76
   macro avg       0.51      0.52      0.51        76
weighted avg       0.58      0.59      0.58        76
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The accuracy (correct prediction rate) was 59%. Looking at the details more closely, I can see that away wins (A) and home wins (H) have both high precision and recall, so the model predicts them fairly accurately. On the other hand, draws (D) are difficult for the model to predict.&lt;/p&gt;

&lt;h1&gt;
  
  
  Making Actual Predictions
&lt;/h1&gt;

&lt;p&gt;Now that I've created the model, let me use it to make predictions on new data:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;pandas&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;numpy&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;joblib&lt;/span&gt;

&lt;span class="n"&gt;model&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;joblib&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;load&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'epl_rf_model.pkl'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;le&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;joblib&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;load&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'label_encoder.pkl'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# New match data (as a DataFrame with feature names)&lt;/span&gt;
&lt;span class="n"&gt;new_match&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;DataFrame&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;columns&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'HS'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'AS'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'HST'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'AST'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'HF'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'AF'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'HC'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'AC'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'HY'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'AY'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;predicted_num&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;predict&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;new_match&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;predicted_label&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;le&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;inverse_transform&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;predicted_num&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"Prediction result: {predicted_label[0]}"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What Was the Prediction Result for the New Match?
&lt;/h2&gt;

&lt;p&gt;The output was as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Prediction result: A
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, the home team had only 1 shot on target while the away team had 3 shots on target, so the model predicted an away team victory.&lt;/p&gt;

&lt;h1&gt;
  
  
  Summary
&lt;/h1&gt;

&lt;p&gt;Even though I had almost no knowledge of machine learning, working hands-on with actual data deepened my understanding. Next, I'd like to try more advanced analysis, such as predicting next season's standings (hoping my favorite Manchester United will finish in first place...!)&lt;/p&gt;

</description>
      <category>python</category>
      <category>machinelearning</category>
      <category>dataanalysis</category>
      <category>pandas</category>
    </item>
  </channel>
</rss>
