ERROR REFERENCE
Lambda could not find the invoke target
The Lambda Invoke call reached AWS, but the requested
function, alias, or published version was not present in the account
and Region used by the caller. Check the target before changing IAM.
WHAT IT MEANS
What this error means
An error occurred (ResourceNotFoundException) when calling the Invoke operation
This is often a post-deploy smoke test using a stale function name, alias, Region, or account. It can also run before an alias or version finishes becoming available. The line alone does not prove that the CloudFormation deployment itself failed.
NEXT CHECK
Verify the exact target
-
Read the function directly in the same account and Region:
Omitaws lambda get-function --function-name <function-name> --qualifier <alias-or-version>--qualifierwhen the invoke did not specify one. -
Compare the name and qualifier with the deploy output.
Check the stack output or transformed template, especially when SAM
created an
AutoPublishAliasor a new version. - Check deployment timing. Wait for the stack and alias resources to complete before the smoke test retries. If the target still does not exist, correct the Region, account, function name, or qualifier rather than broadening permissions for a missing resource.
AUTOMATE THE TRIAGE
Keep the check in your normal workflow
SAM Doctor recognizes the Lambda Invoke operation with
medium confidence and points at a read-only function and qualifier
check. Runs locally; no AWS access, no log upload.
python -m pip install sam-doctor
sam-doctor diagnose deployment.log --format markdown
RELATED
Related errors
- Lambda deployment package too large - the function exists, but its artifact exceeds the upload limit.
- CloudFormation resource creation or update failed - the resource-level fallback when the deployment itself reports a failed event.
- Failed to create/update the stack - a wrapper handoff when the missing evidence is in stack events.