Check ID:
Provider: AWS
Service:
Severity: MEDIUM
Categories:
Resource type:
apigateway_restapi_public_with_authorizerProvider: AWS
Service:
apigatewaySeverity: MEDIUM
Categories:
internet-exposed, identity-accessResource type:
AwsApiGatewayRestApiWhat this check verifies
API Gateway REST APIs exposed to the Internet are evaluated for an attached authorizer that enforces caller identity (Lambda authorizer or Cognito user pool) on method invocations. Focus is on whether public endpoints require authenticated requests rather than accepting anonymous calls.Risk
Without an authorizer on a public API, anonymous callers can:- Read or alter data (confidentiality/integrity)
- Trigger backend actions, impacting systems
- Abuse traffic, degrading availability and inflating costs
Recommendation
Enforce authentication on all Internet-facing APIs by attaching an authorizer (Cognito user pool or Lambda) that validates tokens and scopes. Apply defense in depth:- Restrictive resource policies and IP controls
- WAF, throttling, quotas, rate limits
- Least-privilege backend access and comprehensive logging
Remediation
- CLI
- Terraform
- Native IaC
- Dashboard steps
aws apigateway create-authorizer —rest-api-id <rest_api_id> —name <example_resource_name> —type TOKEN —authorizer-uri arn:aws:apigateway:<region>:lambda:path/2015-03-31/functions/arn:aws:lambda:<region>:<account-id>:function:<example_resource_name>/invocations —identity-source ‘method.request.header.Authorization’
References
- https://support.icompaas.com/support/solutions/articles/62000233640-check-if-api-gateway-public-endpoint-has-an-authorizer-configured
- https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-endpoint-types.html
- https://api7.ai/blog/secure-rest-api-in-aws-api-gateway
- https://supertokens.com/blog/lambda-authorizers
- https://clerk.com/blog/how-to-secure-api-gateway-using-jwt-and-lambda-authorizers-with-clerk
- https://aws.plainenglish.io/6-rest-api-security-best-practices-you-can-achieve-with-amazon-api-gateway-2-authentication-62b5171989bd
- https://stackoverflow.com/questions/68512642/how-to-configure-aws-api-gateway-without-authorizer
- https://auth0.com/docs/customize/integrations/aws/aws-api-gateway-custom-authorizers
Where this check fires
This check runs on every scheduled scan against your AWS account. Findings appear at Cloud Security → Findings filterable byCheck ID = apigateway_restapi_public_with_authorizer. 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