Tag: amazon web services

  • How to give Claude read-only access to your AWS account for cost savings work

    How to give Claude read-only access to your AWS account for cost savings work

    Last year I wrote about building an AWS cost analysis agent with Strands. It looked at my account and pointed out things to clean up. I made a few of the changes it suggested and my bill dropped by about $100 a month.

    Since then I’ve done a lot more of this work, and I don’t usually use a custom agent for it anymore. I open Claude Code in a terminal, point it at the account, and ask it where the money is going. It’s very good at this. It can pull a month of Cost Explorer data, notice that NAT Gateway data processing is 30% of the bill, find which subnets are behind it, and explain why, all in about the time it takes me to find the right page in the Billing console.

    The hard part isn’t the AI. It’s the permissions. You’re giving a model a shell and AWS credentials. This post covers how I set that up so Claude can see everything it needs to find savings, can’t change anything, and can’t read my data.

    The rule: Claude finds, I fix

    Here’s the split I use:

    • Claude reads cost data, metrics and resource metadata, then gives me a list of findings with the exact CLI commands to fix each one.
    • I read the list, decide what to do, and run the changes myself with my own credentials.

    Claude never has write access, not even “just for snapshots” or “just for tags.” Cost work is all reading and reasoning. The changes are usually a few commands I want to look at before anything gets deleted anyway.

    Mistake #1: ReadOnlyAccess isn’t read-only enough

    My first version attached AWS’s managed ReadOnlyAccess policy to an IAM user. It seems like the obvious choice, and it’s the wrong one.

    “Read-only” means the role can’t change anything. It doesn’t mean the role can’t see anything. ReadOnlyAccess lets you:

    • Download any object in any S3 bucket (s3:GetObject)
    • Scan or query any DynamoDB table
    • Read every CloudWatch log event
    • Read Lambda function configurations, which include environment variables (where plenty of people still keep API keys)
    • Read SSM parameters, EC2 user data, CloudFormation templates and more

    None of that helps with cost work. Claude doesn’t need to know what’s in a bucket to tell you it has no lifecycle policy and 4 TB in Standard storage. It needs the size, the storage class and the configuration. That’s metadata, not data.

    So the starting point is AWS’s ViewOnlyAccess job-function policy instead. It covers the List* and Describe* calls across services without the data reads. Then you add the cost-specific permissions it lacks, plus an explicit deny on data reads as a backstop.

    Mistake #2: long-lived access keys

    The first version also made an IAM user and wrote its access keys to a .env file. Those keys never expire, and they sat in a project folder on my laptop. Not great.

    Use a role instead. You assume it from your normal credentials and get temporary credentials that expire after an hour. If something leaks, it’s useless by lunch.

    Step 1: Create the role

    All the examples below use account 111122223333. Replace it with yours, and replace the user ARN with whatever identity you normally log in as.

    trust.json only lets you assume the role:

    {
      "Version": "2012-10-17",
      "Statement": [
        {
          "Effect": "Allow",
          "Principal": { "AWS": "arn:aws:iam::111122223333:root" },
          "Action": "sts:AssumeRole",
          "Condition": {
            "ArnEquals": { "aws:PrincipalArn": "arn:aws:iam::111122223333:user/aaron" }
          }
        }
      ]
    }

    cost-analysis.json adds the cost permissions and the denies:

    {
      "Version": "2012-10-17",
      "Statement": [
        {
          "Sid": "CostAndPricing",
          "Effect": "Allow",
          "Action": [
            "ce:Get*", "ce:Describe*", "ce:List*",
            "pricing:*",
            "compute-optimizer:Get*",
            "cost-optimization-hub:List*", "cost-optimization-hub:Get*",
            "savingsplans:Describe*",
            "budgets:ViewBudget"
          ],
          "Resource": "*"
        },
        {
          "Sid": "Metrics",
          "Effect": "Allow",
          "Action": ["cloudwatch:GetMetric*", "cloudwatch:ListMetrics"],
          "Resource": "*"
        },
        {
          "Sid": "StorageMetadata",
          "Effect": "Allow",
          "Action": [
            "s3:GetBucketLocation",
            "s3:GetBucketTagging",
            "s3:GetLifecycleConfiguration",
            "s3:GetIntelligentTieringConfiguration",
            "tag:GetResources"
          ],
          "Resource": "*"
        },
        {
          "Sid": "DenyDataReads",
          "Effect": "Deny",
          "Action": [
            "s3:GetObject*",
            "dynamodb:GetItem", "dynamodb:BatchGetItem", "dynamodb:Query",
            "dynamodb:Scan", "dynamodb:PartiQLSelect",
            "secretsmanager:GetSecretValue", "secretsmanager:BatchGetSecretValue",
            "ssm:GetParameter*",
            "kms:Decrypt",
            "logs:GetLogEvents", "logs:FilterLogEvents", "logs:StartQuery",
            "logs:GetQueryResults", "logs:StartLiveTail", "logs:Unmask",
            "lambda:GetFunction", "lambda:GetFunctionConfiguration",
            "ecs:DescribeTaskDefinition",
            "ec2:DescribeInstanceAttribute", "ec2:GetConsoleOutput", "ec2:GetPasswordData",
            "cloudformation:GetTemplate",
            "sqs:ReceiveMessage",
            "kinesis:GetRecords",
            "athena:GetQueryResults"
          ],
          "Resource": "*"
        }
      ]
    }

    An explicit Deny always beats an Allow in IAM. Even if AWS adds something to ViewOnlyAccess later, or you attach another policy by mistake, those reads stay blocked.

    Now create the role (with your admin credentials, not Claude’s):

    aws iam create-role \
      --role-name ClaudeReadOnly \
      --assume-role-policy-document file://trust.json \
      --max-session-duration 3600
    
    aws iam attach-role-policy \
      --role-name ClaudeReadOnly \
      --policy-arn arn:aws:iam::aws:policy/job-function/ViewOnlyAccess
    
    aws iam put-role-policy \
      --role-name ClaudeReadOnly \
      --policy-name ClaudeCostAnalysis \
      --policy-document file://cost-analysis.json

    If you use IAM Identity Center (SSO), do the same thing as a permission set: attach ViewOnlyAccess as the managed policy and paste cost-analysis.json in as the inline policy.

    Step 2: Turn on the free recommendation engines

    Two AWS services do a lot of the analysis for you. Both are free, and both need a one-time opt-in:

    • Compute Optimizer produces rightsizing recommendations for EC2, EBS, Lambda, ECS on Fargate and RDS from your actual CloudWatch metrics.
    • Cost Optimization Hub gathers savings opportunities (rightsizing, idle resources, Savings Plans, Graviton moves) in one place with dollar estimates.

    Turn them on in the console, or ask Claude to tell you how. Give them a day or so to gather data. With them on, Claude can start from AWS’s own numbers instead of working everything out from raw metrics.

    Step 3: Add a CLI profile

    Add this to ~/.aws/config:

    [profile claude-readonly]
    role_arn = arn:aws:iam::111122223333:role/ClaudeReadOnly
    source_profile = default
    role_session_name = claude-code
    duration_seconds = 3600
    region = us-east-1

    The role_session_name matters more than it looks. Every API call Claude makes shows up in CloudTrail tagged claude-code, so you can always go back and see exactly what it looked at.

    Step 4: Prove it’s actually read-only

    Don’t take my word for it, or yours. Test it.

    Check that the profile works and Claude can see costs:

    aws sts get-caller-identity --profile claude-readonly
    
    aws ce get-cost-and-usage \
      --time-period Start=2026-10-01,End=2026-11-01 \
      --granularity MONTHLY --metrics UnblendedCost \
      --group-by Type=DIMENSION,Key=SERVICE \
      --profile claude-readonly

    Check that it can’t change anything. --dry-run asks EC2 “would this be allowed?” without doing it:

    aws ec2 stop-instances --instance-ids i-0123456789abcdef0 \
      --dry-run --profile claude-readonly
    # An error occurred (UnauthorizedOperation) ...

    Then use the IAM policy simulator (with your admin profile) to check the denies:

    aws iam simulate-principal-policy \
      --policy-source-arn arn:aws:iam::111122223333:role/ClaudeReadOnly \
      --action-names s3:GetObject lambda:GetFunctionConfiguration \
                     ssm:GetParameter ec2:TerminateInstances ce:GetCostAndUsage \
      --query 'EvaluationResults[].[EvalActionName,EvalDecision]' --output table

    You want explicitDeny on the data reads, implicitDeny on TerminateInstances, and allowed on GetCostAndUsage. If anything else shows up, fix the policy before Claude gets near it.

    Terminal output of aws iam simulate-principal-policy: s3:GetObject, lambda:GetFunctionConfiguration and ssm:GetParameter are explicitDeny, ec2:TerminateInstances is implicitDeny, and ce:GetCostAndUsage is allowed
    Real output from the simulator against the role. The account ID in the command is swapped for the example one.

    Step 5: Set up Claude Code

    I keep a separate folder for cost work, e.g. ~/aws-cost-review, with two files in it.

    .claude/settings.json makes the read-only profile the default for every command Claude runs in this folder:

    {
      "env": {
        "AWS_PROFILE": "claude-readonly"
      },
      "permissions": {
        "deny": [
          "Bash(aws configure:*)",
          "Read(~/.aws/credentials)"
        ]
      }
    }

    CLAUDE.md lays out the ground rules:

    # AWS cost review
    
    - You are working with read-only AWS access (profile: claude-readonly).
      Never pass a different --profile. Never ask me for other credentials.
    - Your job is to find savings, not to make changes. For every finding, give:
      what it is, the resource ID, estimated monthly savings, the risk,
      and the exact command I would run to fix it.
    - Cost Explorer API calls cost $0.01 each. Save results to ./data/
      as JSON and reuse them instead of calling again.
    - Start with Cost Optimization Hub and Compute Optimizer recommendations,
      then confirm them against CloudWatch metrics before recommending anything.
    - Check every enabled region, not just us-east-1.

    To be honest about what this does: the settings file and CLAUDE.md are seatbelts, not the security boundary. The IAM role is the boundary. If your admin credentials are sitting on the same machine, a determined process could still find them. If you want to be strict, run Claude Code in a container or a separate OS user where the read-only profile is the only credential that exists. For my own accounts, the role plus the settings file is where I’m comfortable.

    Step 6: Ask it to find money

    Start Claude Code in that folder and give it something like:

    Review this AWS account for cost savings. Break down the last 3 months of spend by service and flag anything that grew more than 20%. Then look for idle and oversized resources: unattached EBS volumes, old snapshots, unused Elastic IPs, idle load balancers, NAT Gateways with heavy data processing, oversized EC2 and RDS instances, and S3 buckets with no lifecycle policy. Rank the findings by monthly savings and give me the fix command for each one.

    What you get back is a ranked list. Each item has the resource, why it costs what it does, what Claude would change, and the command to do it. I go down the list, check anything that looks risky, and run the changes myself.

    A Claude Code cost review in a terminal: nine findings ranked by monthly savings, from a 30 dollar a month Aurora reservation down to S3 lifecycle policies, plus the checks that came back clean. Account identifiers are redacted.
    Part of a real review of one of my accounts through this role. Identifiers are redacted.

    Things it reliably finds in almost every account I’ve pointed it at:

    • EBS volumes and snapshots left behind after an instance was terminated
    • gp2 volumes that should be gp3 (cheaper and faster, and the change happens online)
    • NAT Gateway data processing that a VPC endpoint for S3 or DynamoDB would remove
    • EC2 and RDS instances averaging single-digit CPU for months
    • CloudWatch log groups set to never expire
    • Old-generation instance types with a cheaper current-gen or Graviton equivalent

    A couple of cost notes

    Most of this is free. The two exceptions:

    • Cost Explorer API: $0.01 per request. A thorough review might make a few dozen calls. That’s why the CLAUDE.md tells Claude to cache results.
    • CloudWatch GetMetricData: a small charge per thousand metrics requested. You’ll only notice it on a very large account.

    Compared to what it usually finds, the bill for the review is a rounding error.

    More than one account?

    If you have an AWS Organization, you want this role in every member account. Then Claude assumes into each account from one place. The trust policy in each member account should trust your management or tooling account instead of a user in the same account.

    I published the same role as a Terraform module, including an organization submodule that rolls it out to every account in your OUs with a CloudFormation StackSet: github.com/SpendSaw/terraform-aws-spendsaw-role. It’s the role my product, Spendsaw, uses to scan accounts, so it’s tested against real ones. The policy there is the full version of the trimmed-down one above. You can use the module without Spendsaw. Just point the trust policy at your own account.

    Cleaning up

    When you’re done, or if you ever want to cut Claude off, delete the role. That’s it.

    aws iam delete-role-policy --role-name ClaudeReadOnly --policy-name ClaudeCostAnalysis
    aws iam detach-role-policy --role-name ClaudeReadOnly \
      --policy-arn arn:aws:iam::aws:policy/job-function/ViewOnlyAccess
    aws iam delete-role --role-name ClaudeReadOnly

    Wrapping up

    Pointing AI at your AWS bill is one of the highest-return things you can do with it right now. It’s tedious work that needs to look across a lot of services at once, and that’s exactly what these models are good at. You just have to set it up so a bad suggestion stays a suggestion.

    To recap: use a role, not access keys. Use ViewOnlyAccess plus cost permissions, not ReadOnlyAccess. Explicitly deny data reads. Test it before you trust it. Have Claude hand you commands instead of running them.

    If you set this up and want a second set of eyes on the policy, or you want to compare notes on what it found, reach out!

    Don’t miss an update

  • Tools for a better fantasy football team and Week 2 results

    Tools for a better fantasy football team and Week 2 results

    This is a more technical document about how the tools work for my Fantasy Football agent in conjunction with https://gridirondata.com. At the top level, the coach is a Strands based AI agent that runs Anthropic Claude Sonnet 5 on Amazon Bedrock. The agent knows about my roster, and other teams rosters in my league which is hosted on ESPN’s Fantasy Football platform.

    Lineup Tools:

    • Optimize Lineup: Builds the best starting lineup for a team for any given week. It fills every slot with the highest projected eligible player. Projects are adjusted for injury designation and takes into account players who are on a bye week.
    • Start or sit advice: Compares the best lineup with the teams current starters and says exactly who to start or who to bench OR that no change is needed

    Player Research:

    • Analyze player: A full look at one player for one week: projection, injury status, opponent and bye (from the NFL schedule), boom/bust profile and recent news.
    • Compare players: Compares two players side by side for a week and recommends one to start.
    • Player boom or bust: A player’s season-long deviation profile, showing whether they usually beat or miss their projections and how steady their floor is.
    • Player matchup: How a player has scored against a given opponent in the past. If no opponent is given, it looks one up from the schedule.
    • Player news: Recent headlines for a player (injury, transaction, role), tagged by impact.

    Waivers & Streaming

    • Find waiver targets: Ranks free agents (projected players on no league roster) by how much they would improve on your weakest starter at their position, not just by raw projection
    • Stream defense: Compares your D/ST with the best free-agent defenses: projection, this week’s and next week’s opponent, history against the opponent, and whether streaming is worth it.

    All of these tools have more complex technical code that dictates exactly how they work and access the API. There are also various scoring rules for injured or questionable players. This might result in their projects lowering allowing for a bench player to get the nod to start for the week.

    The architecture is a pretty straightforward serverless design that relies on Cloudfront and S3 for frontend delivery and an API gateway to handle the chat.

    Fantasy Football Agent Architecture

    I use DynamoDB to manage our chat state as well as rosters for every team in the league. Bedrock is the AI layer where Sonnet runs.

    Anyway, enough nerd talk. Here is the current roster for week 3:

    Notable changes are adding the Chiefs defense against a horrific Miami team. Adding in Josh Downs due to injuries across other wide receivers. I personally would have liked to see the AI select a running back here but it was adamant that Josh Downs was the move.

    Another dominate week for us. We are currently in first place in the league. Some players were busts though:

    Jeremiyah Love simply didn’t get the ball when I was watching the Cardinals play. I have no idea what happened with Trevor Lawrence. His receivers couldn’t catch or something and apparently Cleveland figured out how to beat up the Buccaneers. Mike Evans went out with injury but dominate performances from Josh Allen and Amon-Ra St. Brown carried us to victory again.

    See you all next week for another update. If you want me to expand on any topic here feel free to reach out!

    Don’t miss an update

  • AWS Transform is the wrong tool for the job you actually have

    AWS Transform is the wrong tool for the job you actually have

    First off, I want to say I love Amazon Web Services, Kiro, and any effort that makes migrations from legacy to modern tech stacks. But, I also like the counter argument.

    AWS launched AWS Transform as “a collaborative enterprise IT transformation workbench powered by expert agents.” It promises to modernize your .NET apps 5x faster, shrink mainframe projects from “years to months,” and automate VMware migrations end to end. The marketing page claims 4.5 billion lines of code analyzed and 1.69 million hours of manual effort saved in the last twelve months.


    I’ve read the pitch. I’ve watched a couple of demos. I think most teams considering it should walk away, and I want to explain why —
    and what to do instead.

    What AWS Transform actual is

    Strip the agentic-AI gloss off and Transform is three things bundled together:

    1. A discovery and assessment layer that scans your existing estate (codebases, VMs, dependencies).
    2. A set of pre-built “agents” that perform specific transformations: .NET Framework → .NET on Linux, COBOL → Java, VMware →
      EC2, Java 8 → Java 21, and so on.
    3. A workbench (web console plus Kiro IDE integration) where humans review and approve agent output.

    It’s a continuation of a lineage: Migration Hub, MGN, App2Container, the old Microsoft Workloads tooling, the original CodeWhisperer transformation features. AWS keeps reshuffling these into new umbrella brands. Transform is the 2026 wrapper.

    That history matters, because it tells you something about the half-life of the product you’re betting on.

    My core objection: the output is shaped like AWS

    When you let an agent translate a COBOL batch job into Java, or a .NET Framework service into .NET on Linux, you don’t just get “modern code.” You get code that looks the way AWS’s agent decided modern code should look. The data access patterns it picks, the logging conventions, the way it splits modules, the runtime targets it assumes — all of that is now baked into your codebase, and none of it was a decision your team made.


    This is fine if you’re a hands-off shop that’s going to run whatever comes out the other end. It’s a disaster if you intend to own and evolve the system afterward. You will spend the next three years asking “why is it like this?” and the answer will be “because an agent decided in May 2026.”


    There’s a deeper version of this problem with mainframe and VMware work. The agent doesn’t just translate code — it picks the AWS-native destination. Step Functions instead of your existing scheduler. DynamoDB instead of “let’s think about whether this data actually fits a KV store.” Network conversion that assumes you want VPC-native everything. These are not neutral technical choices; they are commercial decisions made on AWS’s behalf, inside your repo.

    The metrics are a vendor-pitch, not a forecast

    “5x faster.” “70% lower operating costs.” “Years to months.”


    Every modernization vendor has said versions of these numbers for twenty years. They are real for the case study they came from. They are almost never what you will personally experience, because:

    • The 70% cost reduction usually compares licensed Windows Server + SQL Server Standard on owned hardware against Linux +
      an open-source database on Graviton. Most of the savings come from switching the license model, not from anything
      Transform does. You can capture that yourself.
    • The “5x faster” number is measured against a baseline of “team that has never done this before, doing it manually.” If your
      team has done a .NET migration once, your real multiplier is closer to 1.5x.
    • The mainframe-to-Java case studies almost always involve workloads that were already partially decomposed. The genuinely
      tangled mainframes the ones where modernization is actually hard are not the ones that ship as case studies.

    If a vendor’s headline metric needs four asterisks to be accurate, it isn’t really a metric.

    Modernization that skips understanding is just translation

    The thing I dislike most about Transform, and about agentic modernization in general, is that it lets you finish a project without anyone on your team understanding what they now own.


    When a senior engineer spends six months untangling a COBOL system to port it, the porting is half the value. The other half is that, at the end, someone in the building understands the system. They know where the landmines are. They can answer questions in incident review. They can tell product what’s safe to change.

    If an agent does the port, you get code on the other side and an organization that is no smarter than it was before. Worse: you now
    have a Java codebase that nobody wrote and nobody fully grasps, sitting on top of business logic nobody re-derived. The first production incident will be ugly.

    This is the same complaint people have about outsourced rewrites, and it applies cleanly to agent-driven ones.

    The Kiro and tooling lock-in

    Transform leans on Kiro, AWS’s IDE, with “pre-built playbooks.” Adopting Transform meaningfully means asking your engineers to learn Kiro, to work inside AWS’s review workflow, and to accept handoffs in a format that’s optimized for AWS’s agents to re-enter later.


    That’s a real switching cost. Two years from now, when AWS rebrands Transform into whatever comes next, those playbooks and that workflow knowledge depreciate fast.

    What to do instead

    I’m not arguing for “do nothing” or “stay on the mainframe forever.” Modernization is often the right call. But the right shape is almost always:

    1. Do the assessment yourself, or with a consultancy you’d hire anyway. The discovery piece of Transform is the least controversial part — but it’s also the part you most want to own. Knowing your own estate is a permanent capability. Renting it from an agent is not.
    2. Use general-purpose coding agents under human direction, not vertical modernization agents. Claude Code, Cursor, Copilot in agent mode these are genuinely useful for the grunt work of a migration (rewriting a thousand similar files, fixing a known refactor pattern, translating tests). The difference is that your engineer is driving, deciding the target architecture, and reading the output. The agent is a force multiplier, not a contractor.
    3. Small wins, not big-bang. Pick the highest-pain module. Modernize it. Run it alongside the old system. Cut over. Repeat. This is slower on paper than “let the agent do it all,” but it produces a team that understands the new system at each step. And you can stop whenever the remaining legacy stops costing you money — which, for a lot of mainframe workloads, is the honest answer.
    4. Separate the license/runtime change from the architecture change. If most of your savings come from leaving Windows + SQL Server, do that migration as its own project. Don’t let it get bundled with a re-architecture, because the re-architecture is where the risk lives and you want it isolated.
    5. Be honest about workloads that shouldn’t move. Some legacy systems are stable, cheap to run, and changed once a quarter. Modernizing them is a status project, not a value project. Transform’s marketing will never tell you this; a good architect will.

    TLDR:

    AWS Transform is well-engineered. The agents work. The demos are real. None of that is the question.


    The question is whether you want to end a multi-year modernization with a codebase shaped by AWS’s opinions, a team that didn’t learn the system, and a tooling dependency on a product line AWS will rename in two years.

    For most teams I’ve worked with, the answer is no. Use agents — yours, under your control — to make your own engineers faster. Keep the architectural decisions in the building. Skip the workbench

    Questions? Let me know.

    Don’t miss an update

  • Why I built my own WordPress Platform

    Why I built my own WordPress Platform

    I’ve been building websites for a long time. I remember learning HTML and Microsoft FrontPage as my first website builder. It was such a fun time to be creating horrific looking websites back in the early 2000s. As the internet progressed so did my skills and back in 2016 I formed my company 45Squared to build websites for small businesses. My whole goal is to be your trusted resource when it comes to being online.

    When I started the company I built WordPress websites of various shapes and sizes but they always ran on AWS. This helped me expand my AWS skills as well as provide robust infrastructure for my client’s websites to live on. I managed the website and the underlying infrastructure for a small monthly cost that beat the competition. The result, a bunch of paying customers a decent side hustle.

    As time went on, selling became harder and the race to zero for cost was apparent. So, as the AI boom is on, I decided that it was time to automate the site building process.

    I started documenting out how I would want this to work. Fully automated website deployments, design, content, custom domains, good SEO base and deployed FAST!

    Enter https://ai.45sq.net. This platform is fully automated. The customer can provide inputs and descriptions of what they want as well as photos or other graphical content. The workflow takes all of the inputs and builds a fully functional WordPress website hosted on AWS. The user can easily point their own domain to the server and setup automatic payments. They then get full administrative access to their website so they can expand and add features just like any other WordPress site.

    So why did I build this?

    If you contact a web designer now you will have to pay them to build up the initial design, work with their timelines, end up with something that needs revisions and your time to live will be in the weeks not minutes.

    The platform I built for 45Squared eliminates the need for the initial design fees and focuses on getting you online quickly. Its great for small businesses who are just getting started.

    So now when I get a request to build a site I can tell the customer that I have two options. First, fully custom. I’m still willing to sit with you and build out the picture perfect website. Or, two, you can launch your own and I will still support the website and help you with your online presence.

    So that’s it. An easy to use WordPress website launcher. Running on enterprise grade cloud. With content, design, layout and all the rest handled by the magic of Claude Opus.

    Try it out: https://ai.45sq.net. No contracts. No weird fees. Get online today.

  • Cloudwatch Alarm AI Agent

    I think one of the biggest time sucks is getting a vague alert or issue and not having a clue on where to start with troubleshooting.

    I covered this in the past when I built an agent that can review your AWS bill and find practical ways to save money within your account. This application wasn’t event driven but rather a container that you could spin up when you needed a review or something you could leave running in your environment. If we take a same read-only approach to building an AWS Agent we can have have a new event driven teammate that helps us with our initial troubleshooting.

    The process flow is straight forward:

    1. Given a Cloudwatch Alarm
    2. Send a notification to SNS
    3. Subscribe a Lambda function to the topic (this is our teammate)
    4. The function utilizes the AWS Nova Lite model to investigate the contents of the alarm and utilizes its read only capabilities to find potential solutions
    5. The agent sends its findings to you on your preferred platform

    For my environment I primarily utilize Slack for alerting and messaging so I built that integration. Here is an architecture diagram:

    When the alarm triggers we should see a message in Slack like:

    The AI is capable of providing you actionable steps to either find the root cause of the problem or in some cases, present you with steps to solve the problem.

    This workflow significantly reduces your troubleshooting time and by reducing the troubleshooting time it reduces your downtime.

    So, if this is something you are interested in deploying I have created a Terraform module so you can quickly deploy it into your own environment to reduce your troubleshooting steps!

    Check it out here: https://aiopscrew.com

    If you have questions feel free to reach out to me at anytime!

  • Fantasy Football and AI – Playoffs Round 2

    Well. It had to end at some point.

    I think the AI mostly selected correctly this week. Unfortunately it wasn’t enough. We fell short by about 5 points. Going into Monday night we needed a massive game from George Kittle as the rest of the team performed very poorly. He delivered all the way until the 4th quarter where he likely twisted his ankle and was done for the game as the 49ers were up 2 scores.

    Here are the results:

    Josh Allen might have had a foot injury early in the game but stayed in for the entire game. The Bills simply didn’t throw the football. TreVeyon Henderson got absolutely demolished and left the game with a probable concussion. Josh Jacobs was questionable going into the game and cleared to play. The Packers simply didn’t play him.

    With that loss we are eliminated from the playoffs and will be playing next week for 3rd place. Still a decent finish for our first year utilizing AI.

    Looking Ahead

    Through the off season I want to continue to work on the overall architecture of this agent and system. Ideally, I want to have the custom model built for next season and build an API around that to help us make better predictions.

    Other action items:

    1. Find a way to load news stories and story lines for determinations
    2. Manage injuries/waivers better
    3. Handle live NFL standings (teams eliminated from playoffs might play differently than teams fighting for a spot)

    I also would love to be able to expose all of this publicly so that anyone reading can build their own applications around my predictions.

    Stay tuned next week for our final placement!

  • Fantasy Football and AI – Playoffs Round 1

    So I was wrong in last weeks post! Our playoffs started this week. In my league all the teams go to the playoffs and if you lose then there is a loser’s bracket.

    Our AI run team was seeded at number 3. We were in a three way tie for first place and we ended the “regular season” with 2054.76 points. The leader had 2114.12. So, we weren’t far off the front!

    Anyway, enough of that. You all just want to know the outcome. Here is our point totals from our first round in the playoffs:

    I ran the AI on Saturday and it suggested pulling out Josh Jacobs in favor of TreVeyon Henderson. This ended up getting us an extra 10 points. Josh Jacobs still put up 24.2 points this week. Everyone played really well this week except Sam Darnold. I’m not sure if his hot streak is over or what is going on with him but its been rough. Christian Watson took a nasty hit in his game and left early but he is expected to be just fine.

    So, did we win? We sure did! We’re on to the next round of the playoffs and we’re going to be up against Jahmyr Gibbs so we have to hope for our best performance of the season next week. Here is the currently proposed roster:

    We have a lot of injuries and questionable players so I expect this to change. We picked up the Bills defense as they play Cleveland and they should have a good time against that struggling offense.

    As we look to the off season I hope to build up my API website https://gridirondata.com and start training the model that we will use for next year. I have been working on the overall workflow and looking into how I can have both the scrapers running in the cloud and in my homelab so that I can easily work with the data locally and not incur a lot of cloud cost.

    Stay tuned for more Fantasy Football news next week!

  • Fantasy Football and AI – Week 12

    Well, unfortunately we took a big loss and are now in a three way tie for first place. Here are the actual results:

    I think the biggest hit was how poorly Josh Allen played. What is interesting is that I was reviewing his passed performance against Houston and he has had his worst outings of his career there. This week was no different… The other interesting thing is that Saquon Barkley just isn’t the same back as he was last year. He is trending down.

    In response to Josh Allen’s poor outing I added a deviation and historical performance analysis against and opponent to the data set so now we have a value like:

    "HOU": {
       "avg_actual": 11.6,
       "avg_deviation": -2.67,
       "avg_deviation_percentage": -18.69,
       "avg_projected": 14.27,
       "by_season": {
        "2024": {
         "avg_actual": 14.6,
         "avg_deviation": 0,
         "avg_deviation_percentage": 0,
         "avg_projected": 0,
         "games_played": 1,
         "games_with_projections": 0
        },
        "2025": {
         "avg_actual": 5.05,
         "avg_deviation": -5.65,
         "avg_deviation_percentage": -52.8,
         "avg_projected": 10.7,
         "games_played": 2,
         "total_actual": 10.1,
         "total_projected": 21.4
        }
       },

    I then coded a new tool inside of the AI to reference this data set to assist with its final calculations.

    So, when we ask the tool about Josh Allen’s performance against a team we get something like:

    Found exactly what you're looking for in Josh Allen's performance data.
    
    Josh Allen vs Kansas City (Week 9, 2025):
    - 28.8 fantasy points - That's a STRONG performance!
    - He was projected for 22.0 points but exceeded by 6.8 points (+30.9%)
    - This was one of his better games this season
    
    Historical Context (2024 vs KC):
    - Week 11, 2024: 24.0 fantasy points vs Kansas City
    
    Bottom Line: Josh Allen has performed WELL against Kansas City in recent matchups. In their two most recent meetings:
    - 2025 (Week 9): 28.8 points
    - 2024 (Week 11): 24.0 points
    
    That's an average of 26.4 fantasy points against KC - well above his season average. Allen seems to rise to the occasion against elite competition like Kansas City. The Chiefs' defense can be vulnerable to mobile QBs who can extend plays, and Allen's dual-threat ability has historically given them problems.
    
    The takeaway: When Allen faces KC, he typically delivers QB1 numbers. That 28.8-point performance this season shows he can still light up even the defending champs!

    I need to backload some more historical data yet but that is a problem for a different day. Looking forward, I hope to build my own model based on this data and setup an automated workflow that will include data ingestion and automated model building so that I can consistently build predictions.

    So, on to week 13. We have a bunch of injuries this week to contend with so this lineup will likely be changing once people are reporting. Here is the current lineup:

    In other news I built and launched https://gridirondata.com which is an API to reference all of the data I have collected so far.

    Unfortunately, its not free. But if you message me about it I’ll probably hook you up!

  • Building jsontotoon.io: A Free Tool to Cut Your LLM API Costs

    If you’re working with LLM APIs, you’re probably watching your token counts like a hawk. Every JSON object you send to Claude, GPT-4, or Gemini costs tokens, and those curly braces and quotes add up fast. I built https://jsontotoon.io to solve this exact problem—and it’s completely free to use.

    The Problem: JSON is Token-Inefficient

    Here’s the thing: JSON is fantastic for machine-to-machine communication. It’s ubiquitous, well-supported, and everyone knows how to work with it. But when you’re paying per token to send data to an LLM? It’s wasteful.

    Look at a simple example:

    [
      {"name": "Alice", "age": 30, "city": "NYC"},
      {"name": "Bob", "age": 25, "city": "LA"},
      {"name": "Carol", "age": 35, "city": "Chicago"}
    ]

    That’s 125 tokens. All those quotes, braces, and commas? The LLM doesn’t need them to understand the structure. You’re literally paying to send redundant syntax.

    Enter TOON Format

    TOON (Token-Oriented Object Notation) converts that same data to:

    name, age, city
    Alice, 30, NYC
    Bob, 25, LA
    Carol, 35, Chicago

    68 tokens. That’s a 46% reduction. The same information, fully reversible back to JSON, but nearly half the cost.

    I realize this sounds too good to be true, but the math checks out. I tested it across real-world datasets—API responses, database dumps, RAG context—and consistently saw 35-45% token reduction. Your mileage will vary depending on data structure, but the savings are real.

    How I Built It

    The backend is straightforward Python running on AWS Lambda. The TOON parser itself is deterministic—same JSON always produces the same TOON output, and round-trip conversion is lossless. No data gets mangled, no weird edge cases (well, I fixed those during testing).

    Infrastructure-wise:

    – CloudFront + S3 for the static frontend

    – API Gateway + Lambda for the conversion endpoint

    – DynamoDB for API key storage (with email verification via SES)

    – WAF with rate limiting to prevent abuse (10 requests per 5 minutes on API endpoints)

    – CloudWatch dashboards for monitoring

    The whole setup costs me about $8-15/month in AWS fees, mostly for WAF. The conversion itself is so fast (< 100ms average) and cheap that I can offer unlimited free API keys without worrying about runaway costs.

    Real Use Cases

    I built this because I was spending way too much on Claude API calls for my fantasy football AI agent project. Every week I send player stats, injury reports, and matchup data in prompts. Converting to TOON saved me about 38% on tokens—which adds up when you’re making hundreds of calls per week.

    But the use cases go beyond my specific problem:

    – RAG systems: Fit more context documents in your prompts without hitting limits

    – Data analysis agents: Send larger datasets for analysis at lower cost

    – Few-shot learning: Include more examples without token bloat

    – Structured outputs: LLMs can generate TOON that’s easier to parse than JSON

    Try It Yourself

    The web interface at https://jsontotoon.io is free to use—no signup required. Just paste your JSON, get TOON. If you want to integrate it into your application, grab a free API key (also no cost, no expiration).

    Full API docs are available at https://jsontotoon.io/docs.html, with code examples in Python, JavaScript, Go, and cURL.

  • Fantasy Football and AI – Week 9

    A BIG win in week 9! Our team is now tied for 1st place with 6 wins and 3 losses. We currently have 1318.66 total fantasy points on the season. It was looking pretty grim going into the afternoon games on Sunday. The receivers AI selected were not preforming and other players were barely hitting their projects. Josh Allen sparked some life into the team with his 30 points and then Sam Darnold showed everyone how to play quarter back with a 37.2 point performance! Check out the full results below.

    So, now we’re off to week 10. Currently, as I write this, Saquon Barkley is questionable to play. I would expect that he does play but the AI will not put him in the starting lineup. We picked up the Panther’s defense upon request from the AI. I would expect this is because they are playing the Saints who just traded away Rasheed Shaheed. The addition of DJ Moore into the OP slot is going to be a rough choice over playing a quarterback in that position. I’ll be monitoring the roster throughout the week to see if there are any other suggestions we can make. Here is what we are currently fielding into week 10:

    Tune in next week for the results! Hopefully AI can get to 7-3!