InvalidArgument cloud config_error ai_generated true

错误:S3存储桶通知配置无效:未找到Lambda函数ARN

Error: S3 bucket notification configuration is invalid: Lambda function ARN not found

ID: cloud/aws-lambda-s3-event-trigger-missing

其他格式: JSON · Markdown 中文 · English
95%修复率
86%置信度
1证据数
2023-11-05首次发现

版本兼容性

版本状态引入弃用备注
AWS Lambda (all runtimes) active — — —
S3 (all regions) active — — —

根因分析

S3事件通知中指定的Lambda函数不存在或已被删除,导致通知配置验证失败。

English

The Lambda function specified in the S3 event notification does not exist or has been deleted, causing the notification configuration to fail validation.

generic

官方文档

https://docs.aws.amazon.com/AmazonS3/latest/userguide/notification-how-to-event-types-and-destinations.html

解决方案

  1. Verify the Lambda function exists: `aws lambda get-function --function-name my-function`. If it exists, get its ARN: `aws lambda get-function-configuration --function-name my-function --query FunctionArn`. Then update the S3 notification with the correct ARN: `aws s3api put-bucket-notification-configuration --bucket my-bucket --notification-configuration file://notification.json` where notification.json contains the correct Lambda ARN.
  2. If the function was deleted, recreate it with the same name and ARN. Or update the notification to point to a different existing function.

无效尝试

常见但无效的做法:

  1. Recreate the S3 bucket and re-add notification 90% 失败

    The bucket is not the issue; the Lambda function ARN is invalid. Recreating the bucket is unnecessary.

  2. Update the Lambda function with the same name 70% 失败

    The function may need a different ARN format (e.g., including alias or version). Simply updating does not fix the ARN mismatch.