ChatGPT was able to completely write this perfectly. Absolutely mind blowing. Saved me probably 1-2 hours of looking things up and fiddling with it.
Bard failed multiple times in multiple places. It only found AMIs that exactly, down to the second, were two weeks old. The filter json looks wrong ('Key' isn't valid AFAIK). It didn't bucket them and just kept the newest 10.
In either case both of these are mind blowing. If ChatGPT didn't exist, Bard would still be very helpful at getting me started. ChatGPT did it all without me making any changes though.
ChatGPT log: https://gist.github.com/mdeeks/de297f1bc8cbd00fe2db01e6232aa...
Bard log: https://gist.github.com/mdeeks/1404e09da8879b94469166927ddff...