Claude 3.5 Sonnet writes me excellent code in a variety of different languages. I have a bunch of examples here: https://simonwillison.net/tags/claude-3-5-sonnet/
I usually try to actually provide AWS resource IDs / VPC id's, bucket names and everything and at least with AWS / Python stuff it is good (yes, some corners still but the trend is very good).
My prompts aren't short but it spell out very clearly what I want. To process 2 million XML files let's say stored in S3, using an SQS queue ZZZ that will pass in S3 object ID's in this format, store results back to RDS Postgresql here. Use Loguru or whatever for logging. I provide sample XML files, sample results, schema for database (DDL) etc etc. Then you can iterate on this - deploy using docker to ECS, use fargate, then do some scale out when queue depth is deep, go to asyncio or multi-process or multi-threading etc etc and just build. It goes quick.
At the same time, I've minimized complexity in my codebase. It's a win-win, and honestly probably the next paradigm of software engineering.