今天早上,我构建了一个系统实验原型,该系统通过使用 S3 触发器和 AWS lambda 维护并行 DynamoDB 表来有效跟踪已添加到大型 S3 存储桶中的文件。
通过对我的自定义 Claude 项目的这个单一提示,我已经完成了 80% 的工作:
Python CLI app using boto3 with commands for creating a new S3 bucket which it also configures to have S3 lambada event triggers which moantian a dynamodb table containing metadata about all of the files in that bucket. Include these commands
create_bucket - create a bucket and sets up the associated triggers and dynamo tables
list_files - shows me a list of files based purely on querying dynamo
ChatGPT 然后把我带到了 95% 的点。 Claude 生成的代码包含一个明显的错误,因此我将代码粘贴到 o3-mini-high 中,因为“推理”通常是修复此类错误的好方法:
Identify, explain and then fix any bugs in this code:
克劳德的代码粘贴在这里
…除了添加几个time.sleep()
调用来解决 IAM 策略分配的计时错误之外,一切都有效!
在不到 15 分钟的提示下,从一个粗略的想法到一个可行的概念证明是非常有价值的。
这正是我过去避免的项目,因为我几乎不合理地无法容忍弄清楚每次调用 S3、IAM、AWS Lambda 和 DynamoDB 的单独详细信息所带来的挫败感。
标签: lambda 、 uv 、 ai 、 llms 、人工智能辅助编程、生成式人工智能、 s3 、 aws 、 nosql 、 o3 、 chatgpt 、 claude
原文: https://simonwillison.net/2025/Feb/19/s3-triggers/#atom-everything