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

- **ID:** `cloud/aws-lambda-s3-event-trigger-missing`
- **Domain:** cloud
- **Category:** config_error
- **Error Code:** `InvalidArgument`
- **Verification:** ai_generated
- **Fix Rate:** 95%

## Root Cause

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

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| AWS Lambda (all runtimes) | active | — | — |
| S3 (all regions) | active | — | — |

## Workarounds

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.** (95% success)
   ```
   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.** (90% success)
   ```
   If the function was deleted, recreate it with the same name and ARN. Or update the notification to point to a different existing function.
   ```

## Dead Ends

- **Recreate the S3 bucket and re-add notification** — The bucket is not the issue; the Lambda function ARN is invalid. Recreating the bucket is unnecessary. (90% fail)
- **Update the Lambda function with the same name** — The function may need a different ARN format (e.g., including alias or version). Simply updating does not fix the ARN mismatch. (70% fail)
