Check ID:
Provider: AWS
Service:
Severity: CRITICAL
Categories:
Resource type:
awslambda_function_not_publicly_accessibleProvider: AWS
Service:
awslambdaSeverity: CRITICAL
Categories:
internet-exposedResource type:
AwsLambdaFunctionWhat this check verifies
AWS Lambda function resource-based policies are assessed for public access. The finding identifies policies with wildcard or emptyPrincipal that allow actions like lambda:InvokeFunction to any principal.
Risk
Public invocation lets outsiders run code under the function’s IAM role. Impacts:- Confidentiality: data exfiltration via backend access
- Integrity: unauthorized state changes from side effects
- Availability/cost: invocation floods causing throttling and spend spikes
Recommendation
Remove public principals from function policies. Grant access only to specific accounts, roles, or services using fixed ARNs and least privilege. Add conditions likeAWS:SourceAccount and AWS:SourceArn to constrain service triggers. Enforce separation of duties and monitor access for defense in depth.
Remediation
- CLI
- Terraform
- Native IaC
- Dashboard steps
aws lambda remove-permission —function-name <example_function_name> —statement-id <example_statement_id>
References
- https://docs.aws.amazon.com/config/latest/developerguide/lambda-function-public-access-prohibited.html
- https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html
- https://docs.aws.amazon.com/securityhub/latest/userguide/lambda-controls.html
- https://www.trendmicro.com/trendaivisiononecloudriskmanagement/knowledge-base/aws/Lambda/function-exposed.html
Where this check fires
This check runs on every scheduled scan against your AWS account. Findings appear at Cloud Security → Findings filterable byCheck ID = awslambda_function_not_publicly_accessible. To re-evaluate after a fix, hit Run now on the account’s schedule under Cloud Security → Schedules — the next scan re-checks this control and marks the finding fixed or keeps it persistent.
← Back to AWS checks