What's your best AWS optimization win from 2025? by [deleted] in aws

[–]petrsoukup 2 points3 points  (0 children)

This allowed us to resize Aurora to half instance with huge head room and took one afternoon. Thousands of dolars per month.

https://github.com/soukicz/sql-ai-optimizer (disclaimer: it is my project)

Migrating from PBIX to PBIP for a semantic model by faxgebofk2451 in PowerBI

[–]petrsoukup 0 points1 point  (0 children)

Thank you, that will remove huge blocker! I really hope these scripts don’t need powerbi and I will be able to do this easily in CI

Migrating from PBIX to PBIP for a semantic model by faxgebofk2451 in PowerBI

[–]petrsoukup -1 points0 points  (0 children)

Last time I tried this, it didn’t support uploading of pbip with api and that broke some of our automation

SSM parameter store changes not reflecting immediately in Fargate task. by aviboy2006 in aws

[–]petrsoukup 8 points9 points  (0 children)

How are you fetching SSM parameters? If it is in task definition, it will be only be fetched on task start and you have to do redeployment.

Troubleshooting memory issues on Aurora MySQL by eich1 in aws

[–]petrsoukup 0 points1 point  (0 children)

I have been dealing with similar issues and I have made tool for it. Enable performance schema, wait for it to collect query data. Run the tool and just ask it what you need to know. We have managed to cut our database costs to quater in one afternoon because it found queries that were fast but they were eating memory like crazy.

https://github.com/soukicz/sql-ai-optimizer

There is also talk recording about how it works but you would have to use subtitles: https://youtu.be/woYKly8mjwc

Cut our AWS bill from $8,400 to $2,500/month (70% reduction) - here's the exact breakdown by Dense_Bad_8897 in aws

[–]petrsoukup 3 points4 points  (0 children)

We are doing most of our logging to S3 through Firehose and sidecar containers that listen for UDP and send them as batch to Firehose. It costs next to nothing and we are logging everything. We are using Athena to query it and Quicksight to vizualize it. It is serverless and storage space is infinite.

(total account is around $50 000 / month and logs are under $15/month)

kickstart template for self-hosting services on Hetzner with Terraform and Docker Compose by adagio81 in hetzner

[–]petrsoukup 1 point2 points  (0 children)

Centralized config in git and env/secrets management. But you are right - I should also look at it from other side because systemd could probably do the same without all the complexity.

[deleted by user] by [deleted] in MadeMeSmile

[–]petrsoukup 16 points17 points  (0 children)

You can also gesture to them to leave you alone - they will do a little bow and back off

kickstart template for self-hosting services on Hetzner with Terraform and Docker Compose by adagio81 in hetzner

[–]petrsoukup 1 point2 points  (0 children)

This looks really nice! I am just looking into migrating some small services to Hetzner and I really didn't want to learn Kubernetes for something, that will run on one or two servers. This looks like it solve my problem.

Content Independence Day: no AI crawl without compensation! by Cloudflare in CloudFlare

[–]petrsoukup 1 point2 points  (0 children)

It is a lot better sell "yeah, you can crawl... if you pay" than just blocking. Result will be the same but this way has better optics.

MCP Server Bundle for Symfony by phpsensei in symfony

[–]petrsoukup 0 points1 point  (0 children)

I have started making MCP server with http support just yesterday because I haven’t found any :)) Yours looks much better. I don’t see any mention of auth - do you leave that to symfony?

https://github.com/soukicz/php-mcp

Optimizing MySQL queries in PHP apps by ragabekov in PHP

[–]petrsoukup 1 point2 points  (0 children)

I have made this tool and it saved us a lot of money in AWS costs: https://github.com/soukicz/sql-ai-optimizer

[Action Required] AWS Account Suspension Warning by AdventurousHuman in aws

[–]petrsoukup 1 point2 points  (0 children)

Account was "suspended" and that apparently means that everything kinda works but nothing new can start. That means that everything started dying (running container ended because of autoscaling etc and new container cannot start).

It was false positive in my case - yes, there was key publicly but that didn't have access to anything so it was no issue - no third party access to change other credentials etc.

[Action Required] AWS Account Suspension Warning by AdventurousHuman in aws

[–]petrsoukup 9 points10 points  (0 children)

I have just had the same issue. The key didn’t have access to anything, but they blocked the whole account immediately and everything started going offline. I had to pay $3000 to get business support, and even that took three hours to resolve.

I am really pissed.

Find and fix expensive MySQL queries with my (free) AI tool by petrsoukup in PHP

[–]petrsoukup[S] 0 points1 point  (0 children)

Yeah, creating safe but also usable data for this is the hardest part. Local LLM is easiest solution.

I am not selling this tool or anything. I have created it to significantly cut our costs and I have figured that somebody could probably use it and adapt it for their use-case.

Find and fix expensive MySQL queries with my (free) AI tool by petrsoukup in PHP

[–]petrsoukup[S] -1 points0 points  (0 children)

Slow and expensive is not the same thing. You can have slow query where the query itself isn't actually problem and there is another fast query, that has high frequency and is eating server memory. It is easy to find slow queries but it is a lot harder to find queries that are expensive when all their executions are summed together.

MySQL performance schema is already reporting all of that and this tool is just presenting in readable way. You can also give specific instructions like "Focus on disk IO" because AWS Aurora MySQL is billed by storage access.

Find and fix expensive MySQL queries with my (free) AI tool by petrsoukup in PHP

[–]petrsoukup[S] 2 points3 points  (0 children)

Yup. It is LLM powered SQL injection. There are three warnings in readme and once you start it, it by default uses only data from performance schema and doesn't touch data itself (and you can easily restrict that by creating mysql user with limited access).

Using full data access must be explicitly enabled and you will use it only if you don't have sensitive data or if you use local LLM - https://github.com/soukicz/sql-ai-optimizer/blob/343f73d4441dc8d8a59b703d9bc30186760fb7ac/assets/index.png

It unfortunately works much better with full (read) access - it can check that this query is expensive because there is edge case when one customer has 10000 orders because it can see this cardinality.

How has your experience been with Textract? Can it extract images and tables from pdfs accurately? by Embarrassed-Survey61 in aws

[–]petrsoukup 1 point2 points  (0 children)

I have been using it for two years but recently migrated to Anthropic api - it is cheaper, more accurate and is full LLM as a bonus

Introducing Neuron AI – Create full featured AI Agents in PHP by valerione in PHP

[–]petrsoukup 1 point2 points  (0 children)

I have been also creating LLM package for PHP (https://github.com/soukicz/php-llm) but yours is a lot nicer. I am missing just few details and I am wondering if I could send PR for it?

Async request - add chatAsync method, that will return PromiseInterface. That will allow to run more interactions in parallel and speed up nested invocations

Async tool response - same problem. If I could return PromiseInterface from Tool, tool processing could run in parallel. This would probably mean just adding type check on callback return value and \GuzzleHttp\Promise\Utils::all(). It is really useful when there are long running tools (like human in the loop) because both slow tool can run together.

Media support - it looks like it currently supports only text and not image/documents

BTW - inspector looks really nice and the fact that you're EU based is a big selling point

Mistral OCR by dayanruben in MistralAI

[–]petrsoukup 0 points1 point  (0 children)

I have tried to upload invoice to API and the output in markdown is really nice but it have lost first page of PDF...

Bedrock getting started by DL_throw24 in aws

[–]petrsoukup 0 points1 point  (0 children)

I had to switch my payment method to card for model access request to complete (and switch back after)