{
  "id": "cloud/aws-lambda-s3-event-source-missing-notification",
  "signature": "Missing S3 event notification for Lambda trigger: S3 bucket 'my-bucket' has no event notification configuration for Lambda function 'my-function'",
  "signature_zh": "Lambda 触发器缺少 S3 事件通知：S3 存储桶 'my-bucket' 没有为 Lambda 函数 'my-function' 配置事件通知",
  "regex": "Missing S3 event notification.*Lambda trigger.*no event notification configuration",
  "domain": "cloud",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "The S3 bucket does not have an event notification configured to invoke the Lambda function, often due to manual deletion of the notification or incorrect bucket policy.",
  "root_cause_type": "generic",
  "root_cause_zh": "S3 存储桶未配置事件通知以调用 Lambda 函数，通常是由于手动删除了通知或存储桶策略不正确。",
  "versions": [
    {
      "version": "aws_cli",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "lambda_runtime",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "s3",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "The console may not create the notification if the bucket already has a notification limit (max 100) or if permissions are insufficient.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The bucket policy is independent of event notifications; the notification itself must be configured via S3 API.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Use AWS CLI to add the event notification: `aws s3api put-bucket-notification-configuration --bucket my-bucket --notification-configuration file://config.json` where config.json contains: `{\"LambdaFunctionConfigurations\": [{\"LambdaFunctionArn\": \"arn:aws:lambda:us-east-1:123456789012:function:my-function\", \"Events\": [\"s3:ObjectCreated:*\"]}]}`",
      "success_rate": 0.95,
      "how": "Use AWS CLI to add the event notification: `aws s3api put-bucket-notification-configuration --bucket my-bucket --notification-configuration file://config.json` where config.json contains: `{\"LambdaFunctionConfigurations\": [{\"LambdaFunctionArn\": \"arn:aws:lambda:us-east-1:123456789012:function:my-function\", \"Events\": [\"s3:ObjectCreated:*\"]}]}`",
      "condition": "",
      "sources": []
    },
    {
      "action": "Check and update the Lambda resource-based policy to allow S3 invoke: `aws lambda add-permission --function-name my-function --statement-id s3-invoke --action lambda:InvokeFunction --principal s3.amazonaws.com --source-arn arn:aws:s3:::my-bucket`",
      "success_rate": 0.85,
      "how": "Check and update the Lambda resource-based policy to allow S3 invoke: `aws lambda add-permission --function-name my-function --statement-id s3-invoke --action lambda:InvokeFunction --principal s3.amazonaws.com --source-arn arn:aws:s3:::my-bucket`",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Use AWS CLI to add the event notification: `aws s3api put-bucket-notification-configuration --bucket my-bucket --notification-configuration file://config.json` where config.json contains: `{\"LambdaFunctionConfigurations\": [{\"LambdaFunctionArn\": \"arn:aws:lambda:us-east-1:123456789012:function:my-function\", \"Events\": [\"s3:ObjectCreated:*\"]}]}`",
    "Check and update the Lambda resource-based policy to allow S3 invoke: `aws lambda add-permission --function-name my-function --statement-id s3-invoke --action lambda:InvokeFunction --principal s3.amazonaws.com --source-arn arn:aws:s3:::my-bucket`"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://docs.aws.amazon.com/lambda/latest/dg/with-s3-example.html",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.95,
  "resolvable": "true",
  "first_seen": "2023-11-01",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}